[Mailman-Users] Virtual domain not quite working on HTTP (but fineon SMTP)

Mark Sapiro mark at msapiro.net
Thu Jun 18 19:36:47 CEST 2009

Rick Moen wrote:
>There remains the matter of Mailman's Web pages:  Those for domain
>linuxmafia.com are present.  (See: http://linuxmafia.com/mailman/listinfo/)
>Those for domain lists.linuxgazette.net are not.  See:
>http://lists.linuxgazette.net/mailman/listinfo/ -- as you'll notice,
>Apache2 does recognise the domain.  The Apache document root for that
>location, /var/www/gazette, has an .htaccess file in it, as follows:
>  # cat /var/www/gazette/.htaccess 
>  redirect 301 /index.html
>  http://lists.linuxgazette.net/mailman/listinfo/
>If I mv .htaccess to .htacces-save for diagnostic purposes, I _do_ 
>see the contents of /var/www/gazette/ in my browser, so this is not 
>an Apache vhost problem.

Yes it is. 'listinfo' is a CGI. You need a

ScriptAlias /mailman/ "/usr/local/mailman/cgi-bin/"

(or whatever the correct path is) in your httpd.conf where it will
apply to the lists.linuxgazette.net host. I.e. it needs to be in the
VirtualHost block for each host with lists or it needs to be outside
of the virtual hosts section so it applies globally.

>Here is what I imagine is the relevant part of my current
>/var/lib/mailman/Mailman/mm_cfg.py :
>  # Default domain for email addresses of newly created MLs
>  DEFAULT_EMAIL_HOST = 'linuxmafia.com'
>  #-------------------------------------------------------------
>  # Default host for web interface of newly created MLs
>  DEFAULT_URL_HOST   = 'linuxmafia.com'
>  #-------------------------------------------------------------
>  # Required when setting any of its arguments.
>  add_virtualhost('lists.linuxgazette.net', 'lists.linuxgazette.net')

This looks good, but is not relevant to your issue, at least not until
you fix Apache so that http://lists.linuxgazette.net/mailman/listinfo/
gets you to the Mailman listinfo CGI.

>  # Uncomment if you use Postfix virtual domains, but be sure to
>  # see /usr/share/doc/mailman/README.Debian first.
>  # MTA='Postfix'
>  MTA = 'Postfix'
>  POSTFIX_ALIAS_CMD = '/bin/true'
>  POSTFIX_MAP_CMD = 'chgrp Debian-exim'
>  POSTFIX_STYLE_VIRTUAL_DOMAINS = ['linuxmafia.com', 'lists.linuxgazette.net']
>  VIRTUAL_HOSTS = {'lists.linuxgazette.net':'lists.linuxgazette.net'}

Get rid of the above line. It undoes everything you did with
add_virtualhost directives above.

>Here is what I imagine is the relevant part of my current
>  ####
>  # Virtual domains
>  #####
>  # Set up your virtual host mappings here.  This is primarily used for the
>  # thru-the-web list creation, so its effects are currently fairly limited.
>  # Use add_virtualhost() call to add new mappings.  The keys are strings as
>  # determined by Utils.get_domain(), the values are as appropriate for
>  VIRTUAL_HOSTS = {'lists.linuxgazette.net':'lists.linuxgazette.net'}

Where did this come from. If you put it there, you shouldn't be
changing Defaults.py at all. If it's part of the Debian package, I
don't know what to say.

>  # MTA = 'Manual'
>  MTA = 'Postfix'
>  POSTFIX_STYLE_VIRTUAL_DOMAINS = ['linuxmafia.com', 'lists.linuxgazette.net'

DON'T CHANGE Defaults.py

Make all your changes in mm_cfg.py.

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