On 16-06-16 23:25, Jeffry Dwight wrote:
Today I noticed the following response from GMail after submission of email:

421-4.7.0 [x.x.x.x      15] Our system has detected that this message is
421-4.7.0 suspicious due to the nature of the content and/or the links within.
421-4.7.0 To best protect our users from spam, the message has been blocked.
421-4.7.0 Please visit
4.7.0  https://support.google.com/mail/answer/188131 for more information.
f77si267316oig.47 - gsmtp

Contrary to what 421 means generally ("try again later"), and contrary to
GMail's own documentation page

https://support.google.com/a/answer/3726730?hl=en

where it says that 421 4.7.0 means "Try again later, closing connection"

I find that trying again later always results in the same code, and it's
therefore a permanent failure like 5xx would be. The particular email I saw in
the logs was a newsletter from a publisher to an author, with links to new
releases. Spammy in nature, maybe, but certainly solicited, and nothing really
out of the ordinary.

I noticed it only because our system saw the 421 code and dutifully kept
requeuing for retry until the max number of attempts had been reached.

Am I misunderstanding what 421 means after DATA or BDAT, or is GMail replying
with the wrong code? Surely if it means to reject the email out of hand, it
should say so, shouldn't it?

We currently treat a 5xx reply after DATA or BDAT as a permanent failure, and
don't retry. We treat 4xx replies after DATA or BDAT as temporary, and queue for
retry. How should we handle it?

Google should better use an 5xy response, according to https://tools.ietf.org/html/rfc5321#page-48:

    4yz  Transient Negative Completion reply
       The command was not accepted, and the requested action did not
       occur.  However, the error condition is temporary, and the action
       may be requested again.  The sender should return to the beginning
       of the command sequence (if any).  It is difficult to assign a
       meaning to "transient" when two different sites (receiver- and
       sender-SMTP agents) must agree on the interpretation.  Each reply
       in this category might have a different time value, but the SMTP
       client SHOULD try again.  A rule of thumb to determine whether a
       reply fits into the 4yz or the 5yz category (see below) is that
       replies are 4yz if they can be successful if repeated without any
       change in command form or in properties of the sender or receiver
       (that is, the command is repeated identically and the receiver
       does not put up a new implementation).

It is unlikely that the verdict will be different when the message is presented to the Gmail servers during the next queue run. Maybe Brandon can comment on this. Having said that, I'd suggest not to mess up with the client side of the connection and just stick to the RFC5321 retry regime, otherwise chaos is complete. There are too many exceptions and exceptions to exceptions around re. mail handling already, these days... The best way IMHO is to ask Gmail to correct this behavior of their SMTP servers.

/rolf


_______________________________________________
mailop mailing list
[email protected]
https://chilli.nosignal.org/cgi-bin/mailman/listinfo/mailop

Reply via email to