Procmail : Cat from External File
Hi guys,
i would like know how the procmail can cat an external file for checking whether the string pattern is same with the content of the external file .... for example like : :0 * ^Subject:. cat external_file /dev/null i have tried like : myfile=`cat /var/block` :0 * ^Subject:.*${myfile} /dev/null but it didn't work .... anyone know whats wrong?? Thanks |
Why not use fgrep?
|
Can u teach how to do it UnSpawn??
Thanks |
myfile=`cat /var/block`
If you want to do that you're almost always doing some sort of rudimentary access list or spam filtering in which case you better look at Spamassassin unless constant reinvention of wheel is your thing. Anyway. Here's an extremely simplified example to do filtering based on email addresses. Start by echoing email addresses into a list (use some test addresses if you're gonna do this for real, OK): Code:
]$ echo "emai@addre.ss > ~/.procmail/allowlist" Code:
VERBOSE=on Code:
# Recipe: route email to named mailbox "~/mail/allow" Please read the procmail and grep man pages for more info. |
All times are GMT -5. The time now is 06:52 PM. |