Mailman 2.1 - notifications not being properly sent to list owner
I recently rebuilt my server (Ubuntu 20.04) and rebuilt mailman 2 - upgrading to the latest version 2.1.34. The mail server is postfix
I run three mailing lists, including "TESTmail". The same issue below affects all three lists which are set up in the same way.
On the General Page, I have filled in an administrator and a owner. The list options are set so that emails from non-members are held and the moderator should be notified.
- The poster of the email receives a notification that the email is being held
- The moderator does not receive any messages
- But looking at the postfix logs, it appears to me that mailman does try to send a message to the moderator
Apr 5 22:12:05 ip-xxx-xxx-xxx-xxx postfix/smtp[9473]: 6D0973EB91: to=< testmail-owner@lists.xxx.org.uk>,
But, the email message is being sent to the generic owner, rather than the specific names filled into either the moderator or administrator boxes on the general tab.
Also, I note that the footer of the mailing list has: TESTmail list run by testmail-owner at lists.XXX.org.uk rather than the specific owner. Which suggests the same issue.
Any clues as to what is not quite correct in the mailman setup?
On 4/6/21 12:21 AM, David Nicol wrote:
- But looking at the postfix logs, it appears to me that mailman does try to send a message to the moderator
Apr 5 22:12:05 ip-xxx-xxx-xxx-xxx postfix/smtp[9473]: 6D0973EB91: to=< testmail-owner@lists.xxx.org.uk>,
But, the email message is being sent to the generic owner, rather than the specific names filled into either the moderator or administrator boxes on the general tab.
But that message should be delivered to Mailman and Mailman should then resend it to the owners and moderators.
There is some issue with your aliases for delivery to Mailman. Are you using Postfix/Mailman integration? Do you have a full set of aliases for each list including ones for the -owner address?
Also, what are the other Postfix log entries for queue ID 6D0973EB91?
Also, I note that the footer of the mailing list has: TESTmail list run by testmail-owner at lists.XXX.org.uk rather than the specific owner. Which suggests the same issue.
That's not related. That's the result of the fix for <https://bugs.launchpad.net/mailman/+bug/1694384 which wanted the actual addresses not displayed on public web pages.
Any clues as to what is not quite correct in the mailman setup?
Postfix delivery to the list-owner addresses.
The rest of this is personal and off topic and you can reply off list to
me, but you are not now a member of the mailman-users@python.org list. I
had trouble approving your post because you were subscribed to the list
as a user
, but your user
record had no associated address record.
This was causing all posts to the list (fortunately caught while yours
was still the only one) the be shunted because Mailman could not look up
the delivery status for your address. Needless to say, this should not
happen.
Please tell me as best as you can recall the steps you took and the order in which you took them in order to join the list.
-- 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. This is the postfix log around the time of the email from my account david.nicol@xxxxx.co.uk, which is not a member of testmail.
Apr 5 22:12:02 ip-172-26-1-182 postfix/pickup[8839]: 562AD3EB8F: uid=1002 from=<david.nicol@xxxxx.co.uk> Apr 5 22:12:02 ip-172-26-1-182 postfix/cleanup[9466]: 562AD3EB8F: message-id=<VI1PR09MB3598FF573E4BDA0AA9C71E78C2779@VI1PR09MB3598.eurprd09.prod.outlook.com> Apr 5 22:12:02 ip-172-26-1-182 postfix/qmgr[1716]: 562AD3EB8F: from=<david.nicol@xxxxx.co.uk>, size=11241, nrcpt=1 (queue active) Apr 5 22:12:02 ip-172-26-1-182 postfix/local[9468]: 562AD3EB8F: to=<testmail@localhost>, relay=local, delay=0.13, delays=0.04/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to command: /usr/lib/mailman/mail/mailman post testmail) Apr 5 22:12:02 ip-172-26-1-182 postfix/qmgr[1716]: 562AD3EB8F: removed Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: connect from localhost[127.0.0.1] Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: 69CEC3EB8F: client=localhost[127.0.0.1] Apr 5 22:12:05 ip-172-26-1-182 postfix/cleanup[9466]: 69CEC3EB8F: message-id=<mailman.16.1617660723.797.testmail@lists.xxx.org.uk> Apr 5 22:12:05 ip-172-26-1-182 postfix/qmgr[1716]: 69CEC3EB8F: from=<testmail-bounces@lists.xxx.org.uk>, size=1293, nrcpt=1 (queue active) Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: connect from localhost[127.0.0.1] Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: 6D0973EB91: client=localhost[127.0.0.1] Apr 5 22:12:05 ip-172-26-1-182 postfix/cleanup[9466]: 6D0973EB91: message-id=<mailman.18.1617660723.797.testmail@lists.xxx.org.uk> Apr 5 22:12:05 ip-172-26-1-182 postfix/qmgr[1716]: 6D0973EB91: from=<testmail-bounces@lists.xxx.org.uk>, size=13631, nrcpt=1 (queue active) Apr 5 22:12:05 ip-172-26-1-182 postfix/smtpd[9470]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 Apr 5 22:12:05 ip-172-26-1-182 postfix/smtp[9473]: 6D0973EB91: to=<testmail-owner@lists.xxx.org.uk>, relay=email-smtp.eu-west-2.amazonaws.com[x.x.x.x]:587, delay=0.25, delays=0/0.03/0.11/0.1, dsn=2.0.0, status=sent (250 Ok 010b0178a417c95d-aabe4f9d-9d5d-4508-849e-8902dc08c9b7-000000) Apr 5 22:12:05 ip-172-26-1-182 postfix/qmgr[1716]: 6D0973EB91: removed Apr 5 22:12:05 ip-172-26-1-182 postfix/smtp[9472]: 69CEC3EB8F: to=<david.nicol@xxxxx.co.uk>, relay=email-smtp.eu-west-2.amazonaws.com[x.x.x.x]:587, delay=0.27, delays=0.01/0.03/0.12/0.11, dsn=2.0.0, status=sent (250 Ok 010b0178a417c957-51900b52-b622-4d5c-9cb5-701458709957-000000) Apr 5 22:12:05 ip-172-26-1-182 postfix/qmgr[1716]: 69CEC3EB8F: removed
My (inexpert) reading was that it is showing:
- incoming email from david.nicol@xxxxx.co.uk
- email message back to david.nicol@xxxxx.co.uk - saying email is held. That email is received
- email message to testmail-owner about the held email
The work flow:
- emails for the club mailing lists: eg testmail@xxx.org.uk are sent to accounts sitting on the legacy version of google G-suite
- server sitting on AWS has a cron job running getmail6 which pulls emails from google, and delivers them to local email accounts
For installation of mailman, created an ansible script to do a basic install of
- python 2.7,
- apache2, and
- mailman - which was installed to /usr/lib/mailman
Installed postfix with a standard apt install
Tried to follow the instructions in GNU Mailman - Installation Manual Release 2.1 Barry Warsaw February 26, 2019
to configure mailman, and postfix. Use of getmail6 pretty much copied across from old server (getmail4) which had been running on Debian 8, for which the LTS had expired.
At the bottom of ‘$prefix/Mailman/mm cfg.py’ file I have: MTA = ’Postfix’
In the postfix main.cf file, i have alias_maps = hash:/etc/aliases, hash:/usr/lib/mailman/data/aliases alias_database = hash:/etc/aliases
postfix main.cf already had recipient_delimiter = +
- Ran the bin/genaliases script - checking file ownershp and edited main.cf to add in the map to the aliases
alias_maps = hash:/etc/aliases, hash:/usr/lib/mailman/data/aliases
part of /usr/lib/mailman/data/aliases is:
# STANZA START: testmail # CREATED: Fri Feb 5 20:25:21 2021 testmail: "|/usr/lib/mailman/mail/mailman post testmail" testmail-admin: "|/usr/lib/mailman/mail/mailman admin testmail" testmail-bounces: "|/usr/lib/mailman/mail/mailman bounces testmail" testmail-confirm: "|/usr/lib/mailman/mail/mailman confirm testmail" testmail-join: "|/usr/lib/mailman/mail/mailman join testmail" testmail-leave: "|/usr/lib/mailman/mail/mailman leave testmail"
The directory listing for: ls -l /usr/lib/mailman/data/alias* is -rw-rw-r-- 1 mailman mailman 3595 Feb 5 20:50 aliases -rw-rw-r-- 1 mailman mailman 12288 Feb 5 20:50 aliases.db
testmail-owner: "|/usr/lib/mailman/mail/mailman owner testmail" testmail-request: "|/usr/lib/mailman/mail/mailman request testmail" testmail-subscribe: "|/usr/lib/mailman/mail/mailman subscribe testmail" testmail-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe testmail" # STANZA END: testmail
with similar entries for the other mailing lists.
- Also configured amazon SES in postfix for outgoing email sending
- set up systemctl to autorun mailman on reboot.
David
On 4/6/21 3:37 PM, David Nicol wrote:
Thanks for your help. This is the postfix log around the time of the email from my account david.nicol@xxxxx.co.uk, which is not a member of testmail.
Apr 5 22:12:02 ip-172-26-1-182 postfix/qmgr[1716]: 562AD3EB8F: from=<david.nicol@xxxxx.co.uk>, size=11241, nrcpt=1 (queue active) Apr 5 22:12:02 ip-172-26-1-182 postfix/local[9468]: 562AD3EB8F: to=<testmail@localhost>, relay=local, delay=0.13, delays=0.04/0.01/0/0.09, dsn=2.0.0, status=sent (delivered to command: /usr/lib/mailman/mail/mailman post testmail)
This is your post to testmail@localhost being delivered to Mailman.
Apr 5 22:12:05 ip-172-26-1-182 postfix/smtp[9473]: 6D0973EB91: to=<testmail-owner@lists.xxx.org.uk>, relay=email-smtp.eu-west-2.amazonaws.com[x.x.x.x]:587, delay=0.25, delays=0/0.03/0.11/0.1, dsn=2.0.0, status=sent (250 Ok 010b0178a417c95d-aabe4f9d-9d5d-4508-849e-8902dc08c9b7-000000)
This is the message from Mailman to testmail-owner@lists.xxx.org.uk, but Postfix is not delivering it to Mailman but is realying it to email-smtp.eu-west-2.amazonaws.com.
In the postfix main.cf file, i have alias_maps = hash:/etc/aliases, hash:/usr/lib/mailman/data/aliases alias_database = hash:/etc/aliases
Good.
postfix main.cf already had recipient_delimiter = +
- Ran the bin/genaliases script - checking file ownershp and edited main.cf to add in the map to the aliases
alias_maps = hash:/etc/aliases, hash:/usr/lib/mailman/data/aliases
part of /usr/lib/mailman/data/aliases is:
# STANZA START: testmail # CREATED: Fri Feb 5 20:25:21 2021 testmail: "|/usr/lib/mailman/mail/mailman post testmail" testmail-admin: "|/usr/lib/mailman/mail/mailman admin testmail" testmail-bounces: "|/usr/lib/mailman/mail/mailman bounces testmail" testmail-confirm: "|/usr/lib/mailman/mail/mailman confirm testmail" testmail-join: "|/usr/lib/mailman/mail/mailman join testmail" testmail-leave: "|/usr/lib/mailman/mail/mailman leave testmail"
The directory listing for: ls -l /usr/lib/mailman/data/alias* is -rw-rw-r-- 1 mailman mailman 3595 Feb 5 20:50 aliases -rw-rw-r-- 1 mailman mailman 12288 Feb 5 20:50 aliases.db
The above lines seem misplaced. Assuming that the following are also in /usr/lib/mailman/data/aliases, that is correct.
testmail-owner: "|/usr/lib/mailman/mail/mailman owner testmail" testmail-request: "|/usr/lib/mailman/mail/mailman request testmail" testmail-subscribe: "|/usr/lib/mailman/mail/mailman subscribe testmail" testmail-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe testmail" # STANZA END: testmail
with similar entries for the other mailing lists.
- Also configured amazon SES in postfix for outgoing email sending
- set up systemctl to autorun mailman on reboot.
So what is the output from postconf -n
and are there any mailman
aliases in /etc/aliases. And what is the content of Postfix transport maps
Something in Postfix is relaying mail for testmail-owner to email-smtp.eu-west-2.amazonaws.com but delivering mail for testmail to Mailman.
It seems that either there is another alias for testmail that trumps the AWS relay but doesn't include the other list addresses or there is something that exempts the testmail address from the AWS relay but doesn't exempt the other addresses.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark
Apr 5 22:12:05 ip-172-26-1-182 postfix/smtp[9473]: 6D0973EB91: to=testmail-owner@lists.xxx.org.uk, relay=email-smtp.eu-west-2.amazonaws.com[x.x.x.x]:587, delay=0.25, delays=0/0.03/0.11/0.1, dsn=2.0.0, status=sent (250 Ok 010b0178a417c95d-aabe4f9d-9d5d-4508-849e-8902dc08c9b7-000000)
Thank-you for the relay explanation. The postconf -n command, yields for the settings which are overruled as:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases, hash:/usr/lib/mailman/data/aliases append_dot_mydomain = no biff = no compatibility_level = 2 inet_interfaces = loopback-only inet_protocols = all mailbox_size_limit = 0 mydestination = $myhostname, localhost, ip-172-26-1-182.eu-west-2.compute.internal, testlist.xxx.org.uk myhostname = testlist.xxx.org.uk mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = [email-smtp.eu-west-2.amazonaws.com]:587 smtp - various entries smtpd - various entries unknown_local_recipient_reject_code =
Re the misplaced line in /usr/lib/mailman/data/aliases, all the entries are there contiguously
# STANZA START: testmail # CREATED: Fri Feb 5 20:25:21 2021 testmail: "|/usr/lib/mailman/mail/mailman post testmail" testmail-admin: "|/usr/lib/mailman/mail/mailman admin testmail" testmail-bounces: "|/usr/lib/mailman/mail/mailman bounces testmail" testmail-confirm: "|/usr/lib/mailman/mail/mailman confirm testmail" testmail-join: "|/usr/lib/mailman/mail/mailman join testmail" testmail-leave: "|/usr/lib/mailman/mail/mailman leave testmail" testmail-owner: "|/usr/lib/mailman/mail/mailman owner testmail" testmail-request: "|/usr/lib/mailman/mail/mailman request testmail" testmail-subscribe: "|/usr/lib/mailman/mail/mailman subscribe testmail" testmail-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe testmail" # STANZA END: testmail
and output from the directory listing (which i was trying to use to show correct ownership of the files) does not appear in the middle. Cut and paste error.
David
And your other questions:
Are there a set of mailman aliases in /etc/aliases No, that file looks like I have never touched it. It contains
# See man 5 aliases for format postmaster: root
I do have mailman aliases in
/usr/lib/mailman/data/aliases
# STANZA START: mailman # CREATED: Sat Jan 30 22:48:49 2021 mailman: "|/usr/lib/mailman/mail/mailman post mailman" mailman-admin: "|/usr/lib/mailman/mail/mailman admin mailman" mailman-bounces: "|/usr/lib/mailman/mail/mailman bounces mailman" mailman-confirm: "|/usr/lib/mailman/mail/mailman confirm mailman" mailman-join: "|/usr/lib/mailman/mail/mailman join mailman" mailman-leave: "|/usr/lib/mailman/mail/mailman leave mailman" mailman-owner: "|/usr/lib/mailman/mail/mailman owner mailman" mailman-request: "|/usr/lib/mailman/mail/mailman request mailman" mailman-subscribe: "|/usr/lib/mailman/mail/mailman subscribe mailman" mailman-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe mailman" # STANZA END: mailman
What is the content of postfix transport maps. I ran postconf transport_maps
and got the response transport_maps =
On 4/7/21 3:00 AM, David Nicol wrote:
Mark
Apr 5 22:12:05 ip-172-26-1-182 postfix/smtp[9473]: 6D0973EB91: to=testmail-owner@lists.xxx.org.uk, relay=email-smtp.eu-west-2.amazonaws.com[x.x.x.x]:587, delay=0.25, delays=0/0.03/0.11/0.1, dsn=2.0.0, status=sent (250 Ok 010b0178a417c95d-aabe4f9d-9d5d-4508-849e-8902dc08c9b7-000000)
From the above, the mail to the -owner
address is
to=testmail-owner@lists.xxx.org.uk
Thank-you for the relay explanation. The postconf -n command, yields for the settings which are overruled as:
...
mydestination = $myhostname, localhost, ip-172-26-1-182.eu-west-2.compute.internal, testlist.xxx.org.uk
and the lists.xxx.org.uk domain is not in mydestination, thus that mail is sent to the relayhost. Mailman gets that domain from the list's host_name attribute and it must be in mydestination to avoid the mail being sent to the relayhost.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
David Nicol
-
Mark Sapiro