[Mailman-Developers] Errors.MMHostileAddress

Barry Warsaw barry at python.org
Sun Feb 29 12:17:39 EST 2004


On Thu, 2004-02-26 at 03:00, SHIGENO Kazutaka wrote:
> Hi,
> 
> When creating a list by Mailman-2.1.4,
> if a user use owner addresses with comma, 
> Errors.MMHostileAddress will occur.

Only if there's no space before or after the comma.

> How about changing into 'except Errors.EmailAddressError:'?

Exactly right!

> --- Mailman/MailList.py	2004/02/25 12:35:20
> +++ Mailman/MailList.py	2004/02/25 12:44:01
> @@ -451,7 +451,7 @@ class MailList(HTMLFormatter, Deliverer,
>          postingaddr = '%s@%s' % (name, emailhost)
>          try:
>              Utils.ValidateEmail(postingaddr)
> -        except Errors.MMBadEmailError:
> +        except Errors.EmailAddressError:
>              raise Errors.BadListNameError, postingaddr
>          # Validate the admin's email address
>          Utils.ValidateEmail(admin)

I don't think we need to do this one because EmailAddressError is the
base class of MMBadEmailError so the fixed except clauses will catch
MMBadEmailError too.

Thanks!
-Barry





More information about the Mailman-Developers mailing list