Symptoms
The problem is with messages sent by Hotmail to Qmail.
Some of Hotmail’s servers send messages with bare LF (line feed) character at the end of the line. Such messages are rejected by qmail that expects CRLF at the end of the line (carriage return + line feed). In the log it looks like this:
/usr/local/psa/var/log/maillog
—>8—
Oct 1 14:50:15 hostname qmail-queue[20210]: possible qmail-smtpd exited by timeout, reset connection or with “See http://pobox.com/~djb/docs/smtplf.html.”
—8<—
Resolution
1) Download and compile ucspi-tcp sources:
http://cr.yp.to/ucspi-tcp/install.html
http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
By default fixcrio is compiled without TLS support. To enable TLS support it is recommended that you recompile fixcrio with TLS patch. Attached is fixcrio.c with the TLS patch applied. Use this one instead of the fixcrio.c that you already have.
2) If compilation fails with “undefined reference to `errno'”, add “#include <errno.h>” to error.h as described here:
http://mail.nl.linux.org/kernelnewbies/2004-02/msg00210.html
Quote:
[root@localhost ucspi-tcp-0.88]# grep -A 1 “extern int errno” *
error.h:extern int errno;
error.h-#include <errno.h>
3) Copy compiled fixcrio binary to /var/qmail/bin/ and chown/chmod as other binaries:
~# ls -l /var/qmail/bin/fixcrio
-r-xr-xr-x 1 root qmail 13388 Oct 1 16:36 /var/qmail/bin/fixcrio
4) Add “/var/qmail/bin/fixcrio” to /etc/xinetd.d/smtp.psa and /etc/xinetd.d/smtps.psa right before /var/qmail/bin/qmail-smtpd.
If you use mail submission you probably want to add it to /etc/xinetd.d/submission.psa as well.
Here is example below
/etc/xinetd.d/smtp.psa
—8<—
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/fixcrio /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
—>8—
5) restart xinetd