#997019 mailman3: Mailman itself seems to be refusing LMTP connections from Exim4

#997019#5
Date:
2021-10-22 13:03:16 UTC
From:
To:
Dear Maintainer,

Thank you for all your work on the mailman3 package. I have just started to try to install this and migrating a mailman2 residual configuration.

I have been unable to get mailman to receive mail from Exim4. While exim4 is selecting the correct router and transport I am getting:

2021-10-21 22:29:38 1mdfd3-005vLS-T4 == roleplay@lists.piglets.com R=mailman3_router T=mailman3_transport defer (111): Connection refused

on all emails I am trying to send as tests to the lists.
----- Exim Config -----

My exim4 transport is as follows:

# /etc/exim4/conf.d/transport/55_mm3_transport
mailman3_transport:
  driver = smtp
  protocol = lmtp
  allow_localhost
  hosts = localhost
  port = MM3_LMTP_PORT
  rcpt_include_affixes = true

and the MM3_LMTP_PORT is defined here:

# /etc/exim4/conf.d/main/25_mm3_macros
# The colon-separated list of domains served by Mailman.
domainlist mm_domains=lists.piglets.com

MM3_LMTP_PORT=8024

# MM3_HOME must be set to mailman's var directory, wherever it is
# according to your installation.
MM3_HOME=/var/lib/mailman3
MM3_UID=list
MM3_GID=list

################################################################
# The configuration below is boilerplate:
# you should not need to change it.

# The path to the list receipt (used as the required file when
# matching list addresses)
MM3_LISTCHK=MM3_HOME/lists/${local_part}.${domain}
----- mta in mailman.cfg ----- The [mta] stanza of my mailman.cfg files is as below [mta] # The class defining the interface to the incoming mail transport agent. incoming: mailman.mta.exim4.LMTP #incoming: mailman.mta.postfix.LMTP # The callable implementing delivery to the outgoing mail transport agent. # This must accept three arguments, the mailing list, the message, and the # message metadata dictionary. outgoing: mailman.mta.deliver.deliver # How to connect to the outgoing MTA. If smtp_user and smtp_pass is given, # then Mailman will attempt to log into the MTA when making a new connection. smtp_host: 127.0.0.1 smtp_port: 25 smtp_user: smtp_pass: # Where the LMTP server listens for connections. Use 127.0.0.1 instead of # localhost for Postfix integration, because Postfix only consults DNS # (e.g. not /etc/hosts). lmtp_host: localhost lmtp_port: 8024 # Where can we find the mail server specific configuration file? The path can # be either a file system path or a Python import path. If the value starts # with python: then it is a Python import path, otherwise it is a file system # path. File system paths must be absolute since no guarantees are made about # the current working directory. Python paths should not include the trailing # .cfg, which the file must end with. configuration: python:mailman.config.exim4 #configuration: python:mailman.config.postfix
----- I have tried restarting all the relevant services. Telnet shows the runner to be listening root@gondolin:~# telnet localhost 8024 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 gondolin.piglets.org GNU Mailman LMTP runner 2.0 But for some reason all email inbound is being rejected as connection refused. I have probably made an elementary error, but I'm not sure where if so, so apologies in advance. Kind regards, CT. PS. I also ran into the issue #996560 of broken web links and fixed it with the same workaround
#997019#10
Date:
2021-10-25 09:09:09 UTC
From:
To:
Dear Maintainer,

I have fixed my issue. I finally realised this morning all my tests that the LMTP runner was running were on IPv4, and sure enough

telnet ::1 8024

showed “Connection refused”

There are no firewall rules that seem to be relevant, so I guess mailman3 is not reachable on IPv6 maybe but I haven’t investigated further.

In the meantime I have changed the transport for exim4 to be as follows:

# /etc/exim4/conf.d/transport/55_mm3_transport
mailman3_transport:
  driver = smtp
  protocol = lmtp
  allow_localhost
  # hosts = localhost
  # There seems to be a problem with the host being used in ipv6? Let's try this
  hosts = 127.0.0.1
  port = MM3_LMTP_PORT
  rcpt_include_affixes = true

Should it be working over IPv6? And if not, is this worth adding to README.Debian?

Many thanks for your work and apologies for the issue!

Kind regards,

CT.

#997019#15
Date:
2021-10-25 10:33:10 UTC
From:
To:
Colin Turner wrote:

The LMTP runner listens on 127.0.0.1:8024 by default however this can be changed in the mailman.cfg

https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/config/docs/config.html

However, I think the issue you ran into was Exim specific and not related to Mailman LMTP runner listening on ::1. I had a similar issue when upgrading to Bullseye and on the old host Mailman LMTP runner was still only listening on 127.0.0.1:8024. Based on this doc:

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_dnslookup_router.html

I made a slightly different edit to the transport:

mailman_transport:
  debug_print = "Email for mailman"
  driver = smtp
  protocol = lmtp
  allow_localhost
  gethostbyname
  hosts = localhost
  port = 8024
  rcpt_include_affixes = true

I never tried to make Mailman LMTP listen on IPV6.

Thanks.
Andrew.