[Mailman-Users] duplicate entry: "mailman at lists.example.org" in virtual-mailman.db

Mark Sapiro mark at msapiro.net
Thu Apr 14 11:58:04 EDT 2016


On 04/13/2016 10:19 AM, Manuel Vögele wrote:
> 
> Indeed the virtual-mailman file generated by mailman contains multiple
> mailman at lists.example.org entries:
> 
> ------------ file: virtual-mailman ------------
> 
...
> # We also add the site list address in each virtual domain as that address
> # is exposed on admin and listinfo overviews.
> # SITE ADDRESSES START
> mailman at lists.example.org    mailman
> # SITE ADDRESSES END
> 
> # STANZA START: mailman
> # CREATED: Wed Apr 13 16:33:48 2016
> mailman at lists.example.org              mailman at localhost
...
> 
> --------- end of file: virtual-mailman --------
> 
> Why does that happen? Additionaly mailman didn't append @localhost to
> the alias in the site adresses block which causes postfix to append
> @example.org which leads to the invalid alias mailman at example.org.
> 
> I'm using Mailman version 2.1.21. This is my is my configuration:
> 
> 
> --------------- file: mm_cfg.py ---------------
> 
> from Defaults import *
> 
> DEFAULT_URL_HOST = 'lists.example.org'
> DEFAULT_EMAIL_HOST = 'lists.example.org'
> VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'

The above is not necessary in 'usual' Postfix configurations. I.e., the
aliases file contains things like

mailman: "|/path/to/mailman/mail/mailman post mailman"

So that a virtual mapping

mailman at lists.example.org    mailman

says deliver mail originally To: mailman at lists.example.org to the local
address 'mailman' and the alias says how to deliver that.

Also, postmap is not complaining about the bare 'mailman' vs.
'mailman at localhost'. Even if that were generated as 'mailman at localhost',
postmap would still complain because there are two entries for
'mailman at lists.example.org'

> 
> ------------ end of file: mm_cfg.py -----------
> 
> What am I doing wrong?


Nothing really. You have just discovered two bugs. First, the appending
of VIRTUAL_MAILMAN_LOCAL_DOMAIN should also be applied in the SITE
ADDRESSES stanza, and the addition of the SITE ADDRESSES stanza doesn't
anticipate that the site list itself is in a virtual domain.

I'll fix these bugs. In the mean time, you can try two things.

Change the "Host name this list prefers for email." (host_name)
attribute on the 'mailman' list's web admin General Options page from
'lists.example.org' to just 'example.org' and also try removing the

VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'

line from mm_cfg.py. Then run Mailman's bin/genaliases. The first change
will remove the 'mailman' list stanza from virtual-mailman and postmap
will stop complaining, and the second change will remove the (I think
unnecessary) @localhost appendages from all the local addresses. If it
turns out for some reason that @localhost is required, you can restore
that line to mm_cfg.py and run genaliases again.	

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