Postorius is a user-friendly web interface for Mailman 3, providing a modern user interface and streamlined workflows.
This tutorial will guide you through the steps to install Postorius on FreeBSD Latest operating system.
Before you begin with the installation, ensure that:
sudo
privileges.To install Postorius on FreeBSD, you need to have a few dependencies installed. You can install them using the pkg
package manager by running the following command:
$ sudo pkg install python3 py36-setuptools py36-pillow py36-lxml \
py36-django_recaptcha django-auth-ldap
To install Postorius, run the following command in your terminal:
$ sudo pip install postorius
Before configuring Postorius, you need to setup Mailman Core. Follow these steps:
Create the mailman
user by running the following command:
$ sudo pw user add mailman -c "Mailman User" -m
Generate a new configuration file for Mailman Core using the command:
$ sudo mailman-core createconf
This will create a configuration file /usr/local/etc/mailman.cfg
.
Edit the configuration file /usr/local/etc/mailman.cfg
and modify the following options:
[mta]
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
smtp_host: localhost
[archiver]
public: yes
[webservice]
hostname: 0.0.0.0
port: 8001
Save and close the file.
Create a systemd service for Mailman Core by creating a file /usr/local/etc/systemd/system/mailman.service
with the following contents:
[Unit]
Description=Mailman Core
Requires=network.target
After=network.target
[Service]
Type=forking
User=mailman
ExecStart=/usr/local/bin/mailmanctl start
ExecStop=/usr/local/bin/mailmanctl stop
ExecReload=/usr/local/bin/mailmanctl reload
PIDFile=/usr/local/var/run/mailman/mailman.pid
KillMode=mixed
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Reload systemd daemon and start Mailman Core service:
$ sudo systemctl daemon-reload
$ sudo systemctl start mailman.service
$ sudo systemctl enable mailman.service
After installing Postorius, you need to create a new Django project by running the following command:
$ sudo postorius-admin initlist -u <email> -r mailman -d <domain.tld>
Replace <email>
with your email address and <domain.tld>
with your domain name.
Next, open the configuration file created in the previous step /usr/local/mailman-web/settings_local.py
, and add the following configuration variables to the end of the file:
SOCIAL_AUTH_MAILMAN_KEY = '***'
SOCIAL_AUTH_MAILMAN_SECRET = '***'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'mailmanweb',
'USER': 'mailmanweb',
'PASSWORD': '***',
'HOST': 'localhost',
}
}
Replace ***
with a random secret key and the desired password for the PostgreSQL database.
Create a database for Postorius by running the following command:
$ sudo -u mailmanweb createdb mailmanweb
Apply database migrations:
$ sudo -u mailmanweb python /usr/local/lib/mailman-web/manage.py migrate
Create a systemd service for Postorius by creating a file /usr/local/etc/systemd/system/postorius.service
with the following contents:
[Unit]
Description=Postorius Django Web Interface for Mailman3
After=network.target
[Service]
Type=simple
WorkingDirectory=/usr/local/lib/mailman-web
ExecStart=/usr/local/bin/gunicorn mailman_web.wsgi:application -b 127.0.0.1:9001
User=mailmanweb
Restart=always
[Install]
WantedBy=multi-user.target
Reload the systemd daemon and start Postorius service:
$ sudo systemctl daemon-reload
$ sudo systemctl start postorius.service
$ sudo systemctl enable postorius.service
Postorius should now be accessible at http://localhost:9001/postorius/login/
.
You can login using the credentials specified during the postorius-admin initlist
command.
You have successfully installed Postorius on your FreeBSD system. Now, you can easily manage your Mailman 3 mailing lists through its user-friendly web interface.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!