bin mir sicher dass es kein großes problem ist aber irgendwo übersehe ich was ;)
postfix leitet bei mir zuerst die mail an spamassassin, ein plugin tunnelt das zu clamav und dann geht das ganze mit modified header weiter zu meinem procmailscrpt. bis jetzt hab ich es nur ausliefern lassen, möchte nun aber alle spammails und virenmails ein ein eigenes postfach kapseln (zum vereinfachten spamlernen, zum schützen der user dass die keinen spam / viren kriegen).
soweit zur theorie, hier mein script:
Code: Select all
DROPPRIVS=YES
LOGFILE=/data/logs/procmail
SHELL=/bin/sh
:0 fw
* < 256000
| /usr/bin/spamc -f
# Mails with a virus are moved into our secure directory
:0
* ^X-Spam-Virus: Yes
/data/mail/web0p3/.maildir/
# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "probably-spam".
:0
* ^X-Spam-Status: Yes
/data/mail/web0p3/.maildir/
# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0 H
* ! ^From[ ]
* ^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e 's/^rom /From /'
}
Code: Select all
procmail: Unable to treat as directory "/data/mail/web0p3/.maildir/new"
procmail: Skipped "/data/mail/web0p3/.maildir"
From jl@pics.co.at Tue Aug 29 16:09:12 2006
Subject: WG: eeest
Folder: /data/mail/web0p1/.maildir/new/1156860553.14408_0.TSwebserve 16253
also bitte um vorschläge :)