When Mailman is set up somewhere that has two domain
names that are considered "equal", it is possible for
the wrong e-mail address to be added to a list,
confusing the user.
For example, we have two domains, "le.ac.uk" and
"leicester.ac.uk". All outgoing mail is rewritten to be
sent from the domain "leicester.ac.uk", but users
always use the short form.
When subscribing users using mass-subscription, a list
of addresses can be given as "firstname.lastname@example.org", but then
mail from that user to the list will be rejected
("email@example.com" is not on the list!).
This patch adds a hook into MailList.ApprovedAddMember
and Mailman/Cgi/admin.py/change_options to call a
transform function for each new address added to a
list. The default for this function is to return the
supplied address unchanged.
An example for the above problem would be to define
this function in the mm_cfg.py file, thus:
(local, domain) = email.split("@", 2)
if domain == "le.ac.uk":
domain = "leicester.ac.uk"
return "@".join([local, domain])
Log in to post a comment.