LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Closed Thread
 
Search this Thread
Old 03-26-2003, 04:10 AM   #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, 11:02 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
//mod.note, you've triple-crossposted: see http://www.linuxquestions.org/questi...threadid=51721
and http://www.linuxquestions.org/questi...threadid=51848.

Don't do that. Thread closed.
 
  


Closed Thread


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 - Software 1 03-26-2003 11:15 AM
procmail and formail aBl_tR3kr Linux - Newbie 0 03-26-2003 10:41 AM


All times are GMT -5. The time now is 09:34 AM.

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