About three years ago there was a thread on postfix-users ("Comcast 421 throttling multiple recipients") discussing a low-traffic site having difficulties sending to multiple recipients at comcast in a single smtp session. The thread starts here:

   https://www.mail-archive.com/postfix-users@postfix.org/msg88394.html

and it appears to have died out without consensus on what was going on.

I believe I understand what the original poster was seeing because it just happened to me. Having a way to disable the special per-recipient behavior when ${transport}_destination_recipient_limit=1 would be very useful in working around quirky receiver like this.

Earlier this week I noticed the same symptoms on my mail server; messages to multiple recipients at comcast.net were being queued for several hours with an "RL000001" rate-limiting error. I was seeing the same behavior that Bob Proulx reported in 2020 - messages sent to multiple recipients triggered throttling/greylisting, while messages to single recipients went through immediately.

At the time, Proulx's diagnosis was (understandably) rejected because the only errors he quoted were tagged "(in reply to MAIL FROM command)" -- they were returned by comcast's system before it could possibly know how many recipients there were.

However, in my logs it appears that the first instance of throttling always happens in response to end-of-DATA:

Aug 23 10:49:07 the-governor postfix/smtp[12888]: [ID 197553 mail.info] 5D21DAC8A: host mx2.mxge.comcast.net[96.103.145.164] said: 421 4.2.0 173.11.94.225 Throttled - try again later. Please see https://postmaster.comcast.net/smtp-error-codes.php#RL000001 (in reply to end of DATA command)

but then, within a second or so, postfix retries with the other best-priority MX host, and the second attempt is immediately rejected at MAIL FROM:

Aug 23 10:49:08 the-governor postfix/smtp[12888]: [ID 197553 mail.info] 5D21DAC8A: to=<addressredac...@comcast.net>, relay=mx1.mxge.comcast.net[96.102.157.178]:25, delay=5.4, delays=0.53/0.08/4.6/0.15, dsn=4.1.0, status=deferred (host mx1.mxge.comcast.net[96.102.157.178] said: 421 4.1.0 173.11.94.225 Throttled - try again later. Please see https://postmaster.comcast.net/smtp-error-codes.php#RL000001 (in reply to MAIL FROM command))

There was one of these logged for each recipient, and the repetition made it stand out in the log - it was only some time later that I noticed the first log message. I suspect there is some sort of short-lived cache at comcast.net causing the 2nd connection attempt to get an immediate rejection.

At that point, postfix stops trying to deliver immediately (due to smtp_mx_session_limit=2?), backing off to a retry about once an hour. After 4 to 8 hours, comcast.net eventually accepts the three-recipient message.

I believe I have a workaround that works for my purposes as a low-rate sender. I created a rate-limited and concurrency-limited "smtpserial" mailer in master.cf:

# serialized smtp, to avoid comcast penalty bucket
smtpserial      unix  -       -       n       -       1       smtp
        -o smtp_mx_session_limit=1

with this config in main.cf:

smtpserial_destination_recipient_limit=1
smtpserial_destination_concurrency_limit=1
smtpserial_initial_destination_concurrency=1
smtpserial_destination_rate_delay=60s
smtpserial_destination_concurrency_failed_cohort_limit=10

plus a transport map entry sending comcast.net mail to smtpserial,
plus a kludge to qmgr_message.c to defeat the special handling of destination_recipient_limit==1 for smtpserial:

--- src/qmgr/qmgr_message.c.~1~ Thu Oct  6 15:28:33 2022
+++ src/qmgr/qmgr_message.c     Fri Aug 25 20:29:11 2023
@@ -1294,6 +1294,7 @@
        vstring_strcpy(queue_name, STR(reply.nexthop));
        if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0
            && strcmp(transport->name, MAIL_SERVICE_RETRY) != 0
+           && strcmp(transport->name, "smtpserial") != 0
            && transport->recipient_limit == 1) {
            /* Copy the recipient localpart. */
            at = strrchr(STR(reply.recipient), '@');

Anyhow, I hope someone else finds this information useful.

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to