[ mailman-Bugs-1870246 ] sync_members just failes if even 1 email address is invalid

SourceForge.net noreply at sourceforge.net
Sun Jan 13 10:40:50 CET 2008


Bugs item #1870246, was opened at 2008-01-13 18:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1870246&group_id=103

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: command line scripts
Group: 2.1 (stable)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tony Mobily (mercmobily)
Assigned to: Nobody/Anonymous (nobody)
Summary: sync_members just failes if even 1 email address is invalid

Initial Comment:
Hi,

Right now, sync_members just fails if there are invalid email addresses.
I wrote a Drupal module that uses mailman to send emails. The problem I have is that I am using sync_members automatically, and it would be 100 times easier for me if the invalid email addresses were ignored, rather than the whole script failing.
The code is:

  # first filter out any invalid addresses
    filemembers = email.Utils.getaddresses(filemembers)
    invalid = 0
    for name, addr in filemembers:
        try:
            Utils.ValidateEmail(addr)
        except Errors.EmailAddressError:
            print _('Invalid :  %(addr)30s')
            invalid = 1
    if invalid:
        print _('You must fix the preceding invalid addresses first.')
        sys.exit(1)

I think having a command line option for this would be fantastic - something like "-i" ("ignore invalid email addresses"), which if selected makes sure that the script simply ignores invalid email addresses, and basically "always works" (unless of course the mailing list name is wrong, etc.).

I don't know python at all (shame on me), or I swear I'd be submitting a patch (I am a Drupal developer, and submit patches whenever I can).

Thank you!!!

Merc.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1870246&group_id=103


More information about the Mailman-coders mailing list