[Mailman-Users] Mailman Changing real_name Variable in welcome message subject !

Mark Sapiro msapiro at value.net
Fri Mar 16 02:22:04 CET 2007

Nuno Gonçalves wrote:
>I followed your directions and it makes all sense, but it appears on the
>subject 2 little squares instead of the acceptable alias that is specified
>in the conf file :P
>I checked the list.conf in conf Directory and acceptable_aliases is
>something like : acceptable_aliases = 'test at test.pt'
>The other variable that you pointed (self.getListAddress()) also gives me
>the list realname.

Not exactly. It shoud give 'real_name at host_name' instead of just

I thought you perhaps wanted a list email address as opposed to just a
name which is why I suggested that.

>Do you have any clue what those 2 little squares instead of the list alias
>name is ?
>To be more specific the subject appears like: Welcome to the mailing list
>(the brackets are squares ;) )

The squares may represent non-printing characters which may be an issue
if the acceptable_aliases field begins with a blank line.

This is partially my error. I was thinking that acceptable_aliases is a
list, but it is not. It is a string. The construct
acceptable_alaises[0] returns the first character of the string, which
if acceptable_aliases = 'test at test.pt', is simply 't', so I don't know
what the two 'squares' are unless acceptable_aliases begins with a
blank line, in which case they are probably some representation of a
carriage-return character.

So now I have another question. If you don't want people to see the
name of the list in the subject of the welcome message, why don't you
just change the list name - see

If you really want to keep the list name as is and put the first entry
from acceptable aliases in the welcome subject, this should do it.

        list_aliases = [alias.strip() for alias in
        realname = None
            for realname in list_aliases:
                if realname:
        if not realname:
            realname = self.real_name
        msg = Message.UserNotification(
            self.GetMemberAdminEmail(name), self.GetRequestEmail(),
            _('Welcome to the "%(realname)s" mailing list%(digmode)s'),
            text, pluser)

That will use the first non-empty line from acceptable_aliases if any
and the list's real_name if there is no non-empty acceptable_aliases

Mark Sapiro <msapiro at value.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