On 11 Mar 02, Vaibhav Gupta (vaibhavatmtss(_at_)indiainfo(_dot_)com) wrote:
Hi,
I am facing a problem. Could anybody help me in resolving this
problem.
Is there any recepie available by which I can read the attachments of
the mail and check if it is prono or illegal (on the basis of header
of the attachement) then forward that mail to one
admin(_at_)mydomain(_dot_)com
account instead of delivering it to the concerned user.
You can (at the very least) get the MIME type of the attachment and its
filename. You may need the B switch on procmail to do this.
If the attachment is basically ASCII, you can egrep it within procmail by
using the B switch, it's then a matter of defining patterns which may
indicate pornographic or illegal content.
My attempt - I'm sure the list will correct me :)
:0 B
* Content-Type: multipart/mixed
* (name|filename)=.*exe$|\
some words which may match illegal content...
!admin(_at_)mydomain(_dot_)com
One more help I need . Can you please tell me where to put .procmailrc
file. Is it common for all users or different for each user.
Both :) There's /etc/procmailrc which is common to all users and
a ~/.procmailrc for each user.
--
Stephen Patterson http://www.lexx.uklinux.net/
steve(_at_)lexx(_dot_)uklinux(_dot_)net(_dot_)SPAM (remove spam to reply)
ICBM address 54-22-0N 0-28-0W Linux Counter No: 142831
GPG Public key: 252B8B37 available on public keyservers.
pgpnkTotnCfCi.pgp
Description: PGP signature