
Using mailman 2.1.9 on ubuntu 14.04 using mysql for aliases and mail accounts. Iy was working fine for a long time then something went awry. Now I've got an iterative loop and multiple email lists are generating 'Undelivered Mail Returned to Sender' messages. Those message then have the following email as an attachment:
This is the mail system at host mail.domainname.tld.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
<|/var/lib/mailman/mail/mailman@ hostname.domainname.tld >: unknown user: "|/var/lib/mailman/mail/mailman"
Please advise. Thank you!

On 3/18/19 5:19 PM, Web Analysts via Mailman-Users wrote:
It looks like the MTA is postfix and something is wrong with the aliases for Mailman. There should be aliases for each list that look like
I'm only guessing here, but it looks like you have the correct aliases, but somehow they are being processed by a Postfix delivery agent that doesn't understand delivery via pipe to command.
What are your actual mail.log entries corresponding to these bounces?
This is really a Postfix issue (assuming the Mailman aliases are correct), but to be of further help, we'd need to see the actual Postfix mail.log entry for the bounce and the output of 'postconf -n' to start.
Note: you say multiple email lists. If that means some but not all, it probably is an issue with the aliases themselves.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Well I removed hostname.domainname.tld from mydestination in /etc/postfix/main.cf and restarted Postfix. No dice...see below:
Mar 19 18:21:43 zarathustra postfix/smtpd[18769]: 925B210193B: client=localhost.localdomain[127.0.0.1] Mar 19 18:21:43 zarathustra postfix/cleanup[18673]: 925B210193B: message-id=<mailman.99.1553044787.18654.ssan@lists.domainname.tld > Mar 19 18:21:43 zarathustra postfix/qmgr[18094]: 925B210193B: from=<ssan-bounces@lists.domainname.tld >, size=6805, nrcpt=3 (queue active) Mar 19 18:21:43 zarathustra postfix/lmtp[18151]: 925B210193B: to=<ssan@hostname.domainname.tld >, relay=mail.domainname.tld [private/dovecot-lmtp], delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (host mail.domainname.tld [private/dovecot-lmtp] said: 550 5.1.1 <ssan@hostname.domainname.tld > User doesn't exist: ssan@hostname.domainname.tld (in reply to RCPT TO command)) Mar 19 18:21:43 zarathustra postfix/lmtp[18151]: 925B210193B: to=<|/var/lib/mailman/mail/mailman@hostname.domainname.tld >, relay=mail.domainname.tld [private/dovecot-lmtp], delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (host mail.domainname.tld [private/dovecot-lmtp] said: 550 5.1.1 <|/var/lib/mailman/mail/mailman@hostname.domainname.tld > User doesn't exist: |/var/lib/mailman/mail/mailman@hostname.domainname.tld (in reply to RCPT TO command)) Mar 19 18:21:43 zarathustra amavis[5001]: (05001-19-19) Passed CLEAN {RelayedInternal,RelayedOutbound}, LOCAL [::1]:53426 [::1] <ssan-bounces@lists.domainname.tld > -> <ces@domainname.tld
Please advise.
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+csa=web-analysts.net@python.org] On Behalf Of Mark Sapiro Sent: Tuesday, March 19, 2019 9:22 AM To: mailman-users@python.org Subject: Re: [Mailman-Users] iterative loop
On 3/18/19 5:19 PM, Web Analysts via Mailman-Users wrote: the
It looks like the MTA is postfix and something is wrong with the aliases for Mailman. There should be aliases for each list that look like
I'm only guessing here, but it looks like you have the correct aliases, but somehow they are being processed by a Postfix delivery agent that doesn't understand delivery via pipe to command.
What are your actual mail.log entries corresponding to these bounces?
This is really a Postfix issue (assuming the Mailman aliases are correct), but to be of further help, we'd need to see the actual Postfix mail.log entry for the bounce and the output of 'postconf -n' to start.
Note: you say multiple email lists. If that means some but not all, it probably is an issue with the aliases themselves.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/csa%40web-analysts.net

On 3/19/19 6:27 PM, Web Analysts via Mailman-Users wrote:
If we look only at entries up to here with queue id 925B210193B, we see messages to 3 recipients: ssan@hostname.domainname.tld, |/var/lib/mailman/mail/mailman@hostname.domainname.tld and ces@domainname.tld all being relayed via private/dovecot-lmtp.
There are two more similar sets below with queue ids C66FF101986 and 9B645101942. These all seem to come about in the same way. I'm confuses about the ces@domainname.tld recipient as it is at domainname.tld rather than hostname.domainname.tld, but more below.
Actually, the C66FF101986 entries were first (this log gets written asynchronously). They are a message to ssan-owner@lists.domainname.tld receeived via smtp and resent with queue-id 925B210193B.
The last set here with queue-id 9B645101942 is the most straightforward. It is a message to ssan-bounces@lists.domainname.tld. There is an alias mapping ssan-bounces to "|/var/lib/mailman/mail/mailman bounces ssan" which is supposed to pipe the mail to that command, but the dovecot delivery agent doesn't understand that and take the three words in the command and appends the local domain to them and tries to deliver to the three recipient addresses |/var/lib/mailman/mail/mailman@hostname.domainname.tld, bounces@hostname.domainname.tld and ssan@hostname.domainname.tld none of which exist.
The bottom line here is that this mail should be delivered via the Postfix 'local' delivery agent which does understand these aliases, not via dovecot.
This is a Postfix configuration issue. Perhaps you have a backup of the Postfix main.cf and master.cf files from when this was working to compare with the current ones to see what changed.
If you want more help here we have to see at least the output from 'postconf -n' to start.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Okay here's the output from 'postconf -n'
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 inet_interfaces = all inet_protocols = all mailbox_size_limit = 0 mailman_destination_recipient_limit = 1 message_size_limit = 31457280 milter_default_action = accept milter_protocol = 2 mydestination = mail.domainname.tld, mail1.domainname.tld, lists.domainname.tld, localhost.domainname.tld, localhost myhostname = mail.ccalternatives.org mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname non_smtpd_milters = inet:localhost:8891 readme_directory = no recipient_delimiter = + relay_domains = $mydestination, lists.domainname.tld relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman relayhost = smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_milters = inet:localhost:8891 smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_relay_domains smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/letsencrypt/live/mail.domainname.tld/fullchain.pem smtpd_tls_key_file = /etc/letsencrypt/live/mail.domainname.tld/privkey.pem smtpd_tls_loglevel = 0 smtpd_use_tls = yes transport_maps = hash:/etc/postfix/transport virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/mysql-virtual-email2email.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+csa=web-analysts.net@python.org] On Behalf Of Mark Sapiro Sent: Tuesday, March 19, 2019 7:24 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] iterative loop
On 3/19/19 6:27 PM, Web Analysts via Mailman-Users wrote:
If we look only at entries up to here with queue id 925B210193B, we see messages to 3 recipients: ssan@hostname.domainname.tld, |/var/lib/mailman/mail/mailman@hostname.domainname.tld and ces@domainname.tld all being relayed via private/dovecot-lmtp.
There are two more similar sets below with queue ids C66FF101986 and 9B645101942. These all seem to come about in the same way. I'm confuses about the ces@domainname.tld recipient as it is at domainname.tld rather than hostname.domainname.tld, but more below.
Actually, the C66FF101986 entries were first (this log gets written asynchronously). They are a message to ssan-owner@lists.domainname.tld receeived via smtp and resent with queue-id 925B210193B.
The last set here with queue-id 9B645101942 is the most straightforward. It is a message to ssan-bounces@lists.domainname.tld. There is an alias mapping ssan-bounces to "|/var/lib/mailman/mail/mailman bounces ssan" which is supposed to pipe the mail to that command, but the dovecot delivery agent doesn't understand that and take the three words in the command and appends the local domain to them and tries to deliver to the three recipient addresses |/var/lib/mailman/mail/mailman@hostname.domainname.tld, bounces@hostname.domainname.tld and ssan@hostname.domainname.tld none of which exist.
The bottom line here is that this mail should be delivered via the Postfix 'local' delivery agent which does understand these aliases, not via dovecot.
This is a Postfix configuration issue. Perhaps you have a backup of the Postfix main.cf and master.cf files from when this was working to compare with the current ones to see what changed.
If you want more help here we have to see at least the output from 'postconf -n' to start.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/csa%40web-analysts.net

On 3/22/19 5:42 AM, Web Analysts via Mailman-Users wrote:
OK
...
mydestination = mail.domainname.tld, mail1.domainname.tld, lists.domainname.tld, localhost.domainname.tld, localhost
OK
...
relay_domains = $mydestination, lists.domainname.tld
lists.domainname.tld is redundant here as it's in $mydestination, but I think this in combination with
virtual_transport = lmtp:unix:private/dovecot-lmtp
is the issue. I suggest setting
relay_domains = mail.domainname.tld, mail1.domainname.tld, localhost.domainname.tld, localhost
I.e. everything in $mydestination except lists.domainname.tld.
relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
Then this will be unnecessary.
If that doesn't fix your issue, look at /var/lib/mailman/data/aliases and ensure that the aliases for each list that look like
In particular, that the quotes around the commands are not missing, although I don't see how they could be unless you edited this by hand. If there is an issue, running Mailman's bin/genaliases as the Mailman user
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 3/18/19 5:19 PM, Web Analysts via Mailman-Users wrote:
It looks like the MTA is postfix and something is wrong with the aliases for Mailman. There should be aliases for each list that look like
I'm only guessing here, but it looks like you have the correct aliases, but somehow they are being processed by a Postfix delivery agent that doesn't understand delivery via pipe to command.
What are your actual mail.log entries corresponding to these bounces?
This is really a Postfix issue (assuming the Mailman aliases are correct), but to be of further help, we'd need to see the actual Postfix mail.log entry for the bounce and the output of 'postconf -n' to start.
Note: you say multiple email lists. If that means some but not all, it probably is an issue with the aliases themselves.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Well I removed hostname.domainname.tld from mydestination in /etc/postfix/main.cf and restarted Postfix. No dice...see below:
Mar 19 18:21:43 zarathustra postfix/smtpd[18769]: 925B210193B: client=localhost.localdomain[127.0.0.1] Mar 19 18:21:43 zarathustra postfix/cleanup[18673]: 925B210193B: message-id=<mailman.99.1553044787.18654.ssan@lists.domainname.tld > Mar 19 18:21:43 zarathustra postfix/qmgr[18094]: 925B210193B: from=<ssan-bounces@lists.domainname.tld >, size=6805, nrcpt=3 (queue active) Mar 19 18:21:43 zarathustra postfix/lmtp[18151]: 925B210193B: to=<ssan@hostname.domainname.tld >, relay=mail.domainname.tld [private/dovecot-lmtp], delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (host mail.domainname.tld [private/dovecot-lmtp] said: 550 5.1.1 <ssan@hostname.domainname.tld > User doesn't exist: ssan@hostname.domainname.tld (in reply to RCPT TO command)) Mar 19 18:21:43 zarathustra postfix/lmtp[18151]: 925B210193B: to=<|/var/lib/mailman/mail/mailman@hostname.domainname.tld >, relay=mail.domainname.tld [private/dovecot-lmtp], delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (host mail.domainname.tld [private/dovecot-lmtp] said: 550 5.1.1 <|/var/lib/mailman/mail/mailman@hostname.domainname.tld > User doesn't exist: |/var/lib/mailman/mail/mailman@hostname.domainname.tld (in reply to RCPT TO command)) Mar 19 18:21:43 zarathustra amavis[5001]: (05001-19-19) Passed CLEAN {RelayedInternal,RelayedOutbound}, LOCAL [::1]:53426 [::1] <ssan-bounces@lists.domainname.tld > -> <ces@domainname.tld
Please advise.
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+csa=web-analysts.net@python.org] On Behalf Of Mark Sapiro Sent: Tuesday, March 19, 2019 9:22 AM To: mailman-users@python.org Subject: Re: [Mailman-Users] iterative loop
On 3/18/19 5:19 PM, Web Analysts via Mailman-Users wrote: the
It looks like the MTA is postfix and something is wrong with the aliases for Mailman. There should be aliases for each list that look like
I'm only guessing here, but it looks like you have the correct aliases, but somehow they are being processed by a Postfix delivery agent that doesn't understand delivery via pipe to command.
What are your actual mail.log entries corresponding to these bounces?
This is really a Postfix issue (assuming the Mailman aliases are correct), but to be of further help, we'd need to see the actual Postfix mail.log entry for the bounce and the output of 'postconf -n' to start.
Note: you say multiple email lists. If that means some but not all, it probably is an issue with the aliases themselves.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/csa%40web-analysts.net

On 3/19/19 6:27 PM, Web Analysts via Mailman-Users wrote:
If we look only at entries up to here with queue id 925B210193B, we see messages to 3 recipients: ssan@hostname.domainname.tld, |/var/lib/mailman/mail/mailman@hostname.domainname.tld and ces@domainname.tld all being relayed via private/dovecot-lmtp.
There are two more similar sets below with queue ids C66FF101986 and 9B645101942. These all seem to come about in the same way. I'm confuses about the ces@domainname.tld recipient as it is at domainname.tld rather than hostname.domainname.tld, but more below.
Actually, the C66FF101986 entries were first (this log gets written asynchronously). They are a message to ssan-owner@lists.domainname.tld receeived via smtp and resent with queue-id 925B210193B.
The last set here with queue-id 9B645101942 is the most straightforward. It is a message to ssan-bounces@lists.domainname.tld. There is an alias mapping ssan-bounces to "|/var/lib/mailman/mail/mailman bounces ssan" which is supposed to pipe the mail to that command, but the dovecot delivery agent doesn't understand that and take the three words in the command and appends the local domain to them and tries to deliver to the three recipient addresses |/var/lib/mailman/mail/mailman@hostname.domainname.tld, bounces@hostname.domainname.tld and ssan@hostname.domainname.tld none of which exist.
The bottom line here is that this mail should be delivered via the Postfix 'local' delivery agent which does understand these aliases, not via dovecot.
This is a Postfix configuration issue. Perhaps you have a backup of the Postfix main.cf and master.cf files from when this was working to compare with the current ones to see what changed.
If you want more help here we have to see at least the output from 'postconf -n' to start.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Okay here's the output from 'postconf -n'
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases append_dot_mydomain = no biff = no broken_sasl_auth_clients = yes config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 inet_interfaces = all inet_protocols = all mailbox_size_limit = 0 mailman_destination_recipient_limit = 1 message_size_limit = 31457280 milter_default_action = accept milter_protocol = 2 mydestination = mail.domainname.tld, mail1.domainname.tld, lists.domainname.tld, localhost.domainname.tld, localhost myhostname = mail.ccalternatives.org mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname non_smtpd_milters = inet:localhost:8891 readme_directory = no recipient_delimiter = + relay_domains = $mydestination, lists.domainname.tld relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman relayhost = smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_milters = inet:localhost:8891 smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_relay_domains smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_tls_auth_only = yes smtpd_tls_cert_file = /etc/letsencrypt/live/mail.domainname.tld/fullchain.pem smtpd_tls_key_file = /etc/letsencrypt/live/mail.domainname.tld/privkey.pem smtpd_tls_loglevel = 0 smtpd_use_tls = yes transport_maps = hash:/etc/postfix/transport virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/mysql-virtual-email2email.cf virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = lmtp:unix:private/dovecot-lmtp
-----Original Message----- From: Mailman-Users [mailto:mailman-users-bounces+csa=web-analysts.net@python.org] On Behalf Of Mark Sapiro Sent: Tuesday, March 19, 2019 7:24 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] iterative loop
On 3/19/19 6:27 PM, Web Analysts via Mailman-Users wrote:
If we look only at entries up to here with queue id 925B210193B, we see messages to 3 recipients: ssan@hostname.domainname.tld, |/var/lib/mailman/mail/mailman@hostname.domainname.tld and ces@domainname.tld all being relayed via private/dovecot-lmtp.
There are two more similar sets below with queue ids C66FF101986 and 9B645101942. These all seem to come about in the same way. I'm confuses about the ces@domainname.tld recipient as it is at domainname.tld rather than hostname.domainname.tld, but more below.
Actually, the C66FF101986 entries were first (this log gets written asynchronously). They are a message to ssan-owner@lists.domainname.tld receeived via smtp and resent with queue-id 925B210193B.
The last set here with queue-id 9B645101942 is the most straightforward. It is a message to ssan-bounces@lists.domainname.tld. There is an alias mapping ssan-bounces to "|/var/lib/mailman/mail/mailman bounces ssan" which is supposed to pipe the mail to that command, but the dovecot delivery agent doesn't understand that and take the three words in the command and appends the local domain to them and tries to deliver to the three recipient addresses |/var/lib/mailman/mail/mailman@hostname.domainname.tld, bounces@hostname.domainname.tld and ssan@hostname.domainname.tld none of which exist.
The bottom line here is that this mail should be delivered via the Postfix 'local' delivery agent which does understand these aliases, not via dovecot.
This is a Postfix configuration issue. Perhaps you have a backup of the Postfix main.cf and master.cf files from when this was working to compare with the current ones to see what changed.
If you want more help here we have to see at least the output from 'postconf -n' to start.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/csa%40web-analysts.net

On 3/22/19 5:42 AM, Web Analysts via Mailman-Users wrote:
OK
...
mydestination = mail.domainname.tld, mail1.domainname.tld, lists.domainname.tld, localhost.domainname.tld, localhost
OK
...
relay_domains = $mydestination, lists.domainname.tld
lists.domainname.tld is redundant here as it's in $mydestination, but I think this in combination with
virtual_transport = lmtp:unix:private/dovecot-lmtp
is the issue. I suggest setting
relay_domains = mail.domainname.tld, mail1.domainname.tld, localhost.domainname.tld, localhost
I.e. everything in $mydestination except lists.domainname.tld.
relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
Then this will be unnecessary.
If that doesn't fix your issue, look at /var/lib/mailman/data/aliases and ensure that the aliases for each list that look like
In particular, that the quotes around the commands are not missing, although I don't see how they could be unless you edited this by hand. If there is an issue, running Mailman's bin/genaliases as the Mailman user
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Web Analysts