Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Handling malformed SMTP responses in sendmail?

6 views
Skip to first unread message

Tregaron Bayly

unread,
Jun 29, 2011, 5:15:06 PM6/29/11
to
In order to protect the guilty I will not name names, but there is a
very large e-mail provider that sends malformed SMTP responses that
cause us grief. I'm including an example session below complete with
non-printing characters to illustrate:

host:/home/user> telnet <redacted> 25
Trying <redacted>...
Connected to <redacted>
Escape character is '^]'.
220 <redacted> ESMTP\r\n <-- This works fine
EHLO me.com
250-<redacted>
250-PIPELINING
250 8BITMIME\r\n
MAIL FROM:<sen...@me.com>
571 Message Refused\r <--- Doh! Should be a CR LF!!!

At this point we hang and hang waiting for that character that is
never coming. Eventually we time out and requeue the message then
revisit the loop for a few days until the message ages out of the
queue. The volume is high enough that this results in a large amount
of cruft to deal with.

Any ideas from the gurus here on how to handle this cleanly?

Claus Aßmann

unread,
Jun 30, 2011, 10:05:02 AM6/30/11
to
Tregaron Bayly wrote:
> In order to protect the guilty I will not name names, but there is a
> very large e-mail provider that sends malformed SMTP responses that
> cause us grief. I'm including an example session below complete with
> non-printing characters to illustrate:

> 220 <redacted> ESMTP\r\n <-- This works fine


> EHLO me.com
> 250-<redacted>
> 250-PIPELINING
> 250 8BITMIME\r\n
> MAIL FROM:<sen...@me.com>

Your example misses some more \r\n.

> 571 Message Refused\r <--- Doh! Should be a CR LF!!!

> At this point we hang and hang waiting for that character that is
> never coming. Eventually we time out and requeue the message then
> revisit the loop for a few days until the message ages out of the
> queue. The volume is high enough that this results in a large amount
> of cruft to deal with.

> Any ideas from the gurus here on how to handle this cleanly?

Yes. Contact the "very large e-mail provider" and tell them
to fix their broken SW. That's the only correct way.

Why should everyone else work around broken SW instead?

0 new messages