duplicate entry: "mailman@lists.example.org" in virtual-mailman.db
Hi everyone.
I just set up a mailman installation and almost everything is working as expected.
However everytime i create a new mailing list mailman prints the following warning:
postmap: warning: /var/lib/mailman/data/virtual-mailman.db: duplicate entry: "mailman@lists.example.org"
Indeed the virtual-mailman file generated by mailman contains multiple mailman@lists.example.org entries:
------------ file: virtual-mailman ------------
# This file is generated by Mailman, and is kept in sync with the binary hash # file virtual-mailman.db. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you # know what you're doing, and can keep the two files properly in sync. If you # screw it up, you're on your own. # # Note that you should already have this virtual domain set up properly in # your Postfix installation. See README.POSTFIX for details.
# LOOP ADDRESSES START mailman-loop@lists.example.org mailman-loop@localhost # LOOP ADDRESSES END
# 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@lists.example.org mailman # SITE ADDRESSES END
# STANZA START: mailman # CREATED: Wed Apr 13 16:33:48 2016 mailman@lists.example.org mailman@localhost mailman-admin@lists.example.org mailman-admin@localhost mailman-bounces@lists.example.org mailman-bounces@localhost mailman-confirm@lists.example.org mailman-confirm@localhost mailman-join@lists.example.org mailman-join@localhost mailman-leave@lists.example.org mailman-leave@localhost mailman-owner@lists.example.org mailman-owner@localhost mailman-request@lists.example.org mailman-request@localhost mailman-subscribe@lists.example.org mailman-subscribe@localhost mailman-unsubscribe@lists.example.org mailman-unsubscribe@localhost # STANZA END: mailman
--------- 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@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'
VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.example.org']
DEFAULT_URL_PATTERN = 'http://%s/' PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/archives/%(listname)s'
MTA = 'Postfix'
------------ end of file: mm_cfg.py -----------
What am I doing wrong?
Manuel
On 04/13/2016 10:19 AM, Manuel Vögele wrote:
Indeed the virtual-mailman file generated by mailman contains multiple mailman@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@lists.example.org mailman # SITE ADDRESSES END
# STANZA START: mailman # CREATED: Wed Apr 13 16:33:48 2016 mailman@lists.example.org mailman@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@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@lists.example.org mailman
says deliver mail originally To: mailman@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@localhost'. Even if that were generated as 'mailman@localhost', postmap would still complain because there are two entries for 'mailman@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@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for your help.
I cannot remove the @localhost mapping because that would cause postfix to append @example.org which is then handled by dovecot (and thus will fail). This is also the reason wh i can't put @example.org as the preferred host for the list. However since this is caused by a bug which will eventually be fixed i decided to workaround it with a manually created mapping
mailman@lists.example.org mailman@localhost
which supersedes the faulty entry created by mailman.
On 04/14/2016 08:58 AM, Mark Sapiro wrote:
On 04/13/2016 10:19 AM, Manuel Vögele wrote:
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.
This is reported as a single bug at <https://bugs.launchpad.net/mailman/+bug/1570630>. It is fixed and the fix is <http://bazaar.launchpad.net/~mailman-coders/mailman/2.1/revision/1642>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Manuel Vögele
-
Mark Sapiro