transport-mailman and virtual-mailman not updated with new list

Hello,
I have added some new lists. The transport-mailman and virtual-mailman files in the data directory still only contain the old list. What must be done to update them? bin/genaliases does not do it.
Eggert

On 01/05/2016 11:30 AM, Eggert Ehmke wrote:
I am guessing at one time you followed the FAQ at <http://wiki.list.org/x/10715238>
You need to verify all of the following.
- Mailman/mm_cfg.py includes MTA = 'Postfix' POSTFIX_MAP_CMD = '/path/to/data/virtual_to_transport' POSTFIX_STYLE_VIRTUAL_DOMAINS = [...]
where '/path/to/data/virtual_to_transport' is the actual path to the virtual_to_transport file ant the value of POSTFIX_STYLE_VIRTUAL_DOMAINS is a list of the host names (email hosts) of the lists to which this process applies. In particular, if the new lists are in a new domain, that domain needs to be added to POSTFIX_STYLE_VIRTUAL_DOMAINS.
- /path/to/data/virtual_to_transport exists and has content, group and mode as in items 3) and 4) of the FAQ.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 01/06/2016 12:55 PM, Eggert Ehmke wrote:
Hello Mark,
Am Mittwoch, 6. Januar 2016, 12:10:48 schrieb Mark Sapiro:
No. Presumably you have some package which puts things in various places. You may see that /etc/mailman/mm_cfg.py is actually a symlink to some Mailman/mm_cfg.py file or vice versa, but /etc/mailman/mm_cfg.py is probably a correct path.
It doesn't matter that they are on the same server/mailman installation. What is important is that if in mailman's directory, you run
for list in bin/list_lists -b
; do
bin/dumpdb lists/$list/config.pck | grep host_name.:
done
That every listed host_name be in POSTFIX_STYLE_VIRTUAL_DOMAINS
Is that the case?
When you run bin/genaliases, is there any output to the terminal? If so, what?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 13:28:12 schrieb Mark Sapiro:
When I run this command, it first only showed me the domain of my first mailing list. I then discovered in the web gui, that the hostname for the new list was set to the domain of the old list. I changed that in the web gui (where is the corresponding entry in the mailman config?) After that run above command again, and now both domains are listed.
When you run bin/genaliases, is there any output to the terminal? If so, what?
No output. After running genaliases, data/aliases and data/virtual-mailman have new time stamps. However, only data/aliases has all mailing lists, data/virtual-mailman has only the old list.

On 01/06/2016 02:24 PM, Eggert Ehmke wrote:
The web admin General Options setting
Host name this list prefers for email. (Details for host_name)
Is the list's host_name attribute.
The output from the above command should be one line for each list of the form
'host_name': 'example.com',
It doesn't identify the list, but each entry corresponds to the host_name in the web UI.
OK. Everything seems to be working correctly. It appears that the issue is with POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py. In order for entries to be generated in data/virtual-mailman (and data/transport-mailman) for a list, that list's host_name must be in the POSTFIX_STYLE_VIRTUAL_DOMAINS list in mm_cfg.py.
Is that the case?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 01/06/2016 03:33 PM, Eggert Ehmke wrote:
What exactly is the POSTFIX_STYLE_VIRTUAL_DOMAINS entry in mm_cfg.py and what exactly is the output from
for list in bin/list_lists -b
; do
bin/dumpdb lists/$list/config.pck | grep host_name.:
done
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 15:41:42 schrieb Mark Sapiro:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain1.de', 'domain2.de']
# for list in bin/list_lists -b
; do bin/dumpdb lists/$list/config.pck | grep
host_name.:; done
'host_name': 'lists.domain2.de',
'host_name': 'lists.domain1.de',
'host_name': 'vxxxxxxxxxxxx.yourvserver.net',
'host_name': 'domain1.de',
'host_name': 'lists.domain1.de',
Where domain1 is the domain of the old list, domain2 the domain of the new list. Vxxxxxx is the hostname that my provider has assigned to the server.

On 01/06/2016 03:56 PM, Eggert Ehmke wrote:
The names in POSTFIX_STYLE_VIRTUAL_DOMAINS must exactly match the host_names. I.e. for the above, the only list that will get data/virtual-mailman and data/transport-mailman entries is the one with host_name = 'domain1.de'.
Since host_name is intended to be the email domain of the list, not the web domain, I'm guessing that the host_name values for the three lists that currently begin with 'lists.' should actually be just 'domain1.de' or 'domain2.de', but if you really mail to these lists @lists.domainx.de, you need to add 'lists.domain2.de' and 'lists.domain1.de' to POSTFIX_STYLE_VIRTUAL_DOMAINS.
Also, if 'vxxxxxxxxxxxx.yourvserver.net' is a virtual domain as opposed to a Postfix mydestination (local) domain, that needs to be in POSTFIX_STYLE_VIRTUAL_DOMAINS too.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 16:23:52 schrieb Mark Sapiro:
That is indeed so.
The Vxxxxx is not a virtual domain and will not be used.
Ok I changed /etc/mailman/mm_cfg.py and removed the "lists" from the hostnames. It lookes like this now: DEFAULT_EMAIL_HOST = 'domain1.de' DEFAULT_URL_HOST = 'domain1.de' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('domain2.de', 'domain2.de')
Now the above command produces this list: 'host_name': 'domain2.de', 'host_name': 'lists.domain1.de', 'host_name': 'vxxxxxx.yourvserver.net', 'host_name': 'domain1.de', 'host_name': 'lists.domain1.de',
When running genaliases again, data/aliases contains all lists in both domains, db is updated data/transport-mailman contains only one list of both domains, data/virtual-mailman contains only one list of both domains, db is not updated
Anyway, the most importand list is now there. I run postmap on the virtual- mailman manually. Mailinglist still not working, that may be a postfix problem.

On 01/07/2016 08:05 AM, Eggert Ehmke wrote:
Actually, what you probably want is
DEFAULT_EMAIL_HOST = 'domain1.de' DEFAULT_URL_HOST = 'lists.domain1.de' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('lists.domain2.de', 'domain2.de')
Because at least in a normal Debian/Ubuntu package web URLs are http://lists.domainx.de/... and list mailing addresses are list@domainx.de.
The changes you made to mm_cfg.py do not affect the host_name for any existing lists. I suggest you do the following:
make the changes I suggest above in mm_cfg.py
for each list in domain1 run
bin/withlist -l -r fix_url LISTNAME
and for each list in domain2 run
bin/withlist -l -r fix_url LISTNAME -u lists.domain2.de
This will fix the list's web_page_url and host_name attributes appropriately.
- run bin/genaliases
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hello Mark,
thank you, that looks much better now! The alias, transport and virtual tables are now correct. The problem that remains may be postfix or dovecot related, but perhaps you have an idea too:
When I send a mail to list@domain2.de, it is forwarded to list@domain1.de, which does not work of course.
Jan 8 13:56:05 domain1 postfix/pipe[2066]: 9EE1C1003F1: to=<list@domain1.de>, orig_to=<list@domain2.de>, relay=dovecot, delay=0.03, delays=0.02/0/0/0.02, dsn=5.1.1, status=bounced (user unknown)
Eggert
Am Donnerstag, 7. Januar 2016, 12:02:48 schrieb Mark Sapiro:

Am Freitag, 8. Januar 2016, 14:05:49 schrieb Eggert Ehmke:
I think this is because in the virtual_mailman all list addresses are mapped to the naked list name, and postfix then appends the default domain. I thought this would be prevented by the mailman/bin/postfix-to-mailman.py script, but it does not work. I also found a comment of you stating you don't see the reason for this script. However, what can be done to make it work?

On 01/08/2016 08:42 AM, Eggert Ehmke wrote:
Something is wrong here because if everything is properly configured per the FAQ at <http://wiki.list.org/x/10715238> the transport (relay) should be 'local' not 'dovecot' .
I think this is because in the virtual_mailman all list addresses are mapped to the naked list name, and postfix then appends the default domain.
Again, if things are properly configured per the FAQ at <http://wiki.list.org/x/10715238>, virtual-mailman is only used to build transport-mailman and only aliases and transport-mailman are used by postfix for Mailman mail.
postfix-to-mailman.py is incompatible with this and definitely won't work well in a multi-domain environment. See the FAQ at <http://wiki.list.org/x/15564817>.
I also found a comment of you stating you don't see the reason for this script. However, what can be done to make it work?
You probably can't make it work in your environment.
For further help, please post the output from 'postconf -n' and the contents of /etc/postfix/master.cf.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hello Mark,
finally it works! The clue was that the VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost' was missing in mm_cfg.py. After that the mail was delivered locally, and mailman could send it to the list members. The /usr/lib/mailman/bin/postfix-to- mailman.py line in master.cf is commented out, it indeed works fine following your hints.
Thank you again a lot for your patience! You will agree there are a lot of documents on the net leading in the wrong direction.
Eggert
Am Freitag, 8. Januar 2016, 10:08:04 schrieb Mark Sapiro:

On 01/08/2016 11:34 AM, Eggert Ehmke wrote:
I'm glad it's working, however something is still not right with your implementation of the things in the FAQ at <http://wiki.list.org/x/10715238>. If you have implemented the things in that FAQ completely and correctly, the setting of VIRTUAL_MAILMAN_LOCAL_DOMAIN wouldn't change anything because appending @localhost to the destinations in virtual-mailman wouldn't affect the content of transport-mailman and further POSTFIX_MAP_CMD would not update virtual-mailman.db.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 01/05/2016 11:30 AM, Eggert Ehmke wrote:
I am guessing at one time you followed the FAQ at <http://wiki.list.org/x/10715238>
You need to verify all of the following.
- Mailman/mm_cfg.py includes MTA = 'Postfix' POSTFIX_MAP_CMD = '/path/to/data/virtual_to_transport' POSTFIX_STYLE_VIRTUAL_DOMAINS = [...]
where '/path/to/data/virtual_to_transport' is the actual path to the virtual_to_transport file ant the value of POSTFIX_STYLE_VIRTUAL_DOMAINS is a list of the host names (email hosts) of the lists to which this process applies. In particular, if the new lists are in a new domain, that domain needs to be added to POSTFIX_STYLE_VIRTUAL_DOMAINS.
- /path/to/data/virtual_to_transport exists and has content, group and mode as in items 3) and 4) of the FAQ.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 01/06/2016 12:55 PM, Eggert Ehmke wrote:
Hello Mark,
Am Mittwoch, 6. Januar 2016, 12:10:48 schrieb Mark Sapiro:
No. Presumably you have some package which puts things in various places. You may see that /etc/mailman/mm_cfg.py is actually a symlink to some Mailman/mm_cfg.py file or vice versa, but /etc/mailman/mm_cfg.py is probably a correct path.
It doesn't matter that they are on the same server/mailman installation. What is important is that if in mailman's directory, you run
for list in bin/list_lists -b
; do
bin/dumpdb lists/$list/config.pck | grep host_name.:
done
That every listed host_name be in POSTFIX_STYLE_VIRTUAL_DOMAINS
Is that the case?
When you run bin/genaliases, is there any output to the terminal? If so, what?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 13:28:12 schrieb Mark Sapiro:
When I run this command, it first only showed me the domain of my first mailing list. I then discovered in the web gui, that the hostname for the new list was set to the domain of the old list. I changed that in the web gui (where is the corresponding entry in the mailman config?) After that run above command again, and now both domains are listed.
When you run bin/genaliases, is there any output to the terminal? If so, what?
No output. After running genaliases, data/aliases and data/virtual-mailman have new time stamps. However, only data/aliases has all mailing lists, data/virtual-mailman has only the old list.

On 01/06/2016 02:24 PM, Eggert Ehmke wrote:
The web admin General Options setting
Host name this list prefers for email. (Details for host_name)
Is the list's host_name attribute.
The output from the above command should be one line for each list of the form
'host_name': 'example.com',
It doesn't identify the list, but each entry corresponds to the host_name in the web UI.
OK. Everything seems to be working correctly. It appears that the issue is with POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py. In order for entries to be generated in data/virtual-mailman (and data/transport-mailman) for a list, that list's host_name must be in the POSTFIX_STYLE_VIRTUAL_DOMAINS list in mm_cfg.py.
Is that the case?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 01/06/2016 03:33 PM, Eggert Ehmke wrote:
What exactly is the POSTFIX_STYLE_VIRTUAL_DOMAINS entry in mm_cfg.py and what exactly is the output from
for list in bin/list_lists -b
; do
bin/dumpdb lists/$list/config.pck | grep host_name.:
done
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 15:41:42 schrieb Mark Sapiro:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain1.de', 'domain2.de']
# for list in bin/list_lists -b
; do bin/dumpdb lists/$list/config.pck | grep
host_name.:; done
'host_name': 'lists.domain2.de',
'host_name': 'lists.domain1.de',
'host_name': 'vxxxxxxxxxxxx.yourvserver.net',
'host_name': 'domain1.de',
'host_name': 'lists.domain1.de',
Where domain1 is the domain of the old list, domain2 the domain of the new list. Vxxxxxx is the hostname that my provider has assigned to the server.

On 01/06/2016 03:56 PM, Eggert Ehmke wrote:
The names in POSTFIX_STYLE_VIRTUAL_DOMAINS must exactly match the host_names. I.e. for the above, the only list that will get data/virtual-mailman and data/transport-mailman entries is the one with host_name = 'domain1.de'.
Since host_name is intended to be the email domain of the list, not the web domain, I'm guessing that the host_name values for the three lists that currently begin with 'lists.' should actually be just 'domain1.de' or 'domain2.de', but if you really mail to these lists @lists.domainx.de, you need to add 'lists.domain2.de' and 'lists.domain1.de' to POSTFIX_STYLE_VIRTUAL_DOMAINS.
Also, if 'vxxxxxxxxxxxx.yourvserver.net' is a virtual domain as opposed to a Postfix mydestination (local) domain, that needs to be in POSTFIX_STYLE_VIRTUAL_DOMAINS too.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Am Mittwoch, 6. Januar 2016, 16:23:52 schrieb Mark Sapiro:
That is indeed so.
The Vxxxxx is not a virtual domain and will not be used.
Ok I changed /etc/mailman/mm_cfg.py and removed the "lists" from the hostnames. It lookes like this now: DEFAULT_EMAIL_HOST = 'domain1.de' DEFAULT_URL_HOST = 'domain1.de' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('domain2.de', 'domain2.de')
Now the above command produces this list: 'host_name': 'domain2.de', 'host_name': 'lists.domain1.de', 'host_name': 'vxxxxxx.yourvserver.net', 'host_name': 'domain1.de', 'host_name': 'lists.domain1.de',
When running genaliases again, data/aliases contains all lists in both domains, db is updated data/transport-mailman contains only one list of both domains, data/virtual-mailman contains only one list of both domains, db is not updated
Anyway, the most importand list is now there. I run postmap on the virtual- mailman manually. Mailinglist still not working, that may be a postfix problem.

On 01/07/2016 08:05 AM, Eggert Ehmke wrote:
Actually, what you probably want is
DEFAULT_EMAIL_HOST = 'domain1.de' DEFAULT_URL_HOST = 'lists.domain1.de' add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('lists.domain2.de', 'domain2.de')
Because at least in a normal Debian/Ubuntu package web URLs are http://lists.domainx.de/... and list mailing addresses are list@domainx.de.
The changes you made to mm_cfg.py do not affect the host_name for any existing lists. I suggest you do the following:
make the changes I suggest above in mm_cfg.py
for each list in domain1 run
bin/withlist -l -r fix_url LISTNAME
and for each list in domain2 run
bin/withlist -l -r fix_url LISTNAME -u lists.domain2.de
This will fix the list's web_page_url and host_name attributes appropriately.
- run bin/genaliases
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hello Mark,
thank you, that looks much better now! The alias, transport and virtual tables are now correct. The problem that remains may be postfix or dovecot related, but perhaps you have an idea too:
When I send a mail to list@domain2.de, it is forwarded to list@domain1.de, which does not work of course.
Jan 8 13:56:05 domain1 postfix/pipe[2066]: 9EE1C1003F1: to=<list@domain1.de>, orig_to=<list@domain2.de>, relay=dovecot, delay=0.03, delays=0.02/0/0/0.02, dsn=5.1.1, status=bounced (user unknown)
Eggert
Am Donnerstag, 7. Januar 2016, 12:02:48 schrieb Mark Sapiro:

Am Freitag, 8. Januar 2016, 14:05:49 schrieb Eggert Ehmke:
I think this is because in the virtual_mailman all list addresses are mapped to the naked list name, and postfix then appends the default domain. I thought this would be prevented by the mailman/bin/postfix-to-mailman.py script, but it does not work. I also found a comment of you stating you don't see the reason for this script. However, what can be done to make it work?

On 01/08/2016 08:42 AM, Eggert Ehmke wrote:
Something is wrong here because if everything is properly configured per the FAQ at <http://wiki.list.org/x/10715238> the transport (relay) should be 'local' not 'dovecot' .
I think this is because in the virtual_mailman all list addresses are mapped to the naked list name, and postfix then appends the default domain.
Again, if things are properly configured per the FAQ at <http://wiki.list.org/x/10715238>, virtual-mailman is only used to build transport-mailman and only aliases and transport-mailman are used by postfix for Mailman mail.
postfix-to-mailman.py is incompatible with this and definitely won't work well in a multi-domain environment. See the FAQ at <http://wiki.list.org/x/15564817>.
I also found a comment of you stating you don't see the reason for this script. However, what can be done to make it work?
You probably can't make it work in your environment.
For further help, please post the output from 'postconf -n' and the contents of /etc/postfix/master.cf.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hello Mark,
finally it works! The clue was that the VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost' was missing in mm_cfg.py. After that the mail was delivered locally, and mailman could send it to the list members. The /usr/lib/mailman/bin/postfix-to- mailman.py line in master.cf is commented out, it indeed works fine following your hints.
Thank you again a lot for your patience! You will agree there are a lot of documents on the net leading in the wrong direction.
Eggert
Am Freitag, 8. Januar 2016, 10:08:04 schrieb Mark Sapiro:

On 01/08/2016 11:34 AM, Eggert Ehmke wrote:
I'm glad it's working, however something is still not right with your implementation of the things in the FAQ at <http://wiki.list.org/x/10715238>. If you have implemented the things in that FAQ completely and correctly, the setting of VIRTUAL_MAILMAN_LOCAL_DOMAIN wouldn't change anything because appending @localhost to the destinations in virtual-mailman wouldn't affect the content of transport-mailman and further POSTFIX_MAP_CMD would not update virtual-mailman.db.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Eggert Ehmke
-
Mark Sapiro