[Mailman-Users] problem with mm_cfg.py

Richard Barrett r.barrett at openinfo.demon.co.uk
Wed Apr 30 22:09:48 CEST 2003


At 20:43 30/04/2003, Adam Lipson wrote:
>I have edited my mm_cfg.py file as instructions said to put my hostname 
>into the default email/url host.  When I run a command such as newlist I 
>get the follow error:
>
>mailman at jbt mailman]$ bin/newlist adam2
>Traceback (most recent call last):
>   File "bin/newlist", line 74, in ?
>     from Mailman import mm_cfg
>   File "/usr/local/mailman/Mailman/mm_cfg.py", line 47
>     DEFAULT_EMAIL_HOST = 'listserver.jbase.com'
>
>this is my entire mm_cfg.py file:
>
>##################################################
># Put YOUR site-specific settings below this line.
>IMAGE_LOGOS = '/icons/'

If the assignment on these three following lines have leading white space 
then you have a syntax error. mm_cfg.py is Python source code and 
indentation (leading white space) is syntactically significant in Python, 
unlike Perl, C, C++ and many other languages.

Remove leading white space will probably fix the problem.

>     DEFAULT_EMAIL_HOST = 'listserver.jbase.com'
>     DEFAULT_URL_HOST = 'listserver.jbase.com'
>     add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>
>Any ideas?  the hostname defined in /etc/hosts is different then the one 
>in mm_cfg.py but this should not cause this error should it?

Incidentally, as you are redefining the default hosts you probably want to 
precede the call to add_virtualhost with the following statement:

VIRTUAL_HOSTS.clear()

This will clear out the old values from assignment and add_virtualhost 
calls in Defaults.py

>Thanks,
>Adam






More information about the Mailman-Users mailing list