LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-26-2003, 09:41 AM   #1
aBl_tR3kr
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Rep: Reputation: 0
Unhappy 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"
}
}

}
 
  


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 - Software 1 03-26-2003 10:15 AM
procmail and formail aBl_tR3kr Linux - Networking 1 03-26-2003 10:02 AM


All times are GMT -5. The time now is 05:33 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration