I'm using postfix + clamd + clamsmtp + freshclam in Debian Sarge (testing). It was easy to setup, and seems fast.
However, in a 24 hour period I've had clam mysteriously start returning error messages 6+ times. This causes postfix to queue all e-mails.
I can fix this by restarting both clamd & clamsmtp, and then flushing postfix's queue. But I can't figure out why clam stops working in the first place!
Here's some excerpts from mail.log. I can't see exactly what's causing the problem.
Code:
09:42:50 clamsmtpd: 1000BF: accepted connection from: 127.0.0.1
09:42:50 postfix/smtpd[15781]: connect from localhost[127.0.0.1]
...
09:43:26 clamsmtpd: 1000BE: network read operation timed out: CLAM
09:43:26 clamsmtpd: 1000BE: unexepected response from clamd:
09:43:26 clamsmtpd: 1000BE: from=<xxxxx@xxxxxxxxxxx.com> SIZE=1500, to=<yyyy@yyyyyy.com>, status=CLAMAV-ERROR
09:43:26 postfix/smtp[15599]: 50CF89DA85: to=<yyyy@yyyyyy.com>, relay=127.0.0.1[127.0.0.1], delay=60, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 Local Error (in reply to end of DATA command))
09:43:26 postfix/smtpd[15601]: disconnect from localhost[127.0.0.1]
...restarted clamd & clamsmtp...
15:38:58 postfix/qmgr[19749]: 05D259DA5F: from=<aaaaaa@aaaaaa.com>, size=2270, nrcpt=1 (queue active)
15:38:58 clamsmtpd: 10000A: from=<aaaaaaa@aaaaaa.com> SIZE=2028, to=<yyyyy@yyyyy.com>, status=CLEAN
15:38:58 postfix/smtp[26934]: AD8019DA4B: to=<yyyyyy@yyyyy.com>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 Ok: queued as 05D259DA5F)
15:38:58 postfix/qmgr[19749]: AD8019DA4B: removed
15:38:58 postfix/smtpd[26936]: disconnect from localhost[127.0.0.1]
15:38:58 postfix/virtual[26939]: 05D259DA5F: to=<yyyyy@yyyyyi.com>, relay=virtual, delay=0, status=sent (delivered to maildir)