Well, it's almost complete now. It works but I think I might have to
tweak it.
# If the recipient is NOT in the recipient whitelist,
# AND the sender contains a string from BLACKLIST, treat
# as junk. This is predominantly to detect "joe jobbing"
:0
* ^X-Original-To:["$WS"]*\/.*
* $! ? grep -i -x $MATCH $RCPT_WHITELIST
{
:0:
_CLEAN_FROM_USER=|formail -IReply-To: -rtzxTo: | awk -F@ '{print $1}'
* $? echo '$CLEAN_FROM_USER' | grep \"`grep -v '^[$WS]*$'
$FROM_BLACKLIST`\"
$FROMJUNK
}
1.
Is it arranged correctly?
2.
It complains:
Couldn't determine implicit lockfile from "formail -IReply-To: -rtzxTo:
| awk -F@ '{print $1}'"
Should I be specifying a manual lockfile here, or is it because my
layout isn't optimal?
3.
I could replace: grep -v '^[$WS]*$' $FROM_BLACKLIST
with: sed '/^[$WS]*$/d' $FROM_BLACKLIST
With a file of 5,000 lines, grep was a fair bit quicker. Have I
answered my own question?
Many thanks,
Steve :)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail