[Mailman-Users] running Mailman on mail server, not web server

Mark Sapiro msapiro at value.net
Tue Oct 4 07:27:55 CEST 2005


Troy Richard wrote:

>Mark Sapiro wrote:
>>
>> You have to put
>>
>> DEFAULT_URL_PATTERN = 'http://%s:8112/mailman/'
>>
>> in mm_cfg.py and then run fix_url to update the existing lists. fix_url
>> is a withlist script. Run bin/fix_url.py stand alone for instructions.
>>
>Mark,
>
>I'm having another problem with the above.  I had to rebuild my mailserver
>and now I cannot remember how to completely set this up.
>
>I added the DEFAULT_URL_PATTERN to the mm_cfg.py.  And ran the fix_url
>script.  The problem I'm having now is some of the url are point to the
>wrong url.
>
>Here is what I have in my mm_cfg.py script.
>
>DEFAULT_EMAIL_HOST = 'nebraskaultimate.com'
>DEFAULT_URL_HOST = 'www.nebraskaultimate.com:8122'
>add_virtualhost('www.nebraskaultimate.com:8122', 'nebraskaultimate.com')
>add_virtualhost('www.atomicxterra.com:8122', 'atomicxterra.com')
>DEFAULT_URL_PATTERN = 'http://%s:8122/mailman/'
>ALLOW_SITE_ADMIN_COOKIES = 1
>
>
>The problem is when I go to my atomicxterra list it has links to those
>lists but it is using the nebraskaultimate.com URL.  I guess I can't
>remember if I need to have the DEFAULT vars set.


You've got the :8122 in too many places for one thing. If it's in
DEFAULT_URL_PATTERN as you have it, then you don't want it elsewhere.

I suggest the following for the relevant part of mm_cfg.py:

DEFAULT_EMAIL_HOST = 'nebraskaultimate.com'
DEFAULT_URL_HOST = 'www.nebraskaultimate.com'
VIRTUAL_HOSTS.clear()
add_virtualhost('www.nebraskaultimate.com', 'nebraskaultimate.com')
add_virtualhost('www.atomicxterra.com', 'atomicxterra.com')
DEFAULT_URL_PATTERN = 'http://%s:8122/mailman/'

The VIRTUAL_HOSTS.clear() entry removes what was put there by the
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) that's in
Defaults.py. This isn't strictly necessary but it insures you have no
spurious entries in your VIRTUAL_HOSTS dictionary.

After fixing this and restarting Mailman, you'll need to run fix_url on
the existing lists. I think that will do it.

--
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