-
Webseiten Hosting/Server Referenzen Kontakt/Impressum

How to check mails with Postfix (SASL/SSL), Anomy Sanitizer and Spamassassin with inbound-detection

<< Back to overview / Zurück zur Übersicht

Note: This information was written in the year 2005 - so it may be outdated!
The idea: Postfix has no seperated in- and outbound-queues. So we need to take care that only inbound-mail is scanned with anomy-sanatizer, otherwise it is possible that outgoing mails are sanatized, which is mostly unwanted. The trick is done by scanning the Received-header. If the mail was sent through our secure SMTP (TLSv1 or TLSv2), the Anomy-Sanatizer will not be activated.
This is my /etc/procmailrc - it should show how I done it:
#LOGFILE=/tmp/procmail.log
#VERBOSE=yes

SENDER=$1
SHIFT=1

# Calling the anomy sanitizer
# Don't scan mail that was sent by a local user via secure SMTP (TLSv1 or v2)

ANOMY=/usr/local/anomy/
:0 fw
* ! ^Received: from.*(using TLSv*
| /usr/local/anomy/bin/sanitizer.pl /etc/mail/sanitizer.cfg

# Calling spamassassin

:0 hbfw
| /usr/bin/spamassassin -P

# Now mail is tagged by spamassassin and anomy
# You may insert other rules here

:0
| /usr/sbin/sendmail -i -f "$SENDER" -- "$@"



Seite zuletzt geändert am: 23.01.2019