I get the following error in my qmail log for a few emails that for some reason can’t be delivered. The message is generated by my mail gateway which relays mail to avastrelay. Since I cannot find this remote’s message in the qmail source, I assume it is being generated by avast:
I’ve looked at the email in the queue and all appears to be in order. My internal qmail server is delivering email just fine. The mail is only 48K so that can’t be a problem. I’ve tested the internal qmail server using telnet – it connects immediately and delivers the test mail in a timely manner. I’ve run the command line scanner on the stuck mail – it doesn’t return any errors and completes the scan in 17ms.
The message is generated by avastrelay. Timeout occured when was scanned e-mail relaying back to qmail.
Can you increase timeout and test send the e-mail again?
I forgot to add that detail to my original post. After I first encountered the problem, I increased the timeout to 120 and tried to flush qmail’s queue… the problem reoccurred on the the same email.
What’s weird is that other emails were being properly relayed at the time. The problem only occurred on specific emails (about five or six).
I’ve increased the timeout to 180 (3 minutes) and the problem still occurs. It only happens on certain messages. In an effort to track down the issue, I’ve run tcpdump on both the avast and qmail ports. I can supply both logs if necessary. There are two emails stuck in the queue. I can also provide copies of these as well. The packets for one email seems normal – e.g., HELO, RCPT TO, MAIL FROM, DATA. But the packets for the other one is very odd. avast sends DATA, qmail acks, avast sends headers – up to and including the X-Antivirus-Status. The headers are terminated by .. qmail acks again with:
There are two final packets, but the mail is never delivered… and the actual body of the message is never sent. The conversation for the other email is similar except for the fact that the body is sent… but that one doesn’t get delivered either. And deleting one of them has no effect on the other one not being delivered.
At the time this happens, other emails are being successfully scanned and delivered.
This is avast for Linux. There is no avast4.ini. But to answer the question I think you meant to ask… I increased the timeout in both /etc/avastd.conf and /etc/rc.d/init.d/avastrelay… qmail’ timeout for both establishing a connection and receiving data is also sufficient.
It seems the problem is in appending string to MIME header.
There were released avast4linux-1.0.8beta version. Can you try avastrelay from that version?