View | Details | Raw Unified
Collapse All | Expand All

(-) mailman-2.1.9-orig/Mailman/Gui/General.py (-1 / +1 lines)
 Lines 420-426    Link Here 
    def _setValue(self, mlist, property, val, doc):
    def _setValue(self, mlist, property, val, doc):
        if property == 'real_name' and \
        if property == 'real_name' and \
               val.lower() <> mlist.internal_name().lower():
               val.lower() <> mlist.real_name.lower():
            # These values can't differ by other than case
            # These values can't differ by other than case
            doc.addError(_("""<b>real_name</b> attribute not
            doc.addError(_("""<b>real_name</b> attribute not
            changed!  It must differ from the list's name by case
            changed!  It must differ from the list's name by case
(-) mailman-2.1.9-orig/Mailman/MailList.py (-6 / +21 lines)
 Lines 185-193    Link Here 
        return self._full_path
        return self._full_path
    def getListAddress(self, extra=None):
    def getListAddress(self, extra=None):
        posting_addr = self.internal_name()
        try:
            posting_addr = self.real_name
        except:
            pass
        if extra is None:
        if extra is None:
            return '%s@%s' % (self.internal_name(), self.host_name)
            return '%s@%s' % (posting_addr, self.host_name)
        return '%s-%s@%s' % (self.internal_name(), extra, self.host_name)
        return '%s-%s@%s' % (posting_addr, extra, self.host_name)
    # For backwards compatibility
    # For backwards compatibility
    def GetBouncesEmail(self):
    def GetBouncesEmail(self):
 Lines 470-477    Link Here 
    #
    #
    def Create(self, name, admin, crypted_password,
    def Create(self, name, admin, crypted_password,
               langs=None, emailhost=None):
               langs=None, emailhost=None):
        if Utils.list_exists(name):
            raise Errors.MMListAlreadyExistsError, name
        # Validate what will be the list's posting address.  If that's
        # Validate what will be the list's posting address.  If that's
        # invalid, we don't want to create the mailing list.  The hostname
        # invalid, we don't want to create the mailing list.  The hostname
        # part doesn't really matter, since that better already be valid.
        # part doesn't really matter, since that better already be valid.
 Lines 479-489    Link Here 
        # the admin's email address, so transform the exception.
        # the admin's email address, so transform the exception.
        if emailhost is None:
        if emailhost is None:
            emailhost = mm_cfg.DEFAULT_EMAIL_HOST
            emailhost = mm_cfg.DEFAULT_EMAIL_HOST
        postingaddr = '%s@%s' % (name, emailhost)
        firstname = name
        if '@' in name:
            firstname, emailhost = name.split('@', 1)
        # Keep posting address sane.
        postingaddr = '%s@%s' % (firstname, emailhost)
        name = '%s-%s' % (firstname, emailhost)
        try:
        try:
            Utils.ValidateEmail(postingaddr)
            Utils.ValidateEmail(postingaddr)
        except Errors.MMBadEmailError:
        except Errors.MMBadEmailError:
            raise Errors.BadListNameError, postingaddr
            raise Errors.BadListNameError, postingaddr
        # Refuse to create lists that already exists
        if Utils.list_exists(name):
            raise Errors.MMListAlreadyExistsError, name
        # Validate the admin's email address
        # Validate the admin's email address
        Utils.ValidateEmail(admin)
        Utils.ValidateEmail(admin)
        self._internal_name = name
        self._internal_name = name
 Lines 491-496    Link Here 
        # Don't use Lock() since that tries to load the non-existant config.pck
        # Don't use Lock() since that tries to load the non-existant config.pck
        self.__lock.lock()
        self.__lock.lock()
        self.InitVars(name, admin, crypted_password)
        self.InitVars(name, admin, crypted_password)
        # This is for getListAddress
        self.list_address = postingaddr
        self.real_name = firstname
        self.subject_prefix = mm_cfg.DEFAULT_SUBJECT_PREFIX % self.__dict__
        self.CheckValues()
        self.CheckValues()
        if langs is None:
        if langs is None:
            self.available_languages = [self.preferred_language]
            self.available_languages = [self.preferred_language]
 Lines 1322-1328    Link Here 
        addresses in the recipient headers.
        addresses in the recipient headers.
        """
        """
        # This is the list's full address.
        # This is the list's full address.
        listfullname = '%s@%s' % (self.internal_name(), self.host_name)
        listfullname = self.getListAddress()
        recips = []
        recips = []
        # Check all recipient addresses against the list's explicit addresses,
        # Check all recipient addresses against the list's explicit addresses,
        # specifically To: Cc: and Resent-to:
        # specifically To: Cc: and Resent-to:
(-) mailman-2.1.9-orig/Mailman/Utils.py (-1 / +1 lines)
 Lines 215-221    Link Here 
    # This means local, unqualified addresses, are no allowed
    # This means local, unqualified addresses, are no allowed
    if not domain_parts:
    if not domain_parts:
        raise Errors.MMBadEmailError, s
        raise Errors.MMBadEmailError, s
    if len(domain_parts) < 2:
    if len(domain_parts) < 2 and domain_parts[0] != 'localhost':
        raise Errors.MMBadEmailError, s
        raise Errors.MMBadEmailError, s
(-) mailman-2.1.9-orig/bin/list_lists (-3 / +3 lines)
 Lines 1-4    Link Here 
#! @PYTHON@
#! /usr/bin/python
#
#
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
#
 Lines 99-105    Link Here 
               mlist.web_page_url.find(vhost) == -1:
               mlist.web_page_url.find(vhost) == -1:
            continue
            continue
        mlists.append(mlist)
        mlists.append(mlist)
        longest = max(len(mlist.real_name), longest)
        longest = max(len(mlist.internal_name()), longest)
    if not mlists and not bare:
    if not mlists and not bare:
        print _('No matching mailing lists found')
        print _('No matching mailing lists found')
 Lines 114-120    Link Here 
            print mlist.internal_name()
            print mlist.internal_name()
        else:
        else:
            description = mlist.description or _('[no description available]')
            description = mlist.description or _('[no description available]')
            print '   ', format % (mlist.real_name, description)
            print '   ', format % (mlist.internal_name(), description)


(-) mailman-2.1.9-orig/bin/mailmanctl (+2 lines)
 Lines 273-278    Link Here 


def check_for_site_list():
def check_for_site_list():
    sitelistname = mm_cfg.MAILMAN_SITE_LIST
    sitelistname = mm_cfg.MAILMAN_SITE_LIST
    if not '@' in sitelistname:
        sitelistname = '%s-%s' % (sitelistname, mm_cfg.DEFAULT_EMAIL_HOST)
    try:
    try:
        sitelist = MailList(sitelistname, lock=0)
        sitelist = MailList(sitelistname, lock=0)
    except Errors.MMUnknownListError:
    except Errors.MMUnknownListError:
(-) mailman-2.1.9-orig/bin/newlist (-2 / +2 lines)
 Lines 157-163    Link Here 
    if '@' in listname:
    if '@' in listname:
        # note that --urlhost and --emailhost have precedence
        # note that --urlhost and --emailhost have precedence
        listname, domain = listname.split('@', 1)
        firstname, domain = listname.split('@', 1)
        urlhost = urlhost or domain
        urlhost = urlhost or domain
        emailhost = emailhost or mm_cfg.VIRTUAL_HOSTS.get(domain, domain)
        emailhost = emailhost or mm_cfg.VIRTUAL_HOSTS.get(domain, domain)
 Lines 193-199    Link Here 
        oldmask = os.umask(002)
        oldmask = os.umask(002)
        try:
        try:
            try:
            try:
                mlist.Create(listname, owner_mail, pw)
                mlist.Create(listname, owner_mail, pw, emailhost=emailhost)
            finally:
            finally:
                os.umask(oldmask)
                os.umask(oldmask)
        except Errors.BadListNameError, s:
        except Errors.BadListNameError, s: