Can someone please explain why the following doesn't work?
I am trying to white list email from some domains ( I know, not the best
way to do it, but after I scan for virus and other things, I have to
white list based on some domains), and here is what I am trying to do.
Looking at some of the recommendations here
http://www.professional.org/procmail/sandbox.html (Thank you Sean)
I have done the following.
# Get the From: address as an address component only
:0 h
CLEANFROM=|formail -IReply-To: -rtzxTo:
# Get the domain portion
:0
* CLEANFROM ?? @\/.*
{
FROM_DOMAIN=$MATCH
}
# Now that we have the domain of the sender test it against a list of
#domains, domainwhitelist
:0
* FROM_DOMAIN ?? $FGREP -iqf $domainwhitelist
{
LOG="Sender is from a whitelisted domain :$FROM_DOMAIN$NL"
:0:
FromWhitelistedDomain
}
distancelearn.org exists in my domainwhitelist
Now running this in a sandbox, I get the following in the logs.
procmail: Assigning "CLEANFROM="
procmail: Executing "formail,-IReply-To:,-rtzxTo:"
procmail: Assigning "MATCH="
procmail: Matched "distancelearn.org"
procmail: Match on "@\/.*"
procmail: Assigning "FROM_DOMAIN=distancelearn.org"
procmail: No match on "FGREP -iqf distancelearn.org domainwhitelist"
procmail: Locking "/var/spool/mail/root2.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/multimediafan"
procmail: Opening "/var/spool/mail/root2"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/root2.lock"
From test(_at_)distancelearn(_dot_)org Wed Jun 9 04:39:59 2004
Subject: Test Message For Procmail
Folder: /var/spool/mail/multimediafan
2328
I know that I may be overlooking something basic, but I am honeslty
unable to find it.
Your help, as always, will be appreciated.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail