You're making this way too difficult.
If a reply code starts with 4, it's a temporary failure. The client can retry
If the client happens to know what the full code means, a more specific action
might be appropriate. But if it doesn't, it should suffice to just treat it as
a temporary failure.
That's the whole point of having the first digit indicate whether the request
was successful, a temporary failure, or a permanent failure.
The "x0z" paragraph you quoted was intended as a description of how codes are
assigned, not as advice for how to interpret unknown codes.
And in general, it's a Bad Idea to work too hard to accommodate the quirks of
obscure SMTP servers. That way lies madness.
On Sep 27, 2011, at 5:51 PM, Hector wrote:
A customer was sending mail to a remote host and got this for a RCPT TO
response and wanted to know what it meant:
17:25:47.884 C: RCPT TO:<m(_dot_)xxxxx(_at_)xxxxxxxx(_dot_)com>
17:25:47.962 S: 400 defer
Because of the 4yz response, our MTA queued the message for a retry, but I
never seen this 400 and not sure what it suppose to mean. 5321 says:
x0z Syntax: These replies refer to syntax errors, syntactically
correct commands that do not fit any functional category, and
unimplemented or superfluous commands.
and it doesn't appear the address was incorrect.
I looked for the word "defer" and the only thing that "came close" was in
Whether disabling VRFY provides any real marginal security depends on
a series of other conditions. In many cases, RCPT commands can be
used to obtain the same information about address validity. On the
other hand, especially in situations where determination of address
validity for RCPT commands is deferred until after the DATA command
is received, RCPT may return no information at all, while VRFY is
expected to make a serious attempt to determine validity before
generating a response code (see discussion above).
What would make of this "400 defer" response?