procmail
[Top] [All Lists]

Re: NEED TO SEPARATE (SPECIFIC) ATTACHMENTS

2000-12-13 17:46:38
I must be doing something wrong -- it didn't work; I used:

VERBOSE=on
LOGFILE=/etc/.procmail-log

* 
9876543210^0
^Content-[-a-z0-9_]+:.*="?[^"]*\.(vb[se]|ws[fh]|hta|shs|exe)
* 9876543210^0 B ?? 
^Content-[-a-z0-9_]+:.*($[  ].*)*="?[^"]*\.(vb[se]|exe|ws[fh]|h$
/dump                     /\
                          ||
Did you mean to put the SPACE+TAB here??? What am I missing? Thanx...

...Dave

---

On Wed, 13 Dec 2000, Stephen Mawdsley wrote:

At 03:23 PM 12/13/2000, you wrote:
I would like to filter out attachments with 'exe' & 'vbs' extensions (for
obvious reasons), and dump them into a directory elsewhere on the mail
server. Does anyone have any ideas on what I should put in the
'.procmailrc' file?

I would also like to make this feature global for the entire server -- for
all user accounts. Would I place the '.procmailrc' file in the '/etc'
directory? Thank You!

Greetings Dave,

The following regexp will block exe's and executable script files:
(note that between the $[  ] in the second line is a SPACE+TAB)

* 
9876543210^0      ^Content-[-a-z0-9_]+:.*="?[^"]*\.(vb[se]|ws[fh]|hta|shs|exe)
* 9876543210^0 B ?? 
^Content-[-a-z0-9_]+:.*($[  ].*)*="?[^"]*\.(vb[se]|exe|ws[fh]|h$

Then, at then end of your recipe, have it sent to:

Blocked.mail (or whatever you want)

To apply the recipe globally, rename the ".procmailrc" file to just 
"procmailrc" and place it in the "/etc" directory.  Hope this helps.

Regards,
Stephen 



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