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:mouss (mlis@free.fr)
Date:May 18, 2007 3:03:02 pm
List:net.sourceforge.lists.courier-users

Jérôme Blion wrote:

Hello,

I'm trying to use maildrop to scan my mails. To test it, I send a mail using: echo "Hello world" | mail jerome Here is the content of my maildroprc:

SCANSIZE="200000000"

if( $SIZE < $SCANSIZE ) { exception { xfilter "/usr/lib/courier/bin/clamdscan.sh" xfilter "/usr/bin/spamc" } }

you should guard against infinite loops: do not filter an already filtered message. do this by adding a specific header and checking for its presence here (but tell your MTA to reject such messages if the header was faked...).

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

My mails are scanned:

May 18 00:27:12 serveur courierd: newmsg,id=00248588.464CD6C0.00005EC8: dns; localhost (localhost [127.0.0.1]) May 18 00:27:12 serveur courierd: started,id=00248588.464CD6C0.00005EC8,from=<ro@hebergement-pro.org>,module=local,host=jerome!!1!1!/home/courier/domains/hebergement-pro.org/jerome!/home/courier/domains/hebergement-pro.org/jerome/Maildir!,addr=<jerome> May 18 00:27:12 serveur courierd: Waiting. shutdown time=none, wakeup time=none, queuedelivering=1, inprogress=1 May 18 00:27:12 serveur spamd[32171]: spamd: connection from serveur [127.0.0.1] at port 57035 May 18 00:27:12 serveur spamd[32171]: spamd: setuid to daemon succeeded May 18 00:27:12 serveur spamd[32171]: spamd: processing message <cour@serveur.hebergement-pro.org> for daemon:1 May 18 00:27:12 serveur spamd[32171]: spamd: clean message (-0.1/5.0) for daemon:1 in 0.2 seconds, 587 bytes. May 18 00:27:12 serveur spamd[32171]: spamd: result: . 0 - ALL_TRUSTED,MISSING_SUBJECT scantime=0.2,size=587,user=daemon,uid=1,required_score=5.0,rhost=serveur,raddr=127.0.0.1,rport=57035,mid=<cour@serveur.hebergement-pro.org>,autolearn=ham May 18 00:27:12 serveur courierlocal: id=00248588.464CD6C0.00005EC8,from=<ro@hebergement-pro.org>,addr=<jer@hebergement-pro.org>,size=484,success: Message delivered. May 18 00:27:12 serveur courierd: completed,id=00248588.464CD6C0.00005EC8 May 18 00:27:12 serveur courierd: Waiting. shutdown time=Thu May 31 23:28:15 2007, wakeup time=Thu May 31 23:28:15 2007, queuedelivering=0, inprogress=0 May 18 00:27:12 serveur spamd[32058]: prefork: child states: II

BUT...

# ls -l /tmp/maildrop/virus -rw-rw---- 1 daemon daemon 8 May 18 00:27 /tmp/maildrop/virus

My mail is dropped. If I remove the if block (and all its content), everything is OK, I can receive my mails and headers are just fine (no spam, no virus)

I don't see where I'm wrong. Can someone open my eyes? :)