Aliases xFrom address restriction
Aliases xFrom address restriction
2006-09-01 20:03:54 GMT
Hi,
I need /etc/procmailrc to restrict "From" mail coming to different aliases by searching at a common whitelist file.
If the email "To" address is HQ_employee <at> domain.com , compare the mail "From" address matching pattern with a common "whitelist" file. i.e eg:/etc/procmail/whitelist
----whitelist file content may be like this---------
HQ_employee: jack, michael, nicholas, freddy, aysha
mgmnt: michael, nicholas
dc: steav, jonnathan, flemming
----------------------------------------------------
If anyone can help me to find the solution to this procmail scripting, it would be very helpfull for me.
Thank you.
attch: part of procmail file, but it cannot check specific pattern
Regards
--Jasim
Part of existing procmail file
-----------------------------
#--------Rules to discard, if not in whitelist------------
FROM=`formail -XFrom: | formail -r -xTo: | tr -d ' '`
:0
* ^To.*all_HQ
* ! ? grep -F -i -x -q "$FROM" /etc/procmail/whitelist
/etc/procmail/unknown-sender
------------------------------------------------------------
____________________________________________________________ procmail mailing list Procmail homepage: http://www.procmail.org/ procmail <at> lists.RWTH-Aachen.DE http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
RSS Feed