[Mailman-Users] Changing host names, revisited... POSTFIX_STYLE_VIRTUAL_DOMAINS?

Mark Sapiro mark at msapiro.net
Sun May 2 23:22:12 CEST 2010


On 5/2/2010 12:41 PM, Tanstaafl wrote:
> 
> The first question I have is about POSTFIX_STYLE_VIRTUAL_DOMAINS. In the
> FAQs about changing hostnames, this setting is not mentioned.
> 
> Now, this server only hosts lists for one domain: example.com.
> 
> So - should I also change that setting to lists.example.com too (per
> below)? Or, since I am not running lists for more than one domain, can
> my setup be simplified somehow? Or does it even come into play?


Since the email domain for all your lists is (or should be) example.com,
anything other than example .com in POSTFIX_STYLE_VIRTUAL_DOMAINS has no
effect. I.e.

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['myhost.example.com']

would only do anything for a list whose host_name (email domain) is
myhost.example.com, and changing it to

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.example.com']

would only do anything for a list whose host_name (email domain) is
lists.example.com.
> Defaults.py currently contains
> 
>> DEFAULT_EMAIL_HOST = 'myhost.example.com'
>> DEFAULT_URL_HOST = 'myhost.example.com'

probably wrong.


>> DEFAULT_URL_PATTERN = 'http://%s/mailman/'
>
> And my current/recently edited mm_cfg.py - the commented settings/lines
> below are the changes I've added, in preparation for the change, and
> will just comment/uncomment the relevant ones to 'flip the switch':
> 
>> ##################################################
>> # Put YOUR site-specific settings below this line.
>> MTA = 'Postfix'
>> #DEFAULT_EMAIL_HOST = 'example.com'
>> #DEFAULT_URL_HOST = 'lists.example.com'
>> #add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>> #VIRTUAL_HOSTS.clear()

The order of the above two is wrong. "VIRTUAL_HOSTS.clear()" clears the
VIRTOUAL_HOSTS dictionary. You don't want it after your add_virtualhost
as you will end up with nothing. You first want

VIRTUAL_HOSTS.clear()

to remove any incorrect or irrelevant entry from Defaults.py. This is
followed by

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

to add the newly defined values.


>> DEFAULT_URL_PATTERN = 'https://%s/mailman/'
>> #POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.example.com']
>> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['myhost.example.com']
>> ALLOW_SITE_ADMIN_COOKIES = Yes


If your list mail goes to ... at example.com and example.com is a local
domain in Postfix (i.e. in mydestinations), you don't want
POSTFIX_STYLE_VIRTUAL_DOMAINS at all and you don't want any references
to Mailman's virtual-mailman in virtual_alias_maps in Postfix.

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