i’ve finally gotten the antivirus stuff to go. there were some things that kinda messed me up for a little bit, but we got those straightened out. the worst of all of them was the eicar test string. it really doesn’t match unless it is in a file! i spent hours trying to figure out why my test messages all got scanned negative for viruses when they had the eicar string in them. it is because i wan’t mime encoding the eicar string, i was only pasting it directly into the email. i guess i need to sleep more.
anyhow, we had a long chat on irc about what should happen with the antivirus scanning. what should the agent do and what shouldn’t it do. the commit i just made (r84) works against clamd. i’ve tested it localhost only not a remote clam, but i think it will work ok ( i just don’t have a remote clam to play with ). this version doesn’t have all the cool connection pooling stuff that i want to add, nor am i sure that it will work against any other scanners. the current store configuration document enables clamd by default and enables notifying the recipient that a virus was sent (this code will probably disappear). i debated doing that stuff before committing this, but decided against it for several reasons.
- i was 3 days late getting it done for m2
- we talked a little about adding something like milter support to smtp so that we can do antispam and antivirus at smtp time instead of letting the message hit the queue. even if we don’t do that i’d like to allow for smtp time scanning perhaps via a library or something ( i’m just rambling here ).
- it is 2:30 am and we are having friends over tomorow afternoon for some killer barbecued pork…… mmmm…..
as for the missing semaphore that locked up on me, that is as designed. as i said before, the code for antispam is quite different than the code for antivirus. the antivirus stuff blocks on a semaphore until there is something to do, presumably for scanners that require scanning of each mime part separately (currently coded as everything except clam).
oh, and one other note: when coding/debuging antivirus code, it is IMPORTANT to have clamd running and listening on a tcp port….