1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Create discussion lists with Public Cloud
This guide explains how to manually create a mailing list system with your Mail Service, using Mailman
and Infomaniak's Public Cloud!
⚠️ This guide is exclusively for users with advanced technical skills. No responsibility is assumed in case of damage or loss — be sure to back up your data before any manipulation. For assistance, contact a partner or launch a free tender. Also discover the role of the host.
Preamble
Mailman
is a free application for managing mailing lists, discussion lists, and newsletters.- The provided files allow you to easily set up
Mailman
. - The server and its firewall are deployed with
Terraform
, anInfrastructure as Code (IaaC)
tool, and its configuration is done withAnsible
. - This system allows you to create discussion lists for your various contacts (direction@, ecommerce@…).
Preparation…
… of your environment
- Having an Infomaniak Mail Service is essential to follow this tutorial.
- Download the files necessary for deploying
Mailman
on the Public Cloud via this GitHub repository.
… of the Mail Environment
- Create an address
mailman@domain.xyz
(help) and keep the password safe (used to configure the server). - Add the following aliases (help) :
- postorius
- mylist
- mylist-bounces
- mylist-confirm
- mylist-join
- mylist-leave
- mylist-owner
- mylist-request
- mylist-subscribe
- mylist-unsubscribe
Your mail environment is ready, time to deploy Mailman!
… of the Public Cloud
- Create a Public Cloud project and a user (help).
- Note: The Public Cloud password must be secure. 2FA authentication on your Infomaniak account is strongly recommended.
- Click here to access the OpenStack dashboard and use the identifier
PCU-XXXXXX
with the defined password. - Download your
openrc
file. It allows you to authenticate as an administrator in the command line (it contains information such as the identifier, password, and datacenter).
You are ready to connect to the OpenStack administration.
... of the instance
To make your future instance accessible via SSH, HTTP, and HTTPS, create a security group
with the following command:
openstack security group create --description "Ports 22 - 80 - 443 pour Mailman" mailman-sec
Add the necessary rules:
openstack security group rule create --dst-port 80 --protocol TCP mailman-sec
openstack security group rule create --dst-port 443 --protocol TCP mailman-sec
openstack security group rule create --dst-port 22 --protocol TCP mailman-sec
These steps can also be performed from the Horizon dashboard, in the Network → Security Groups tab. Refer to the Cloud documentation on this topic.
Deploy the instance that will host Mailman
with the command:
openstack server create --flavor a1-ram2-disk20-perf1 --security-group mailman-sec --network ext-net1 --key-name <votre-clé> --image "Debian 11.5 bullseye" mailman3
Once connected to the machine, update it:
sudo apt update && sudo apt upgrade -y
Install the openstack
client:
sudo apt install python3-openstackclient -y
Install Ansible
to automatically deploy Mailman
:
sudo apt install ansible -y
Deploying Mailman
To deploy Mailman
, import your SSH key and the OpenRC
file via SFTP to the installation machine.
Use tools like putty
, termius
, or mobaxterm
(or any SSH/SFTP client) with the following information:
- IP: IP address of the created machine
- Port:
22
- SSH Key:
.pem
file - User:
debian
In this guide, Termius
was used for the SFTP transfer.
Download the necessary files:
wget https://github.com/reneluria/mailman-cloud
Move the files:
mv cle.pem mailman/
mv PCP-XXXX.sh mailman/
Access the folder:
cd mailman/
Protect the key by assigning the correct permissions:
sudo chmod 600 tf-keypair.pem
Create an inventory
file to configure SMTP, the domain, etc.:
nano inventory
Fill in this template with your information:
mailman ansible_host=xxx.xxx.xxx.xxx
[all:vars]
ansible_python_interpreter=/usr/bin/python3
ansible_user=debian
ansible_ssh_private_key_file=id_tf_keypair
fqdn=mailman.<yourdomain>
mail_host=mail.infomaniak.com
mail_account=mailman@<yourdomain>
mail_password=<email_password>
mailman_user=mailman
mailman_password=<interface_password>
mailman_domain=<yourdomain>
mailman_email=<your_email>
Save with Ctrl + S
, then exit with Ctrl + X
.
Start the deployment:
ansible-playbook playbook.yml -D
Mailman
is now accessible at your IP address: X.X.X.X/mailman3
Log in
Log in with the credentials defined in the inventory
file for:
- Create a domain then a list « maliste »
In the list settings, it is recommended:
- DMARC Attenuations: « Replace de with the list address »
- Modify messages: « Reply to the list » and « Reply to the first band »