sys

  1. vim /etc/hosts
  2. apt install apache2 php-{bcmath,common,curl,fpm,gd,intl,mbstring,mysql,soap,xml,xsl,zip,cli}
  3. ai mailman3-full postfix
  4. vim /etc/mailman3/mailman.cfg

apache

  1. cp /etc/mailman3/apache.conf /etc/apache2/sites-available/mailman.conf
  2. vim /etc/apache2/sites-available/mailman.conf
  3. a2ensite mailman
  4. a2dissite 000-default.conf
  5. a2enmod proxy_uwsgi
  6. systemctl reload apache2

/etc/apache2/sites-available/mailman.conf

<VirtualHost *:80>

ServerName    lists.bubuit.net
DocumentRoot    /var/lib/mailman3/web/static

Alias /favicon.ico /var/lib/mailman3/web/static/postorius/img/favicon.ico
Alias /static      /var/lib/mailman3/web/static

<Directory "/var/lib/mailman3/web/static">
    Require all granted
</Directory>

<IfModule mod_proxy_uwsgi.c>
    ProxyPass /favicon.ico !
    ProxyPass /static !
    ProxyPass /    unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost/
</IfModule>

</VirtualHost>
 

/etc/postfix/main.cf

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.3.0/24
inet_interfaces = all

postfix proxy

  1. postconf -e 'relay_domains = lists.bubuit.net'
  2. postconf -e 'mailman_destination_recipient_limit = 1'
  3. postconf -e 'transport_maps = hash:/etc/postfix/transport'
  4. postmap /etc/postfix/transport
  5. service postfix restart

mailman

  1. less /usr/share/doc/mailman3/README.Debian
  2. mailman-web createsuperuser
  3. mailman-wrapper create mailman@lists.bubuit.net

/etc/aliases

www-data: root
list:    root

newaliases
postfix reload

deBug

  1. ap mailman3-full
  2. ai mailman3-full
  3. dpkg-reconfigure mailman3
  4. service mailman3 status
  5. dpkg-reconfigure mailman3-web
  6. service mailman3-web status
  7. mailman-wrapper info
  8. t -n50 /var/log/mailman3/*.log
  9. t -n50 /var/log/mailman3/web/mailman-web.log
  10. t -n50 /var/log/apache2/access.log
  11. journalctl
  12. lsof -Pni
  13. dig mx lists.bubuit.net
/usr/lib/python3/dist-packages/django_q/conf.py:139: UserWarning: 
Retry and timeout are misconfigured. Set retry larger than timeout, 
failure to do so will cause the tasks to be retriggered before completion. 
See https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
/usr/share/mailman3-web/settings.py

Q_CLUSTER = {
   'timeout': 30,
   'save_limit': 100,
   'orm': 'default',
   'poll': 5,
}

django_mailman3.MailDomain: (models.W042) 
Auto-created primary key used when not defining a primary key type, 
by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the DjangoMailman3Config.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
/usr/share/mailman3-web/settings.py

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

Links

  1. https://docs.mailman3.org/projects/mailman/en/latest/README.html
  2. https://www.linuxcloudvps.com/blog/how-to-install-mailman3-on-debian-11/
  3. https://www.mailmanlists.net/en/faq/15
dns record