Cool Mark, 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 = '[EMAIL PROTECTED]'
The other variable that you pointed (self.getListAddress()) also gives me the list realname. 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 ;) ) Thanks once again mark on your efforts Best regards -- Nuno Gonçalves -----Original Message----- From: Mark Sapiro [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 15 de Março de 2007 0:09 To: [EMAIL PROTECTED]; mailman-users@python.org Subject: Re: [Mailman-Users] Mailman Changing real_name Variable in welcomemessage subject ! Nuno Gonçalves wrote: > >I am looking a way in order to change the subject of the welcome message. >In the file in [Mailman home directory/Mailman/Deliverer.py] (line 79) >there is a line : >_('Welcome to the "%(realname)s" mailing list%(digmode)s') > > >Is there anyway of subtituting the variable realname for one in the >acceptable aliases list (the firts one for instance)? >Is there any variable acceptable_aliases (confs/list.conf) accessable >in the Deliverer.py ? You could do this in several ways. If you really want to do exactly what you said, you could change realname = self.real_name msg = Message.UserNotification( self.GetMemberAdminEmail(name), self.GetRequestEmail(), _('Welcome to the "%(realname)s" mailing list%(digmode)s'), text, pluser) to realname = self.acceptable_aliases[0] msg = Message.UserNotification( self.GetMemberAdminEmail(name), self.GetRequestEmail(), _('Welcome to the "%(realname)s" mailing list%(digmode)s'), text, pluser) but then you have to guarantee that every list has at least one entry in acceptable_aliases, because referencing self.acceptable_aliases[0] will throw an IndexError exception if the acceptable_aliases list is empty. A more realistic approach would just be to use the normal list posting address, not an alias. Then the code would be realname = self.getListAddress() msg = Message.UserNotification( self.GetMemberAdminEmail(name), self.GetRequestEmail(), _('Welcome to the "%(realname)s" mailing list%(digmode)s'), text, pluser) Note that both of the above change only the first line - the assignment to realname. If you really wanted to get fancy and use an alias iff there was one, you could do if self.acceptable_aliases: realname = self.acceptable_aliases[0] else: realname = self.getListAddress() msg = Message.UserNotification( self.GetMemberAdminEmail(name), self.GetRequestEmail(), _('Welcome to the "%(realname)s" mailing list%(digmode)s'), text, pluser) -- Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp