Skip to content
Mailman 3 with Ubuntu 26.04 and Migration

Mailman 3 with Ubuntu 26.04 and Migration

November 11, 2026

The following article addresses various aspects related to a Mailman 3 installation. First, we will show how Mailman 3 can be installed as easily as possible with MariaDB, Nginx, Postfix, and Hyperkitty using APT on Ubuntu 26.04 Server. Next, we will examine various aspects of the configuration and demonstrate which settings should be configured.

  1. Set Variables

    SITE_OWNER=[email protected]"
    
    WEB_HOST="lists.vbox.local"
    MAIL_DOMAIN="lists.vbox.local"
  2. Install and Configure MariaDB

    Installation Using APT

    apt install -y mariadb-server

    Optimize MariaDB for Use with Mailman 3

    cat >/etc/mysql/mariadb.conf.d/99-mailman.cnf <<'EOF'
    [mysqld]
    
    innodb_file_per_table=1
    innodb_buffer_pool_size=512M
    innodb_log_file_size=256M
    
    max_allowed_packet=256M
    
    character-set-server=utf8mb4
    collation-server=utf8mb4_unicode_ci
    EOF
  3. Install Additional Required Packages

    apt install -y dbconfig-mysql
    apt install -y python3-mysqldb
    apt install -y python3-pymysql
  4. Install Mailman 3

    apt install -y mailman3-full

    For a local test installation, the following questions can be answered as shown below. For regular operation, they must be specific circumstances.

    Postfix

    • General mail configuration type
      • 5 = Local only
    • System mail name
      • lists.vbox.local

    Mailman3

    • Configure database for mailman3 with dbconfig-common?
      • Yes
    • MySQL application password for mailman3
      • Leave blank OR specify your own password
    • Password confirmation
      • Repeat password if necessary
    • Password of the database’s administrative user?
      • Leave blank

    Mailman3-Web

    • Configure database for mailman3-web with dbconfig-common?
      • yes
    • MySQL application password for mailman3-web?
      • Leave blank OR specify your own password
    • Password confirmation
      • Repeat password if necessary
    • Password of the database’s administrative user
      • Leave blank
  5. Complete the database configuration

    dpkg --configure -a
  6. Restart services

    systemctl restart mailman3
    systemctl restart mailman3-web
  7. Set the Site Owner

    sed -i \
      "s/^site_owner:.*/site_owner: ${SITE_OWNER}/" \
      /etc/mailman3/mailman.cfg
    systemctl restart mailman3
  8. Configure Postfix

    postconf -e \
    'relay_domains=hash:/var/lib/mailman3/data/postfix_domains'
    
    postconf -e \
    'transport_maps=hash:/var/lib/mailman3/data/postfix_lmtp'
    
    systemctl reload postfix
  9. Configure Mailman Web

    Here, the sample configuration mailman.example.com is replaced with the correct data.

    mkdir -p /var/log/nginx/mailman3
    
    touch /var/log/nginx/mailman3/access.log
    touch /var/log/nginx/mailman3/error.log
    
    sed -i \
    "s/server_name mailman.example.com;/server_name ${WEB_HOST};/" \
    /etc/mailman3/nginx.conf
    
    ln -sf \
      /etc/mailman3/nginx.conf \
      /etc/nginx/conf.d/mailman3.conf
    
    rm -f /etc/nginx/sites-enabled/default
    
    nginx -t
    
    systemctl reload nginx
  10. Create a Mailman Web superuser

    Here, you must assign a password for the web admin.

    mailman-web createsuperuser \
      --username admin \
      --email "${SITE_OWNER}"
  11. Configure the Django site

    cd /usr/share/mailman3-web
    
    python3 manage.py shell -c "
    from django.contrib.sites.models import Site
    s = Site.objects.get(id=1)
    s.domain='${WEB_HOST}'
    s.name='${WEB_HOST}'
    s.save()
    print(list(Site.objects.values()))
    "
    
    systemctl restart mailman3-web