procmail
[Top] [All Lists]

clamavd & procmail

2004-03-03 04:54:52
Hello

I have one problem with procmail that I can't solve and can't find
information about how it can be solved. Also I am not very experienced with
procmail, so please excuse me for a question possible from FAQ or smth.


I have clamdmail  program installed and functioning. It scans mail for
viruses via clamd daemon. If virus is not found, so it  add this information
into the mail :

X-Virus-Scan: Scanned by clamdmail 0.14 on rs6k (no viruses);
  Wed, 03 Mar 2004 12:41:20 WET

If virus was found original email is stored in quarantine and warning email
is generated by clamdmail instead of original email (it changes both headers
and body completely).

I have this rule in /etc/procmailrc :

:0 fw
|
/usr/local/clamav/bin/clamdmail --admin=postmaster --mta=/usr/local/clamav/b
in/sendmail --quar=/var/spool/quarantine/

And this rule is working fine when email without virus arrives. But if virus
is detected (I know this because I am getting mail from clamdmail into
postmaster's mailbox and also message is stored in /var/spool/quarantine/)
then email is arriving into mailbox as it is - no "X-Virus-Scan:" line at
all is seen inside message headers, while there must be at least information
what virus was found in X-Virus-Scan tag.

I think, that procmail somehow ignores email returned by clamdmail and
reverts back to original file in case when virus is detected (and original
email is replaced by clamdmail generated).

I also tried several various options, like "fW", "fbhiW". Also I tried to
forward email via formail :

:0 fw
|
/usr/local/clamav/bin/clamdmail --admin=postmaster --mta=/usr/local/clamav/b
in/sendmail --quar=/var/spool/quarantine/ | /usr/local/procmail/bin/formail

This would work fine ! But  formail is commenting line "From ...." even
if -b option is appended and message appear in mailbox file in wrong format.

What I am doing wrong here ? I suppose there must be method to configure
procmail in right way, when clamdmail is doing right job when I test it
manually ?

Thank you for your kind help.



With best regards
Martynas


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>