Public bug reported:

If the recipient mail address is too long, local part of VERP sender may
exceed 64 octet, the maximum total length of local-part provided by RFC
5321.

I think it should be checked in Mailman/Hander/SMTPDirect.py and fall
back to original envsender.

e.g. (not tested yet)
--- Mailman/Handlers/SMTPDirect.py.org   2018-06-27 17:19:15.000000000 +0900
+++ Mailman/Handlers/SMTPDirect.py       2020-11-27 22:06:44.047857879 +0900
@@ -338,7 +338,14 @@ def verpdeliver(mlist, msg, msgdata, env
                  'mailbox': rmailbox,
                  'host'   : DOT.join(rdomain),
                  }
-            envsender = '%s@%s' % ((mm_cfg.VERP_FORMAT % d), DOT.join(bdomain))
+            envlocal = (mm_cfg.VERP_FORMAT % d)
+            if len(envlocal) > 64:
+                syslog('smtp',
+                       'local part of VERP address exceeds 64 octet.'
+                       'fall back to original envsender: %s',
+                       envlocal)
+            else:
+                envsender = '%s@%s' % (envlocal, DOT.join(bdomain))
         if mlist.personalize == 2:
             # When fully personalizing, we want the To address to point to the
             # recipient, not to the mailing list

** Affects: mailman
     Importance: Undecided
         Status: New

** Branch linked: lp:mailman/2.1

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1905962

Title:
  local-part of VERP  sender may exceed 64 octet

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1905962/+subscriptions
_______________________________________________
Mailman-coders mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-coders.python.org/
Member address: [email protected]

Reply via email to