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=<[EMAIL
> PROTECTED]>,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
> <[EMAIL PROTECTED]> 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=<[EMAIL
> PROTECTED]>,autolearn=ham
> May 18 00:27:12 serveur courierlocal:
> id=00248588.464CD6C0.00005EC8,from=<[EMAIL PROTECTED]>,addr=<[EMAIL
> PROTECTED]>,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? :)
>
> Jerome Blion.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> courier-users mailing list
> [email protected]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users