Postfix
ISH Konfiguration
Siehe mein Posting bei Fedoraforum.de.
Mit TLS und CRAM-MD5
relayhost = smtp.ish.de smtp_sasl_auth_enable = yes smtp_use_tls = yes smtp_sasl_security_options = noanonymous smtp_sasl_mechanism_filter = cram-md5
Ohne TLS , PLAIN/LOGIN
relayhost = smtp.ish.de smtp_sasl_auth_enable = yes smtp_use_tls = no smtp_sasl_security_options = noanonymous smtp_sasl_mechanism_filter = plain,login,cram-md5
SpamAssassin Integration
Siehe Anleitung hier.
Zusammenfassung der Schritte
- Spamassassins von openSUSE verwenden
- User und Gruppe filter angelegt mit $HOME=/home/filter
- Datei /home/filter/sc/filter.sh angelegt mit 755 Permissions und filter:filter Owner. Dateininhalt:
#!/bin/sh INSPECT_DIR=/var/spool/filter SENDMAIL=/usr/sbin/sendmail SPAMASSASSIN=/usr/bin/spamc # Exit codes from <sysexits.h> EX_TEMPFAIL=75 EX_UNAVAILABLE=69 cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; } # Clean up when done or when aborting. trap "rm -f in.$$; rm -f out.$$" 0 1 2 3 15 # Parameter for $SPAMASSASSIN # -P Pipe message, don't deliver # -x Disable user config files # -a Use auto-whitelists cat | $SPAMASSASSIN > out.$$ || { echo Message content rejected; exit $EX_UNAVAILABLE; } $SENDMAIL -i "$@" < out.$$ exit $?
- /etc/mail/spamassassin/local.cf angelegt mit Inhalt:
required_score 4.0 rewrite_header Subject ****SPAM(_SCORE_)**** report_safe 1 use_bayes 1 skip_rbl_checks 0 use_razor2 1 use_dcc 1 use_pyzor 1 ok_locales en bayes_auto_learn 1 # SUSE default ifplugin Mail::SpamAssassin::Plugin::URIDNSBL uridnsbl_skip_domain suse.de opensuse.org suse.com suse.org uridnsbl_skip_domain novell.com novell.org novell.ru novell.de novell.hu novell.co.uk endif # Mail::SpamAssassin::Plugin::URIDNSBL
- spamd starten und in runlevel setzen:
/etc/init.d/spamd start insserv spamd
- Postfix master.cf anpassen:
smtp inet n - n - - smtpd -o content_filter=filter: ... ... # SPAMASSASIN filter unix - n n - - pipe user=filter argv=/home/filter/sc/filter.sh -f ${sender} -- ${recipient}
- Auto-Update der Bayes-Filter in /etc/cron.daily/spamassassins-update
#!/bin/sh /usr/bin/sa-update --channel updates.spamassassin.org
- Spamassassin-Installation überprüfen:
spamassassin -D --lint
- Sieve-Filter für SPAM-Emails einrichten, siehe auch Dovecot, z.B.
require "fileinto"; if exists "X-Spam-Flag" { fileinto "SPAM"; }