10 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Maildrop problem
FromSent OnAttachments
Jérôme BlionMay 17, 2007 3:30 pm 
Jeff JansenMay 17, 2007 8:44 pm 
Jérôme BlionMay 18, 2007 4:33 am 
Aldisa AdminMay 18, 2007 5:49 am 
Jérôme BlionMay 18, 2007 6:22 am 
Alessandro VeselyMay 18, 2007 8:40 am 
moussMay 18, 2007 3:03 pm 
Jérôme BlionMay 18, 2007 7:30 pm 
Sam VarshavchikMay 18, 2007 8:21 pm 
Jérôme BlionMay 19, 2007 5:50 am 
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: [courier-users] Maildrop problemActions...
From:Alessandro Vesely (ves@tana.it)
Date:May 18, 2007 8:40:16 am
List:net.sourceforge.lists.courier-users

Jérôme Blion wrote:

if( /^X-Virus-Status: INFECTED/:h ) { `echo "INFECTE" > /tmp/maildrop/virus` exit }

- I don't want viruses to be delivered ! I want correct mails to be delivered. - Is it mandatory to have a "to" instruction at the end of the maildroprc? - The biggest problem I see is that my Regexp is matched whereas in this case, this should not. So, there is something wrong in my regexp... But I don't see where is the error.

Removing just the "exit" should deliver the message that matched your "X-Virus-Status". Next you have two choices:

1) Remove just the "exit" instruction so that the message gets delivered. Check the timestamp of /tmp/maildrop/virus and the delivered message. The header isn't there? Try capturing it, e.g.,

if( /^(X-Virus-Status: INFECTED.*)/:h ) { `echo "$MATCH" > /tmp/maildrop/virus` }

2) Run maildrop in verbose mode, see http://www.courier-mta.org/maildrop.html you can log in as courier or run, e.g.,

su -c 'cat mymsg | maildrop -V 7 fifi' courier

where fifi is maildrop's recipe, mymsg is the message file, and courier is the owner of fifi.

Either choice should bring evidence about what matches your regex.