# Procmail LOGFILE="/var/log/procmail" VERBOSE=off DELIVERMAIL="/usr/lib/cyrus/deliver" DAEMON="MAILER-DAEMON@mail.postfix-howto.de" SENDMAIL="/usr/sbin/sendmail -i -f \ MAILER-DAEMON\@mail.postfix-howto.de -t $SENDER" # Mailbox-Zustellung INBOX="$DELIVERMAIL -f $SENDER -a $USER $USER" # Grundsaetzlich pruefen! CHECK = 1 # Check :0 * $CHECK ?? 1 { :0fw * < 110000 | /usr/bin/spamc -u filter # Wann soll die Mail noch durch den Virenscanner? :0 * ^X-Spam-Status: No .*$ { :0fw * > 8000 | /usr/bin/clamassassin } } # Viren bitte ab in die Tonne :0w * ^X-Virus-Status: Yes /dev/null :0 e { EXITCODE=$? :0 w * EXITCODE ?? [75] { REC=`formail -zx"To:"` EXITCODE=0 :0 * ^X-Loop: bounce@postfix-howto.de /dev/null :0 | formail -rk -I"Subject: Mail delivery \ failed for user: $USER (MailAdr: $REC)" \ -A"FROM: $DAEMON" -A"Precedence: junk" \ -A"X-Loop: bounce@postfix-howto.de" | $SENDMAIL } } # an INBOX zustellen :0w | $INBOX HOST