Mailman is a free and open-source mailing list management software that allows you to create and manage email lists for your organization, company or personal use. In this tutorial, we will show you how to install Mailman on a Fedora Server Latest.
Before installing Mailman on your server, you need to install the required packages, including Python 3, MySQL or PostgreSQL, and Apache or Nginx.
To install, open a terminal and run the following command:
sudo dnf install python3 mysql-server mysql-devel nginx
To install Mailman on your server, you need to download the latest Mailman source code from the official website.
/usr/local/src/
.cd /usr/local/src/
sudo wget -c https://files.pythonhosted.org/packages/source/m/mailman/mailman-2.1.34.tgz
sudo tar xzvf mailman-2.1.34.tgz
cd mailman-2.1.34
bin/check_perms
script.sudo bin/check_perms
sudo python3 setup.py install
configure
script under the mailman/bin/
directory.cd /usr/local/src/mailman-2.1.34/mailman/bin
sudo ./configure --with-python=/usr/bin/python3
mailman
directories and files.cd /usr/local/src/mailman-2.1.34/
sudo chmod -R 2775 ./mailman
sudo chown -R root:mailman ./mailman
sudo chmod -R g+w ./mailman
After installing Mailman on your server, you need to configure it before you can use it.
mm_cfg.py
file under the mailman
directory.sudo vim /usr/local/mailman/mm_cfg.py
VIRTUAL_HOSTS.clear()
DEFAULT_URL_HOST = 'your-domain.com'
Save and close the file.
Verify Postfix's main.cf
and master.cf
files, then add the following settings at the end of the main.cf
file.
relay_domains = lists.your-domain.com
transport_maps = hash:/etc/postfix/transport
sudo touch /etc/postfix/transport
lists.your-domain.com mailman:
sudo postmap /etc/postfix/transport
sudo systemctl restart postfix
mm_cfg.py
file to reflect the following changes:MTA = 'Postfix'
SMTPHOST = '127.0.0.1'
SMTPPORT = 25
To set up the Mailman web interface, you need to configure your web server to serve the Mailman web interface.
sudo vim /etc/nginx/conf.d/mailman.conf
server {
listen 80;
server_name lists.your-domain.com;
access_log /var/log/nginx/mailman_access.log;
error_log /var/log/nginx/mailman_error.log;
location / {
proxy_pass http://127.0.0.1:8001/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
fastcgi_pass unix:/run/mailman-runner.sock;
include fastcgi_params;
}
location /icons/ {
alias /usr/share/icons/mailman;
}
}
Save and close the file.
Restart Nginx service:
sudo systemctl restart nginx
sudo vim /etc/httpd/conf.d/mailman.conf
Listen 8001
<VirtualHost *:8001>
ServerName lists.your-domain.com
DocumentRoot "/usr/local/mailman/cgi-bin/"
<Directory "/usr/local/mailman/cgi-bin/">
Options +ExecCGI
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
Require all granted
</Directory>
ScriptAlias /icons/ /usr/share/icons/mailman/
Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory "/usr/local/mailman/archives/public/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
<Location /mailman>
AuthType Basic
AuthName "Mailman"
AuthBasicProvider manager
Require valid-user
LogLevel debug
ErrorLog /var/log/httpd/mailman-error.log
CustomLog /var/log/httpd/mailman-access.log combined
</Location>
</VirtualHost>
Save and close the file.
Restart Apache service:
sudo systemctl restart httpd
In this tutorial, we have shown you how to install Mailman on a Fedora Server Latest. We have also demonstrated how to configure and set up the Mailman web interface on both Nginx and Apache web servers.
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!