[Mailman-Users] Apostrophe in a user's email

Mark Sapiro mark at msapiro.net
Fri Dec 6 18:03:57 CET 2013

On 12/06/2013 07:48 AM, Paul Kleeberg wrote:
> We are trying to subscribe a user who has an apostrophe in their email address to a list using the web interface and get the message: “Hostile address (illegal characters)”.  Suggestions as to how we proceed.  (For some reason, the e-mail commands do not seem to be responding - was going to try using that but that is a separate issue)

Where in the address is the apostrophe? If it is in the local part (left
of the @), all recent versions of Mailman should be accepting it. If it
is in the domain, it is not a valid domain name.

If the apostrophe is in the local part, and mailman is calling it
hostile, perhaps it is being entered as a right or left single quote
instead of an apostrophe. If not, what Mailman version is it?

If the apostrophe is in the domain, the address is not RFC 821/2821/5321
compliant and is probably not actually deliverable.

The actual characters which are (dis)allowed are defined by (from

_badchars = re.compile(r'[][()<>|:;^,\\"\000-\037\177-\377]')
# Strictly speaking, some of the above are allowed in quoted local
parts, but
# this can open the door to certain web exploits so we don't allow them.
# Only characters allowed in domain parts.
_valid_domain = re.compile('[-a-z0-9]', re.IGNORECASE)

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list