procmail
[Top] [All Lists]

Attachment filtering (newbie -ish!)

2002-07-08 07:52:07
Dear All,
I'm a relative newbie to procmail and was wondering if anyone could help me.
What I am trying to do (as I hope will be self evident) is filter out
various attachments such as .vbs files. Below is my procmailrc file located
in etc. I installed procmail with setuid so this should be in /etc (right?).
I've also created a .forward file in the /home directory and chmod 644ed it.
To start procmail at boot I've written a little script in xinetd.d that just
says (n a nutshell) /usr/bin/procmail /etc/procmailrc. However when the
server is booted the messages file tells me 'Service procmail missing
attribute server'. I then check to see if procmail is running and it appears
that it ain't. If I start it manually from the command line (procmail
/etc/procmailrc &) and then test it by sending a .vbs attachment it doesn't
work (ie. the attachment gets thru.) I've attached the .forward file to this
mail.

Any help would be massively appreciated.
Other details. I am using postfix, and ipop3d at present (hence - I think,
the .forward file).
Cheers in advance
Si

MAILDIR=$HOME/mail
LOGFILE=procmail.log
VERBOSE=1
:0 B
* ^Content-Disposition: attachment;
* filename=".*\.vbs"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.vbs\)"/\1.txt"/'

     :0 c
     /var/log/VBSattachments.txt
}

:0 B
* ^Content-Disposition: attachment;
* filename=".*\.exe"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.exe\)"/\1.txt"/'

     :0 c
     /var/log/EXEattachments.txt

:0 B
* ^Content-Disposition: attachment;
* filename=".*\.bat"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.bat\)"/\1.txt"/'

     :0 c
     /var/log/BATattachments.txt

:0 B
* ^Content-Disposition: attachment;
* filename=".*\.pif"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.pif\)"/\1.txt"/'

     :0 c
     /var/log/PIFattachments.txt

:0 B
* ^Content-Disposition: attachment;
* filename=".*\.scr"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.scr\)"/\1.txt"/'

     :0 c
     /var/log/SCRattachments.txt

:0 B
* ^Content-Disposition: attachment;
* filename=".*\.com"
{
     :0 fbw
     |/bin/sed -e 's/\(name=".*\.com\)"/\1.txt"/'

     :0 c
     /var/log/COMattachments.txt
Simon Powell (Network Manager)
Interesource Ltd.
4th Floor,Royex House
Aldermanbury Square
London
EC2V 7HR

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>