----- Original Message ----- 
From: "Tom Walsh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 21, 2004 8:37 PM
Subject: RE: [Clamav-users] Maildrop core dump and clamd


> > Since a couple of days I'm using clamd/clamdscan on an OpenBSD
> > (snapshot/i386) machine. Clamd is started at boot time and
> > clamdscan is being used by means of a maildrop filter... if
> > (`/usr/local/bin/clamdscan --mbox --disable-summary  --stdout
> > - | grep -c 'FOUND'` == 1) {
> >     to "$DEFAULT/.SPAM-VIRUS"
> >  }
> >
> > As can be seen every mail is being tested by clamdscan and
> > every output is being scanned on the string 'FOUND'. If this
> > string is found the mail is being send to a maildir named
> > 'SPAM-VIRUS'. At the moment I'm experiencing two problems:
>
> Not entirely relevant to the questions you asked... But why not (instead
> of grepping the entire file), just check the exit code of clamdscan?
>
> 0 == clean
> 1 == infected
>
> (`/usr/local/bin/clamdscan --mbox --disable-summary  --stdout -; EXIT =
> $?` $EXIT == 1) { to $DEFAULT/.SPAM-VIRUS"  }
>
> Just something I noticed and could help speed things up a little bit.
>
> Tom Walsh
> Network Administrator
> http://www.ala.net/



Thanks for the suggestion! There is just one little problem....In deliver
mode, maildrop will not import variables from the enviroment. This means
that $EXIT is empty.



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users

Reply via email to