hi,
today i finally migrated my mailman3 instance from Debian/bookworm to Debian/trixie, using the Debian packages of mailman3. everything worked great, and i'm now running:
Mailman Core Version: GNU Mailman 3.3.10 (Tom Sawyer) Mailman Core API-Version: 3.1 Mailman Core Python-Version: 3.13.5 (main, Aug 10 2026, 12:06:59) [GCC 14.2.0]
the Debian packages have the instance is backed by a local PostgreSQL-17 instance (17.11.0)
- python3-django-hyperkitty 1.3.12
- python3-django-postorius 1.3.13
- python3-psycopg2 2.9.10
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
"constantly" meaning: about 4.5 times per second! or ~16400 lines per hour.
this is obviously triggered by the webinterface, as the errors stop
immediately if i issue a systemctl stop mailman3-web.
it's also notable, that I do not notice any actual problems on the webinterface, including the archives (so the DB connection seems to work fine). accordingly, /var/log/mailman3/web/mailman-web.log doesn't indicate any problems.
also, this issue is not something introduced by the upgrade: i got the same warnings with my old mailman3.3.8 instance with PostgreSQL-15. it's just that i noticed the errors only now.
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'
since everything appears to work, i might ignore the issue, but since the logfiles get pretty big due to the permanent logging, i'd rather not...
any ideas what is going on?
-- IOhannes m zmölnig IEM network operation center https://noc.iem.at/
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
On 10/30/26 09:37, Stephen J. Turnbull wrote:
Hi,
thanks for the quick answer.
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).
possible, but then i'm not a django nor psycopg2 expert, so i thought of asking here :-)
anyhow...
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', },
aye, this did the trick. since the connection is on localhost (albeit via TCP/IP) i'm happy to just turn SSL off.
thanks a lot.
gasmr IOhannes
IEM Network Operation Center (IOhannes m zmölnig) via Mailman-users writes:
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', },aye, this did the trick.
Glad to hear it! Thanks for the followup, we always like to hear the success stories. :-)
Regards, Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (2)
-
IEM Network Operation Center (IOhannes m zmölnig) -
Stephen J. Turnbull