How to install Mailman on Debian Latest?

Introduction

Mailman is a free and open-source mailing list management software which allows you to manage email discussions and newsletters. In this tutorial, we will guide you through the installation process of Mailman on Debian latest version.

Prerequisites

Step 1: Update the System

Before installing any new packages on your system, it’s always recommended to update the system to the latest version. Open a new terminal window and run the command below to update the system.

sudo apt-get update && sudo apt-get upgrade

Step 2: Install Mailman on Debian Latest

Now that the system is up to date, we can start with the installation process of Mailman on Debian latest. Run the command below to install Mailman.

sudo apt-get install mailman

During the installation process, you will be asked to configure the Mailman package. You will be asked to provide a password for the Mailman list administrator and your email address.

You will also be asked if you want to listen to an IP address or a hostname. Choose the hostname option and provide the hostname of your server.

During installation, a new user called ‘list’ will be created on your system.

Step 3: Configure Apache and Mailman Mailing Lists

Now that the installation process is complete, we need to configure Mailman to use Apache web server to serve its web-based interface. We need to create a VirtualHost for Mailman.

First, enable the Apache configurations for the Mailman web interface using the command below.

sudo a2enconf mailman

Next, create a new Virtual Host configuration file for Mailman using the command below:

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

Paste the following configuration code in the file.

<VirtualHost *:80>
  ServerName lists.example.com
  ServerAdmin webmaster@example.com

  DocumentRoot /usr/share/mailman/cgi-bin/
  Alias /pipermail/ /var/lib/mailman/archives/public/

  <Directory /usr/share/mailman/cgi-bin>
     AllowOverride None
     Options ExecCGI FollowSymLinks
     Order allow,deny
     Allow from all
  </Directory>
 
  <Directory /var/lib/mailman/archives/public>
     Options FollowSymLinks
     AllowOverride None
     Order Allow,Deny
     Allow from all
  </Directory>

</VirtualHost>

Make sure to replace the ServerName and ServerAdmin with your actual domain name and email.

Save and close the file.

Next, enable the Virtual Host configuration by running the command below.

sudo a2ensite mailman.conf

Now restart the Apache web server by running the command below:

sudo systemctl restart apache2

Step 4: Create your first Mailman Mailing List

You can now create your first Mailman mailing list using the command below. Replace the ‘listname’ and ‘[email protected]’ with your desired listname and email address.

sudo newlist listname

You will be asked to provide a list admin email and password for the mailing list.

Congratulations! You have successfully installed and configured Mailman on Debian latest. You can now test the mailing list by sending an email to the list address.

Conclusion

In this tutorial, we have shown you how to install and configure Mailman on Debian latest version. Now, you can enjoy the benefits of managing email discussions and newsletters with Mailman.

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!