8 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] filter attached files...
FromSent OnAttachments
joelDec 17, 2001 4:20 am 
Charlie WattsDec 17, 2001 4:58 am 
joelDec 17, 2001 11:14 am 
Charlie WattsDec 17, 2001 11:19 am 
Dan MelomedmanDec 17, 2001 11:29 am 
joelDec 17, 2001 11:39 am 
Sam VarshavchikDec 17, 2001 2:26 pm 
Dan MelomedmanDec 17, 2001 2:34 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] filter attached files i.e.: .exe, .bat ...Actions...
From:joel (jo@telecorp.com.br)
Date:Dec 17, 2001 11:14:40 am
List:net.sourceforge.lists.courier-maildrop

if ( /^[:space:]+filename=.*\.(vbs|exe|com|bat)\"$/:b ) { /^Subject: !.*/ MATCH2=escape($MATCH2) xfilter "$REFORMAIL -I'Subject: [ALERT: ATTACHMENT] $MATCH2'" }

Unfortunatelly your last tip didn't work as I needed. Let me explain this a little bit more.

I have a freebsd + qmail + amavis I'm tring to block e-mails that has attached some file types.

At moment my filter is the following:

if (/^Content-Type:.TEXT*/) { to ./Maildir/test } else to ./Maildir/

It works fine if the e-mail is text/plain written and just have this single file attached. If the e-mail was written using HTML (argh), maildrop gets confuse and can't find the file attached.

I noticed that the problem could be something related to the quantity of files attached. My filter is looking for the mime-type only in the first occurrency of attached files in the e-mail. If the first occurrency of "Content-Type" string is not what I'm looking for, it aborts the execution and give up.

Any idea of why and how can I fix it?

Exemplo: 1----------------------------------------------------------: