LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-25-2003, 04:35 PM   #1
aBl_tR3kr
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

aBl_tR3kr



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

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

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

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

}
 
Old 03-26-2003, 10:15 AM   #2
mcleodnine
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????
 
  


Reply


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 09:29 AM
formail with procmail priyesh Programming 2 10-22-2003 11:01 PM
procmail formail anonymous re-mailer for my very expensive two-way pager? jgilels Linux - Software 11 07-04-2003 09:44 AM
procmail and formail aBl_tR3kr Linux - Networking 1 03-26-2003 10:02 AM
procmail and formail aBl_tR3kr Linux - Newbie 0 03-26-2003 09:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:43 PM.

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