[Mimedefang] TESTVIRUS.org - test question

Dirk Mueller dmuell at gmx.net
Sat Feb 28 18:09:13 EST 2004


On Saturday 28 February 2004 23:09, Rob wrote:

> clamd you can enable the scanning of mail files as a default, so if it
> detects the magic word at the start of the file it'll know what it is.

I've added this code to 

message_contains_virus_clamd():

    # copy message for clamd
    open(I, "<INPUTMSG");
    open(O, ">Work/COMPLETE_MSG");
    # give ClamAV the hint to treat it as mbox, otherwise
    # it doesn't detect all the inline files.
    print O "From foo\@bar.com 1 Jan 2004\r\n";
    while(<I>) {
      print O;
    }
    close(I);close(O);

which is great for detecting attachments in MIME-broken emails (like 
qmail-send bounces). those otherwise slip by ClamAV (the same needs to be
done for the non-daemon version of ClamAV checking, but I don't use that 
code). 



More information about the MIMEDefang mailing list