OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: 503 5.0.0 Need RCPT (recipient) (in reply to DATA command)

From: Wietse Venema (wietseporcupine.org)
Date: Mon Jun 28 2004 - 11:46:07 CDT


Jim Dossey:
> Hi, I'm new to the list. We are having a problem sending email to a 3rd
> party site. But everytime we try to send an email to this site we get
> the following error (domains and IP's changed):
>
> <usertld.com>: host tld.com[111.222.333.444] said: 503 5.0.0 Need RCPT
> (recipient) (in reply to DATA command)

The remote MTA is broken. It accepts recipients and then replies
it didn't accept any.

This may be a broken server-side pipelining implementation, possibly
because of a broken firewall.

You can work around this by turning of client-side ESMTP support.

/etc/postfix/main.cf:
    transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
    example.com dumb:

/etc/postfix/master.cf:
    smtp unix - - n - - smtp
        -o smtp_never_send_ehlo=yes

The Postfix code goes like this:

                    /*
                     * Process the DATA response. When the server rejects
                     * DATA, set nrcpt to a negative value so that the
                     * receiver can apply a course correction.
                     */
                case SMTP_STATE_DATA:
                    if (resp->code / 100 != 3) {
                        if (nrcpt > 0)
                            smtp_mesg_fail(state, resp->code,
                                        "host %s said: %s (in reply to %s)",
                                           session->namaddr,
                                           translit(resp->str, "\n", " "),
                                           xfer_request[SMTP_STATE_DATA]);

In other words, Postfix reports "host tld.com[111.222.333.444] said: .."
only if the remote side did accept at least one recipient.

        Wietse