Craig's Mailman Page

Here are some notes about a Mailman 3 installation I did on a FreeBSD 14.4 system using sendmail as the MTA. I do not use an archiver (e.g. HyperKitty).

Mailman 3 is really designed to be used with postfix.


Packages

This a list of the main packages I installed. When added to a system that already runs apache24, these and their dependencies total more than 50 packages.

If you want to use an archiver, you might also install:


Apache Configuration

Here is an example apache virtual host config: lists.example.conf.conf.txt

Importantly, port 8000 is available on 127.0.0.1 to handle rest api requests.


Postorius WSGI Application

The Postorius distribution includes an example app; it's in the example_project subdirectory.

Here's a tarchive containing a slightly modified version: postorius.tar.gz

My version of the app assumes a Mailman dedicated virtual server (e.g. lists.example.com). To run Mailman 3 on a site with other content and/or apps, you will need to change the WSGIScriptAliasMatch line in the apache config:

    WSGIScriptAliasMatch ^/mainman(/.*)$ /www/lists.example.com/postorius/wsgi.py$1

and change the postorius re_path() call to:

    re_path(r'^mailman/', include('postorius.urls')),

As with Django apps it's necessary to initialize the sqlite3 database and setup the admin account; do this as a non-root user in group mailman:

cd /www/lists.example.com/postorius
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser

Make sure run/postorius.db is writable by group www.


Sendmail Configuration

The LMTP protocol is normally used to inject mail messages into Mailman. While sendmail can deal with LMTP, it is tricky to get it to work and live alongside local mail delivery. I've found two approaches that work:


Mailman Configuration File

This goes in /usr/local/mailman/etc/mailman.cfg:

[mailman]
site_owner: admin@example.com
use_https: yes

[mta]
configuration: python:mailman.config.exim4
incoming: mailman.mta.exim4.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: 127.0.0.1
lmtp_port: 8024
smtp_host: 127.0.0.1
smtp_port: 25

[webservice]
hostname: localhost

We aren't using exim4 but the Mailman default config assumes postfix and it will generates errors to run Mailman configured for postfix when postfix is not installed.


Final Installation Tasks


Copyright © 2026
Craig Leres