procmail
[Top] [All Lists]

Recipe to filter zip attachments by filesize

2005-05-11 13:52:26
My goal is to filter all zip attachments under "X" size to a quarantine folder 
or to drop to a quarantine email address.. After searching below is my best 
guess of what the recipe would be. It is also unclear to me if the recipe needs 
to be placed at the top, middle, bottom of file for it to function properly.  
Thanks for any advice. --Bryan

Would this be the accurate code lines for quarantine to switch from file or 
email account.
/home/mail/virus       (to file)
| /usr/local/bin/stdin2smtp.pl "$SENDER" spamaccount(_at_)domain(_dot_)com (to 
email)

 
#### Would the new procmailrc file look like this??:
SENDER = "<$1>"
SHIFT = 1
 
:0 fw
* < 256000
| /usr/bin/spamc
 
:0 B
* > 3000
* < 40000
* name=*\.zip
/home/mail/virus

:0:
* ^Subject:.* SPAM
| /usr/local/bin/stdin2smtp.pl "$SENDER" spamaccount(_at_)domain(_dot_)com
 
:0
| /usr/local/bin/stdin2smtp.pl "$SENDER" "$@"

####My Current file procmailrc file before update:
 
SENDER = "<$1>"
SHIFT = 1
 
:0 fw
* < 256000
| /usr/bin/spamc
 
:0:
* ^Subject:.* SPAM
| /usr/local/bin/stdin2smtp.pl "$SENDER" spamaccount(_at_)domain(_dot_)com
 
:0
| /usr/local/bin/stdin2smtp.pl "$SENDER" "$@"
-------------------------------------------------

This email transmission and any documents, files or previous

email messages attached to it may contain information that is

confidential or legally privileged. If you are not the intended

recipient, you are hereby notified that any disclosure, copying,

printing, distributing or use of this transmission is strictly

prohibited. If you have received this transmission in error,

please immediately notify the sender by telephone or return

email and delete the original transmission and its attachments

without reading or saving in any manner.



The Evangelical Lutheran Good Samaritan Society.

---------------------------------------------------------
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>