[postfix-users] Check und Meinungen zur postfix konfiguration
Hallo,
wie in einer vorhergehend Mail angekündigt bitte ich euch um eure Meinungen zu der geposteten postfix Konfiguration.
Habe das übliche postfix-sandwich gebaut smtpd->amavisd-new->smtpd
###postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = no config_directory = /etc/postfix content_filter = amavisfeed:[127.0.0.1]:10024 disable_vrfy_command = yes home_mailbox = inet_interfaces = all
# Brauch ich das wenn ich über transport dovecot ausliefere mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0
mydestination = external.none.at,lvps46-163-74-15.dedicated.hosteurope.de, localhost.dedicated.hosteurope.de, localhost
myhostname = external.none.at mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = - relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP smtpd_client_restrictions = check_client_access \ hash:/etc/postfix/client_restrictions
smtpd_data_restrictions = reject_unauth_pipelining, permit smtpd_helo_required = yes smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unknown_client, reject_unknown_hostname, permit_mynetworks, reject_unauth_destination, check_recipient_access hash:/etc/postfix/recipient_checks, check_recipient_access pcre:/etc/postfix/recipient_checks.pcre, check_helo_access hash:/etc/postfix/helo_checks, check_sender_access hash:/etc/postfix/sender_checks, check_sender_access pcre:/etc/postfix/sender_checks.pcre, check_client_access hash:/etc/postfix/client_checks, check_client_access pcre:/etc/postfix/client_checks.pcre, reject_rbl_client zen.spamhaus.org, permit
smtpd_sasl_auth_enable = no smtpd_sasl_authenticated_header = no smtpd_sasl_local_domain = smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sender_restrictions = smtpd_tls_auth_only = no smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_mandatory_ciphers = medium smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_received_header = no smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = dovecot virtual_uid_maps = static:5000 ###
###master.conf ...standard submission inet n - - - - smtpd -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject -o milter_macro_daemon_name=ORIGINATING ...standard #amavis part amavisfeed unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes -o disable_dns_lookups=yes -o max_use=20
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o smtpd_delay_reject=no -o smtpd_client_restrictions=permit_mynetworks,reject -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions=reject_unauth_pipelining -o smtpd_end_of_data_restrictions= -o smtpd_restriction_classes= -o mynetworks=127.0.0.0/8 -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_client_connection_count_limit=0 -o smtpd_client_connection_rate_limit=0 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters -o local_header_rewrite_clients= -o syslog_name=amavis-postfix #amavis part end
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${recipient} ###
Ich würde gerne die nicht benutzen delivery methoden
ifmail, bsmtp, scalemail-backend, mailman, uucp, maildrop
auskommentiern, sollte ja keine negativen Auswirkungen habe, oder?
@postscreen bin ich noch am lesen von http://www.postfix.org/POSTSCREEN_README.html um zu entscheiden welche Einstellungen ich genau haben will.
Vielen dank im voraus für eure Meinung.
LG Aleks
append_dot_mydomain = no
Warum nicht?
home_mailbox = inet_interfaces = all
Das sieht recht falsch aus
# Brauch ich das wenn ich über transport dovecot ausliefere mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0
Nein, das kann weg
mydestination = external.none.at,lvps46-163-74-15.dedicated.hosteurope.de, localhost.dedicated.hosteurope.de, localhost
myhostname = external.none.at
Besser: mydestination = $myhostname, lvps46-163-74-15.dedicated.hosteurope.de, localhost.dedicated.hosteurope.de, localhost
relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
Das sieht recht falsch aus
smtpd_banner = $myhostname ESMTP
Default, einfach weglassen
smtpd_client_restrictions = check_client_access \ hash:/etc/postfix/client_restrictions
OK. Abver wozu? Du hast das doch schon in smtpd_recipient_restrictions
smtpd_data_restrictions = reject_unauth_pipelining, permit
Das permit kann weg, sieht aber evtl. schöner aus
smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unknown_client, reject_unknown_hostname, permit_mynetworks, reject_unauth_destination, check_recipient_access hash:/etc/postfix/recipient_checks, check_recipient_access pcre:/etc/postfix/recipient_checks.pcre, check_helo_access hash:/etc/postfix/helo_checks, check_sender_access hash:/etc/postfix/sender_checks, check_sender_access pcre:/etc/postfix/sender_checks.pcre, check_client_access hash:/etc/postfix/client_checks, check_client_access pcre:/etc/postfix/client_checks.pcre, reject_rbl_client zen.spamhaus.org, permit
smtpd_sender_restrictions = smtpd_tls_auth_only = no
Das sieht nicht richtig aus
smtpd_tls_received_header = no
Würde ich schon anmachen
Ich würde gerne die nicht benutzen delivery methoden
ifmail, bsmtp, scalemail-backend, mailman, uucp, maildrop
auskommentiern, sollte ja keine negativen Auswirkungen habe, oder?
Kannst du abstellen.
On Don 22.09.2011 09:17, Ralf Hildebrandt wrote:
append_dot_mydomain = no
Warum nicht?
Keine Ahnung war schon drinnen mit folgenden kommentar.
# appending .domain is the MUA's job.
home_mailbox = inet_interfaces = all
Das sieht recht falsch aus
Sollte so sein.
Soweit ich gesehen habe ist das default, hab es rausgenommen.
relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
Das sieht recht falsch aus
sollten 2 Zeilen sein, da dürte beim Mail was umgebaut worden sein.
Schaut im archiv anders aus.
http://de.postfix.org/pipermail/postfix-users/2011-September/002883.html
smtpd_client_restrictions = check_client_access \ hash:/etc/postfix/client_restrictions
OK. Abver wozu? Du hast das doch schon in smtpd_recipient_restrictions
Mir kommt vor dass es früher greift, hab es aber rausgenommen.
smtpd_data_restrictions = reject_unauth_pipelining, permit
Das permit kann weg, sieht aber evtl. schöner aus
Verstehe nicht was du meinst, sorry.
smtpd_tls_received_header = no
Würde ich schon anmachen
Danke. done.
Ich würde gerne die nicht benutzen delivery methoden
ifmail, bsmtp, scalemail-backend, mailman, uucp, maildrop
auskommentiern, sollte ja keine negativen Auswirkungen habe, oder?
Kannst du abstellen.
Danke.
Habe nun auch postscreen hinzugefügt.
Hier nun die neue Konfiguration mit ein paar inputs von
http://www.postfix.org/TLS_README.html
### postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases biff = no broken_sasl_auth_clients = no config_directory = /etc/postfix content_filter = amavisfeed:[127.0.0.1]:10024 disable_vrfy_command = yes inet_interfaces = all mailbox_size_limit = 0 mydestination = $myhostname, lvps46-163-74-15.dedicated.hosteurope.de, localhost.dedicated.hosteurope.de, localhost
myhostname = external.none.at mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname
postscreen_access_list = permit_mynetworks,cidr:/etc/postfix/postscreen_access.cidr
postscreen_bare_newline_action = enforce postscreen_bare_newline_enable = yes postscreen_blacklist_action = enforce postscreen_dnsbl_action = enforce
postscreen_dnsbl_sites = zen.spamhaus.org*2 bl.spamcop.net*1 b.barracudacentral.org*1
postscreen_dnsbl_threshold = 2 postscreen_greet_action = enforce postscreen_non_smtp_command_enable = yes postscreen_pipelining_enable = yes readme_directory = no recipient_delimiter = - smtp_tls_loglevel = 2 smtp_tls_note_starttls_offer = yes smtp_tls_security_level = may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_data_restrictions = reject_unauth_pipelining, permit smtpd_helo_required = yes
smtpd_recipient_restrictions = ... wie gehabt ...
smtpd_sasl_auth_enable = no smtpd_sasl_authenticated_header = no smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_exclude_ciphers = aNULL smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_loglevel = 2 smtpd_tls_mandatory_ciphers = medium smtpd_tls_mandatory_exclude_ciphers = aNULL smtpd_tls_mandatory_protocols = SSLv3, TLSv1 smtpd_tls_protocols = !SSLv2 smtpd_tls_received_header = yes smtpd_tls_security_level = may smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes tls_export_cipherlist = ALL:+RC4:!kEDH:@STRENGTH tls_high_cipherlist = ALL:!EXPORT:!LOW:!MEDIUM:+RC4:!kEDH:@STRENGTH tls_low_cipherlist = ALL:!EXPORT:+RC4:!kEDH:@STRENGTH tls_medium_cipherlist = ALL:!EXPORT:!LOW:+RC4:!kEDH:@STRENGTH tls_random_source = dev:/dev/urandom virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains =
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = dovecot virtual_uid_maps = static:5000 ###
Soweit ich die doku richtig verstanden habe dann wird ja IMMER eine DNS Abfrage gemacht.
http://www.postfix.org/POSTSCREEN_README.html ... DNS White/blacklist test ...
Das bedeutet für mich dass der postscreen keine Möglichkeit bietet das DNS zu schonen. Habe ich das so richtig verstanden?
Habe den neuen server vor ~1 h im DNS mit prio 400 eingetragen und er wird schon mit spam bombadiert. Ich muss sagen ich bin überrascht wie schnell die spammengines DNS-�nderungen checken.
Aleks
* Aleksandar Lazic al-pfusde@none.at:
On Don 22.09.2011 09:17, Ralf Hildebrandt wrote:
append_dot_mydomain = no
Warum nicht?
Keine Ahnung war schon drinnen mit folgenden kommentar.
# appending .domain is the MUA's job.
Ich halt's trotzdem für Schwachsinn, aber egal :)
smtpd_data_restrictions = reject_unauth_pipelining, permit
Das permit kann weg, sieht aber evtl. schöner aus
Verstehe nicht was du meinst, sorry.
smtpd_data_restrictions = reject_unauth_pipelining
content_filter = amavisfeed:[127.0.0.1]:10024
Kann man auch als smtpd_proxy_filter machen.
Das bedeutet für mich dass der postscreen keine Möglichkeit bietet das DNS zu schonen.
???
Habe ich das so richtig verstanden?
Für DNSBL Abfragen macht er halt DNS Abfragen. Geht ja nicht anders. Dafür wird dei IP nicht im DNS rückwärts aufgelöst (was smtpd z.B. macht). Im Endeffekt ist es also wesentlich DNS schonender
On Don 22.09.2011 22:50, Ralf Hildebrandt wrote:
- Aleksandar Lazic al-pfusde@none.at:
On Don 22.09.2011 09:17, Ralf Hildebrandt wrote:
append_dot_mydomain = no
Warum nicht?
Keine Ahnung war schon drinnen mit folgenden kommentar.
# appending .domain is the MUA's job.
Ich halt's trotzdem für Schwachsinn, aber egal :)
Habs rausgenommen, da ich deiner Meinung bin.
smtpd_data_restrictions = reject_unauth_pipelining, permit
Das permit kann weg, sieht aber evtl. schöner aus
Verstehe nicht was du meinst, sorry.
smtpd_data_restrictions = reject_unauth_pipelining
Ok
content_filter = amavisfeed:[127.0.0.1]:10024
Kann man auch als smtpd_proxy_filter machen.
Danke.
hab ich nun in der master.cf beim smtpd eingetragen.
### smtpd pass - - n - - smtpd -o smtpd_proxy_filter=127.0.0.1:10024 ###
War mir nicht sicher welcher der beiden 'besser' ist.
Das bedeutet für mich dass der postscreen keine Möglichkeit bietet das DNS zu schonen.
Nun ich versuch aufgrund von FROM && TO vorher zu entschieden ob die Mail angenommen werden soll oder nicht bevor ich das DNS Frage.
Das ist sicher auch einer der Gründe weshalb bei smtpd_recipient_restrictions die Einträge reject_rbl_client relativ weit unten sind.
Habe ich das so richtig verstanden?
Für DNSBL Abfragen macht er halt DNS Abfragen. Geht ja nicht anders. Dafür wird dei IP nicht im DNS rückwärts aufgelöst (was smtpd z.B. macht). Im Endeffekt ist es also wesentlich DNS schonender
Du meinst da nur die DNSBL Server gefragt werden reduziert sich die DNS Belastung auf diese Server.
Ja ist ein Standpunkt dem ich folgen kann.
Danke für deine Hilfe.
LG Aleks
participants (2)
-
Aleksandar Lazic
-
Ralf Hildebrandt