Sorry to pester, but I'm still stuck here... Does anyone have any
suggestions?
Thanks,
Charles
Hi,
I'm using clamd-stream-client to identify viruses. So far this little
snippet is working well:
if ( $SIZE < 262144 )
{
VIRUS=`/usr/local/bin/clamd-stream-client -t 6 -d clamd.local`
log $RETURNCODE
log $VIRUS
if ($RETURNCODE == 65)
{
`test -d ./Maildir/.Virus`
if( $RETURNCODE != 0 )
{
log "= CREATING VIRUSDIR"
`maildirmake -f Virus ./Maildir`
log "= SUBSCRIBING VIRUSDIR"
`echo INBOX.Virus >> ./Maildir/courierimapsubscribed`
}
to $VDIR/Maildir/.Virus
}
}
As you can see, I use the returncode to determine if I've got a virus or not.
The clamd-stream-client program spits out the name of the virus if it detects
one on fd 1 (STDOUT). From reading the maildrop docs, the line:
VIRUS=`/usr/local/bin/clamd-stream-client -t 6 -d clamd.local`
should put the output of the command (the virus name) in $VIRUS. However the
log always shows that variable as empty.
What am I missing? I'd really love to have that info so I can log it, or add
it to the headers or something...
Thanks,