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 discussion list system with your Mail Service, this thanks to Mailman
and Public Cloud Infomaniak!
⚠️ This guide is exclusively for users with advanced technical skills. No responsibility is assumed for damages or losses—back up your data before proceeding. For additional help, 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.- These files are prepared so that you can easily set up
Mailman
. - The server and its firewall are deployed using
TerraForm
, anInfrastructure as a Code (IaaC)
tool, and the server is configured withAnsible
. - The software allows you to create discussion lists for your various contacts (direction@, ecommerce@…).
Preparation…
… of your environment
- Have a Infomaniak Mail Service to complete this tutorial.
- The files related to the deployment of
Mailman
on Public Cloud are to be downloaded from this Infomaniak GitHub.
... of the Mail Environment
- Create an address
mailman@domain.xyz
(help) and keep the created password safe (it will be used in the server configuration). - 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 for deployment!
… of the Public Cloud
- First, create a Public Cloud project and 1 user (help)
- Be careful with the Public Cloud password, 2FA authentication on your Infomaniak account is strongly recommended.
- Click here to access the Openstack dashboard and enter the
PCU-XXXXXX
with the password set previously. - Download your
openrc
file, which allows you to identify yourself as an administrator of your environment from the command line; it contains information such as the datacenter where your machines are located, your identifier, password, etc.
You now have the file you can use to connect to the Openstack administration.
... of the instance
To make your future instance accessible on its various communication ports (SSH & HTTP & HTTPS), create a security group
to assign a set of rules to a machine with the following command:
openstack security group create —description "Port 22 - 80 - 443 pour Mailman" mailman-sec
Add rules to the security group: mailman-sec
openstack security group rule create --dst-port 80 --protocol TCP mailman-secopenstack security group rule create --dst-port 443 --protocol TCP mailman-secopenstack security group rule create --dst-port 22 --protocol TCP mailman-sec
You can perform all of these commands graphically from the Horizon dashboard in the Network -> Security Group tab (refer to the cloud documentation for more information).
Deploy the instance that will contain MailMan
. For command line use, you can use the following 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 you are connected to the machine, update it:
sudo apt update && sudo apt upgrade -y
Install the openstack
client:
sudo apt install python3-openstackclient -y
Installation of Ansible
(allowing to deploy mailman
automatically):
sudo apt install ansible -y
Deployment of Mailman
To deploy Mailman
on the machine, import the SSH key and your OpenRC
file via SFTP into the machine running the Ansible
configuration.
Use software/clients like putty
, termius
, mobaxterm
... (any tool that handles SSH / SFTP) to easily perform the import, you will just need to enter the following information to connect to the machine:
- IP of the previously created machine
- port:
22
- previously created SSH key: import the
.pem
file - user:
debian
In this guide, the software Termius
was used to transfer files via SFTP to the machine.
Download the folder containing the installation files:
wget https://github.com/reneluria/mailman-cloud
You must now move the SSH key and the PCP file into the downloaded folder:
mv cle.pem mailman/mv PCP-XXXX.sh mailman/
Navigate to the file:
cd mailman/
Set the permission 600
on the key to protect and execute it:
sudo chmod 600 tf-keypair.pem
Create a file inventory
to define the parameters: SMTP, Domain…
nano inventory
You need to fill in this file with the following template, modifying the commented lines with your environment variables:
mailman ansible_host
= Public IP of the target VM
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=parano.ch
mailman_email=<your_email>
Run the command ctrl + s
then ctrl + c
to exit Nano
.
Still in the mailman directory, run the script with ansible
:
ansible-playbook playbook.yml -D
Mailman
is now deployed on your IP address: X.X.X.X/mailman3
Log in
Log in to mailman with the credentials provided in the inventory
file mentioned above to then:
- > Create a domain -> create my list "maliste"
In the list of settings, change:
- DMARC Attenuations: it is recommended to use "Replace from with the list address"
- Modify messages: it is recommended to use "Reply to list" and "Reply to sender"