[Mimedefang] Setting clamd timeouts.
matt.s at aptalaska.net
Wed Sep 26 16:21:42 EDT 2007
I just had my clamd brown out on me. It didn't fail enough to cause
entity_contains_virus_clamd or message_contains_virus_clamd to return
tempfail but it did fail enough to cause every one of my slaves to hang
the slave timeout length. This of course caused my mail system to stop
with tons of busy processes.
I think the best solution to this is to set a timeout on clamd so that
message_contains_virus() can return tempfail if clamd is taking more
than 20 seconds. This would allow the system to correctly report what
the problem is in the logs while not waiting the full slave timeout.
I noticed that there aren't any timeouts in entity_contains_virus_clamd
and only a timeout where message_contains_virus_clamd pings clamd. I
added $sock->timeout( 20 ) to both entity_contains_virus_clamd and
message_contains_virus_clamd but I can't really test it because I can't
get clamd to brown out like it did.
So my question is, are these additions sane? I'm not an expert at
socket programming, but reading the documentation gives me the
impression that this will fix the problem.
More information about the MIMEDefang