[Mailman-Users] Format for multiple add_virtualhost entries

Mark Sapiro msapiro at value.net
Wed Apr 18 16:40:39 CEST 2007

David Southwell wrote:

>What is the correct format for multiple add_virtualhost entries in mm_cfg.py
>Single is shown as:
>add_virtualhost('virtualURL', 'virtualmailserver')
>Could someone please give an example for multiples where more than one entry 
>line is required (prefer one url and mailserver pair per line.

add_virtualhost('www.one.example.com', 'mail.one.example.com')
add_virtualhost('www.two.example.com', 'mail.two.example.com')
add_virtualhost('www.three.example.com', 'mail.three.example.com')

Note that all add_virtualhost(x, y) does is add an entry to the
VIRTUAL_HOSTS dictionary with key = x and value = y. For this reason
all the web hosts MUST be unique; if not the second entry with the
same web host will replace the first. It used to be the case that some
code in the archiver inverted this dictionary to look up the web host
corresponding to a mail host and for that reason, the mail hosts
needed to be unique. This is no longer the case in current Mailman,
but it is still a good idea not to have two entries with the same mail

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