On Tue, Sep 14, 2004 at 11:58:26AM +0100, Mark Powell wrote: > Just done a check and qmail-scanner always finds qpsmtpd has died if the > scanning has taken over 120s. That is my qpsmtpd timeout. It seems that > the 120s timeout alarm is reset on each line of the data, but it is not > cancelled after that meaning qmail-scanner is then limited to 120s > scanning time. Seems like an "alarm 0" should be in there?
I observed this with clamav a while back, thus learning that I'd forgotten to impose a maximum size in the clamav configuration. I added support for a size limit to the clamav plugin also, since there's no point extracting what you're not going to scan. If you're only looking for viruses, imposing a size limit is generally a good idea -- and if you're trying to protect windows users, they need a scanner of their own anyway, so scanning big files is of minimal use. More generally, every dropped-tmp situation I've looked into has been attributable to SIGALRM. Most often it's from spamassassin or from clamav. One approach I've found generally workable in apps with many abort-points is to have routines add their tempfiles to a list, the contents of which are unlinked on exit. Something similar could be applied by adding a reaper to the transaction object. Okay, so it conceals the symptoms, but finding out you're hitting SIGALRM by filling up tmp is even worse. -- Devin \ aqua(at)devin.com, 1024D/E9ABFCD2; http://www.devin.com Carraway \ IRC: Requiem GCS/CC/L s-:--- !a !tv C++++$ ULB+++$ O+@ P L+++