Hi,
First a disclaimer.
IEM Network Operation Center (IOhannes m zmölnig) via Mailman-users writes:
this is obviously triggered by the webinterface, as the errors stop immediately if i issue a
systemctl stop mailman3-web.
This is most likely a Django question (Django provides its own ORM to manage the PostgreSQL tables) or a psycopg2 question (but Django will be configuring that). It's marginally possible that it's a SQLAlchemy question (ie, Postorius or HyperKitty is triggering a query to Mailman core), but if it were, you'd likely see the incoming queries and failed outgoing connections being logged in mailman.log. If the advice below doesn't help, I'd suggest contacting the Django and/or psycopg2 people in parallel with following up here.
That said, my guess is that Debian or Django is configured by default to try to use TLS when talking to PostgreSQL.
today i finally migrated my mailman3 instance from Debian/bookworm to Debian/trixie, using the Debian packages of mailman3.
Usual disclaimer about distro packages: we don't recommend because you lose control over dependencies, and we developers all run either most recent release or beta versions in production. Some folks on this list do run from distro, but the Debian/Ubuntu maintainers do not respond on this list, so there are no experts on their patches here.
everything worked great, and i'm now running:
Mailman Core Python-Version: 3.13.5 (main, Aug 10 2026, 12:06:59)
Watch out for upgrades to Python 3.14. A critical dependency (the LMTP server that Mailman 3 uses to receive mail) did not support it last I looked.
I don't know if our dependencies (SQLAlchemy and Django ORM) officially support PostgreSQL 17, but they should.
during the upgrade, I noticed that postgresql is constantly writing warnings to its logfile, like so:
2026-10-29 17:26:06.875 CET [171290] [unknown]@[unknown] LOG: could not accept SSL connection: EOF detected
This is very commonly observed. PostgreSQL docs strongly suggest this is the client quitting without properly closing the connection.[1] My guess is that something is configured to prefer TLS connections, tries to start TLS, fails, and it just keeps trying.
OTOH, the default for the underlying libpq PostgreSQL client library is sslmode=prefer, so it falls back to a non-SSL connection. This explains why things work. It doesn't explain this:
"constantly" meaning: about 4.5 times per second! or ~16400 lines per hour.
None of the reports I saw mentioned this behavior. This is probably psycopg2-specific, but it could be Django.
accordingly, /var/log/mailman3/web/mailman-web.log doesn't indicate any problems.
here's the relevant section (afaict) from /etc/mailman3/mailman-web.py:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mailman3web.db', 'USER': 'REDACTED', 'PASSWORD': 'REDACTED', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': { }, } }the ssl related settings in my /etc/postgresql/17/main/postgresql.conf are (these are just the defaults, i didn't change anything):
ssl = on ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
That enables SSL, but otherwise doesn't do anything. To ask PostgreSQL to use TLS, you need to specify it in pg_hba.conf.[2][3] The usual approach is to use the "host" record, which *may* use SSL or not. Alternatives are "hostssl" records (*must* use SSL) and "hostnossl" records (*must not* use SSL).
Since PostgreSQL is saying "SSL failed", you're probably not using SSL. If PostgreSQL is dedicated to Mailman, I'd just turn SSL off. If you do want SSL for other hosts, try setting "'sslmode': 'disable'" in the 'OPTIONS' block in the DATABASES setting[4]:
'OPTIONS': {
'sslmode': 'disable',
},
Also, in both cases make sure that the address (typically localhost or a single domain or IP address) is in a "host" (or maybe "hostnossl" record in pg_hba.conf. (The comma at the end is optional in Python syntax but if you need to add other options later it can save you a syntax error. :-)
any ideas what is going on?
That's all I got. :-)
Steve
Footnotes: [1] This is pretty heavy concise jargon but it's the most general short reference I could find: https://thesev1database.com/errors/could-not-accept-ssl-connection-eof
[2] This is a straightforward, step-by-step explanation: https://www.percona.com/blog/enabling-and-enforcing-ssl-tls-for-postgresql-c...
[3] This is the PostgreSQL documentation: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
[4] This is untested by me, not sure it will work. You might also find other options such as 'sslnegotiation' will help. All this is above my pay grade at the moment. https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan