Hotmail sends bare LF that was rejected by qmail

Created:

2016-11-16 13:08:41 UTC

Modified:

2017-06-14 09:20:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Hotmail sends bare LF that was rejected by qmail

Applicable to:

  • Plesk for Linux

Symptoms

The problem is with messages sent by Hotmail to Qmail.

In the /usr/local/psa/var/log/maillog file, it looks like this:

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."

Cause

Some of Hotmail's servers send messages with a bare LF (line feed) character at the end of the line. Such messages are rejected by qmail, which expects CRLF to be at the end of the line (carriage return + line feed).

Resolution

  1. Download and compile ucspi-tcp sources:

    http://cr.yp.to/ucspi-tcp/install.html

    By default, fixcrio is compiled without TLS support. To enable TLS support, it is recommended that you recompile fixcrio with the TLS patch. Attached is fixcrio.c with the TLS patch applied. Use this one instead of the fixcrio.c that you already have.

    NOTE: But please pay attention that SMTPS (SMTP/SSL) will not work with this library, you will get the following error trying to use SSL connection:

    Starting SMTP/SSL...
    SSL/TLS: SSL connect attempt failed with unknown errorerror:1407741A:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert decode error

    See http://iain.cx/ssl/?qmailtls for details.

  2. If compilation fails with "undefined reference to 'errno'", add "#include " 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:

    # chown root:qmail /var/qmail/bin/fixcrio
    # chmod 555 /var/qmail/bin/fixcrio
    # 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 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 an example below:

    /etc/xinetd.d/smtp_psa
    --------
    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
    --------
  5. Restart xinetd daemon:

    # /etc/init.d/xinetd restart

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.