def mailman_add(contact, listname=None, send_welcome_msg=None, admin_notify=None):
    'Add a Satchmo contact to a mailman mailing list.\n\n    Parameters:\n        - `Contact`: A Satchmo Contact\n        - `listname`: the Mailman listname, defaulting to whatever you have set in settings.NEWSLETTER_NAME\n        - `send_welcome_msg`: True or False, defaulting to the list default\n        - `admin_notify`: True of False, defaulting to the list default\n    '
    (mm, listname) = _get_maillist(listname)
    ((print >> sys.stderr), ('mailman adding %s to %s' % (contact.email, listname)))
    if (send_welcome_msg is None):
        send_welcome_msg = mm.send_welcome_msg
    userdesc = UserDesc()
    userdesc.fullname = contact.full_name
    userdesc.address = contact.email
    userdesc.digest = False
    if mm.isMember(contact.email):
        ((print >> sys.stderr), _(('Already Subscribed: %s' % contact.email)))
    else:
        try:
            try:
                mm.Lock()
                mm.ApprovedAddMember(userdesc, send_welcome_msg, admin_notify)
                mm.Save()
                ((print >> sys.stderr), (_('Subscribed: %(email)s') % {'email': contact.email}))
            except Errors.MMAlreadyAMember:
                ((print >> sys.stderr), (_('Already a member: %(email)s') % {'email': contact.email}))
            except Errors.MMBadEmailError:
                if (userdesc.address == ''):
                    ((print >> sys.stderr), _('Bad/Invalid email address: blank line'))
                else:
                    ((print >> sys.stderr), (_('Bad/Invalid email address: %(email)s') % {'email': contact.email}))
            except Errors.MMHostileAddress:
                ((print >> sys.stderr), (_('Hostile address (illegal characters): %(email)s') % {'email': contact.email}))
        finally:
            mm.Unlock()
Add a Satchmo contact to a mailman mailing list.

Parameters:
    - `Contact`: A Satchmo Contact
    - `listname`: the Mailman listname, defaulting to whatever you have set in settings.NEWSLETTER_NAME
    - `send_welcome_msg`: True or False, defaulting to the list default
    - `admin_notify`: True of False, defaulting to the list default
def mailman_add(contact, listname=None, send_welcome_msg=None, admin_notify=None):
    'Add a Satchmo contact to a mailman mailing list.\n\n    Parameters:\n        - `Contact`: A Satchmo Contact\n        - `listname`: the Mailman listname, defaulting to whatever you have set in settings.NEWSLETTER_NAME\n        - `send_welcome_msg`: True or False, defaulting to the list default\n        - `admin_notify`: True of False, defaulting to the list default\n    '
    (mm, listname) = _get_maillist(listname)
    ((print >> sys.stderr), ('mailman adding %s to %s' % (contact.email, listname)))
    if (send_welcome_msg is None):
        send_welcome_msg = mm.send_welcome_msg
    userdesc = UserDesc()
    userdesc.fullname = contact.full_name
    userdesc.address = contact.email
    userdesc.digest = False
    if mm.isMember(contact.email):
        ((print >> sys.stderr), _(('Already Subscribed: %s' % contact.email)))
    else:
        try:
            try:
                mm.Lock()
                mm.ApprovedAddMember(userdesc, send_welcome_msg, admin_notify)
                mm.Save()
                ((print >> sys.stderr), (_('Subscribed: %(email)s') % {'email': contact.email}))
            except Errors.MMAlreadyAMember:
                ((print >> sys.stderr), (_('Already a member: %(email)s') % {'email': contact.email}))
            except Errors.MMBadEmailError:
                if (userdesc.address == ):
                    ((print >> sys.stderr), _('Bad/Invalid email address: blank line'))
                else:
                    ((print >> sys.stderr), (_('Bad/Invalid email address: %(email)s') % {'email': contact.email}))
            except Errors.MMHostileAddress:
                ((print >> sys.stderr), (_('Hostile address (illegal characters): %(email)s') % {'email': contact.email}))
        finally:
            mm.Unlock()