[Postfixbuch-users] MUA bei SMTP bevorzugen

Sandy Drobic postfixbuch-users at japantest.homelinux.com
Mo Jun 4 13:19:24 CEST 2007


Ricardo Kuznik - aciComputer wrote:
> Hi!
> 
> postconf -n:
> 
> alias_maps = hash:/etc/aliases
> allow_untrusted_routing = no
> biff = no
> broken_sasl_auth_clients = yes
> canonical_maps = hash:/etc/postfix/canonical
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/lib/postfix
> debug_peer_level = 2
> default_process_limit = 20

Diese Zeile kannst du herausnehmen

> defer_transports =
> disable_dns_lookups = no
> disable_vrfy_command = yes
> inet_interfaces = all
> mail_name = Postfix
> mail_owner = postfix
> mail_spool_directory = /var/mail
> mail_version = 20060322
> mailbox_command =
> mailbox_size_limit = 0
> mailbox_transport = cyrus
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/share/man
> masquerade_classes = envelope_sender, header_sender, header_recipient
> masquerade_domains =
> masquerade_exceptions = root
> maximal_queue_lifetime = 2
> message_size_limit = 20240000
> mydestination = localhost.$mydomain, $mydomain, zahlreiche Domains

Bitte überlege mal, ob diese Domains wirklich in $mydestination richtig
aufgehoben sind. Hintergrund ist, dass alle User Systemuser sind und
user1 at example.com gleich user1 at example.org ist. Wenn die Domains
unabhängig sein sollen, dann sollten es virtual_mailbox_domains sein.

> mydomain = acianhalt.de
> myhostname = www.acianhalt.de
> mynetworks = 87.106.42.144/32,  127.0.0.0/8
> mynetworks_style = subnet
> myorigin = $mydomain
> newaliases_path = /usr/bin/newaliases
> program_directory = /usr/lib/postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/packages/postfix/README_FILES
> relay_domains = $mydestination, $myhostname, $mydomain

Es ist der Default, aber man sollte trotzdem überlegen, ob dies nicht
besser leer sein sollte. Subdomains von $mydestination werden so zu
relay_domains, und ohne relay_recipient_maps gibt es für relay_domains
keine Überprüfung auf gültige Adressen.

> relocated_maps = hash:/etc/postfix/relocated
> sample_directory = /usr/share/doc/packages/postfix/samples
> sender_canonical_maps = mysql:/etc/postfix/mysql-canonical.cf
> sendmail_path = /usr/sbin/sendmail
> setgid_group = maildrop
> smtp_connect_timeout = 15
> smtp_helo_timeout = 120
> smtpd_banner = $myhostname ESMTP Mailgateway Version: $mail_name 
> ($mail_version) - No Spammers!
> smtpd_client_restrictions =
> smtpd_etrn_restrictions = reject
> smtpd_hard_error_limit = 10
> smtpd_helo_required = yes
> smtpd_helo_restrictions =
> smtpd_junk_command_limit = 5
> smtpd_recipient_restrictions = reject_invalid_hostname, 
> reject_non_fqdn_recipient,  permit_mynetworks, 
> permit_sasl_authenticated, reject_unauth_destination, 
> reject_unknown_recipient_domain,  reject_unauth_pipelining, 
> reject_unauth_destination, reject_rbl_client blackholes.easynet.nl, 
> reject_rbl_client dynablock.easynet.nl,  reject_rbl_client dev.null.dk, 
> reject_rbl_client list.dsbl.org, reject_rbl_client bl.spamcop.net, 
> reject_rbl_client zombie.dnsbl.sorbs.net, reject_rbl_client 
> relays.ordb.org,  reject_rbl_client opm.blitzed.org, reject_rbl_client 
> list.dsbl.org, reject_rbl_client sbl.spamhaus.org

Du musst dringend deine RBLs aktualisieren! relays.ordb.org ist tot,
opm.blitzed.org ebenfalls. dynablock.easynet.nl ist ebenfalls hinüber, wie
ich gerade getestet habe.
Dies führt im besten Fall zu Verzögerungen, im schlimmsten Fall zu
Time-Outs und nicht angenommenen Mails.

In zen.spamhaus.org ist enthalten:
sbl.spamhaus.org
xbl.spamhaus.org
cbl.abuseat.org
opm.blitzed.org
dynalist.njabl.org

Bisher hat sich zen als sehr guter Kompromiss gezeigt zwischen Abblockrate
und false positives.

> smtpd_sasl_auth_enable = yes
> smtpd_sasl_local_domain =
> smtpd_sasl_security_options = noanonymous
> smtpd_sender_restrictions =
> smtpd_soft_error_limit = 5
> strict_rfc821_envelopes = no
> transport_maps = hash:/etc/postfix/transport
> unknown_local_recipient_reject_code = 550
> 
> master.cf
> 
> #
> # Postfix master process configuration file.  For details on the format
> # of the file, see the Postfix master(5) manual page.
> #
> # ==========================================================================
> # service type  private unpriv  chroot  wakeup  maxproc command + args
> #               (yes)   (yes)   (yes)   (never) (100)
> # ==========================================================================
> smtp      inet  n       -       n       -       -       smtpd

Ergänze diesen Eintrag und deaktiviere den unteren:
smtp      inet  n       -       n       -       -       smtpd
         -o content_filter=spamfilter:spamfilter

Dieser Eintrag ist so in Ordnung. Jetzt muss nur noch der content_filter
begrenzt werden.

> #submission inet n      -       n       -       -       smtpd
> #    -o smtpd_etrn_restrictions=reject
> #    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

Inzwischen ist "Best Practise", MUAs über den Submission Port (587)
verbinden zu lassen. Dies sichert eine rein für MUAs zur Verfügung
stehende Portzahl und funktioniert auch dann, wenn der User sich in einem
Netz aufhält, wo Port 25 ausgehend geblockt wird.

> #smtps    inet  n       -       n       -       -       smtpd -o 
> smtpd_tls_wrappermode=yes
> #  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
> #submission   inet    n       -       n       -       -       smtpd
> #  -o smtpd_etrn_restrictions=reject
> #  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
> #628      inet  n       -       n       -       -       qmqpd
> pickup    fifo  n       -       n       60      1       pickup
> cleanup   unix  n       -       n       -       0       cleanup
> qmgr      fifo  n       -       n       300     1       qmgr
> #qmgr     fifo  n       -       n       300     1       oqmgr
> #tlsmgr    unix  -       -       n       1000?   1       tlsmgr
> rewrite   unix  -       -       n       -       -       trivial-rewrite
> bounce    unix  -       -       n       -       0       bounce
> defer     unix  -       -       n       -       0       bounce
> trace     unix  -       -       n       -       0       bounce
> verify    unix  -       -       n       -       1       verify
> flush     unix  n       -       n       1000?   0       flush
> proxymap  unix  -       -       n       -       -       proxymap
> smtp      unix  -       -       n       -       -       smtp
> smtp      inet  n       -       n       -       -       smtpd
>         -o content_filter=spamfilter:spamfilter
> # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
> relay     unix  -       -       n       -       -       smtp
>     -o fallback_relay=
> #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
> showq     unix  n       -       n       -       -       showq
> error     unix  -       -       n       -       -       error
> discard   unix  -       -       n       -       -       discard
> local     unix  -       n       n       -       -       local
> virtual   unix  -       n       n       -       -       virtual
> lmtp      unix  -       -       n       -       -       lmtp
> anvil     unix  -       -       n       -       1       anvil
> #localhost:10025 inet    n    -    n    -    -    smtpd -o content_filter=
> scache      unix    -    -    n    -    1    scache
> #
> # ====================================================================
> # Interfaces to non-Postfix software. Be sure to examine the manual
> # pages of the non-Postfix software to find out what options it wants.
> #
> # Many of the following services use the Postfix pipe(8) delivery
> # agent.  See the pipe(8) man page for information about ${recipient}
> # and other message envelope options.
> # ====================================================================
> #
> # maildrop. See the Postfix MAILDROP_README file for details.
> # Also specify in main.cf: maildrop_destination_recipient_limit=1
> #
> maildrop  unix  -       n       n       -       -       pipe
>   flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
> cyrus      unix    -    n    n    -    -    pipe
> #  user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m 
> ${extension} ${user}
>  flags= user=cyrus argv=/usr/cyrus/bin/deliver -r ${sender} -m 
> ${extension} ${user}
> uucp      unix    -    n    n    -    -    pipe
>   flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail 
> ($recipient)
> ifmail    unix  -       n       n       -       -       pipe
>   flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
> bsmtp     unix  -       n       n       -       -       pipe
>   flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop 
> $recipient
> procmail  unix  -       n       n       -       -       pipe
>   flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc 
> ${sender} ${recipient}
> 
> spamfilter unix - n n - - pipe
>  flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} -- 
> ${recipient}
> 

spamfilter unix - n n - 20 pipe
	flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f 			${sender} --
	${recipient}

Hier muss dann die Begrenzung auf 20 Prozesse stattfinden.


> Sandy Drobic schrieb:
>> Die Option, wie der content_filter eingebunden ist, sollte auf 20 Prozesse
>> beschränkt sein, aber nicht der smtpd, der die Mail entgegennimmt.
>>   
> Genau so sollte es sein, nur weiß ich nicht, wie es umgesetzt wird.
>> Zeige mal die Ausgabe von "postconf -n" und die master.cf.
>>   
> Nochmals Danke & Grüße
> 


-- 
Sandy

Antworten bitte nur in die Mailingliste!
PMs bitte an: news-reply2 (@) japantest (.) homelinux (.) com




Mehr Informationen über die Mailingliste Postfixbuch-users