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