Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-25-2003, 05:35 PM   #1
LQ Newbie
Registered: Mar 2003
Posts: 4

Rep: Reputation: 0
Procmail and formail

I am using the following script to filter dangerous email attachments. However when i send an internal email with an exe attached it is not picked up (i.e. not flagged up in the subject of the message when within mutt). I believe the problem lies with formail but am not sure. I use mutt to read my mail. Please help. Thanks in advance


* ^Content-Type: multipart/
# Look for attachments with .something.{com,exe,pif,bat,scr} extensions
* Content-Type: .*/.*;(.*$)?([ ].*$)*[ ]*name[ ]*=.*\/\..*\.(com|exe|pif|bat|scr)
* DOUBLE_EXT ?? ^\/[^"]+

| formail -A "X-Reject: (100) Likely virus - $DOUBLE_EXT extension on attachment"

# Look for attachments with .{com,exe,pif,bat,scr} extensions
* ^Content-Type: .*/.*;(.*$)?([ ].*$)*[ ]*name[ ]*=.*\/\.(com|exe|pif|bat|scr)
* EXT ?? ^\/[^"]+
{ EXT=${MATCH} }

| formail -A "X-Reject: (100) Likely virus - executable $EXT attachment"

Old 03-26-2003, 11:15 AM   #2
Senior Member
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
* Triple * posting????


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
formail fails on virtual user [qmail,vpopmail,procmail,formail] jonavogt Linux - Networking 2 01-15-2009 10:29 AM
formail with procmail priyesh Programming 2 10-23-2003 12:01 AM
procmail formail anonymous re-mailer for my very expensive two-way pager? jgilels Linux - Software 11 07-04-2003 10:44 AM
procmail and formail aBl_tR3kr Linux - Networking 1 03-26-2003 11:02 AM
procmail and formail aBl_tR3kr Linux - Newbie 0 03-26-2003 10:41 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration