A tool to ask users of a mailman mailing list to reconfirm membership by clicking on a link
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Max Mehl 74a7a40427
add executable permission and fix syntax
10 months ago
.drone.yml re-add comma for ansible hosts list 10 months ago
.gitignore Avoid commiting the db 1 year ago
Dockerfile run everything as root to solve nasty permission issues 10 months ago
README.md after b9f57b7 permission do not have to be modified any more 10 months ago
gen_database.sh add executable permission and fix syntax 10 months ago
gen_links.pl Use HTTPS when generating the links 11 months ago
playbook.yml improve deployment commands 10 months ago
reconfirm.pl Use a separate folder for the data 1 year ago


Mailman reconfirmation tool

The goal of this tool is to be able to ask users to reconfirm they want to be part of a mailing list. We do that by sending a email to each member of the list, asking to click on a link if they’re still interested in being a member of the list.


SQLite database

We create a sqlite table reconfirm.db with the following columns:

  • email
  • UUID
  • confirmed, defaults to 0

With this command:

create table reconfirm (id INT PRIMARY KEY, email TEXT NOT NULL, uuid TEXT, confirmed INTEGER default 0);


On debian run the following commands to install the script’s dependencies:

apt-get install uuid-dev sqlite3
cpan install DBI Mojolicious DBD::SQLite UUID


Run the script:

perl reconfirm.pl daemon -l http://[::]:3000

The program will create random UUID for each row in the sqlite database. We can after that create links to send to the mailing list members that look like this:


Generating confirmation links

Once the SQLite database is populated and the script has been running, generate the links with the script gen_links.pl. Put it in the same directory as the database, and then run it with:

perl gen_links.pl --host <hostname hosting the reconfirm-mailman service>

This will generate a file called links.csv with the association email <=> link. The links can be sent to the mailing list members.


Is it also possible to use the Dcokerfile directly. For this run:

docker build -t reconfirm-mailman https://git.fsfe.org/fsfe-system-hackers/mailman-reconfirm.git
docker run -v /path/to/sqlitereconfirm_db:/home/perlscript/mailman-reconfirm --name mailman-reconfirm -p 3000 reconfirm-mailman


A playbook can be used to deploy the container remotely.

ansible-playbook playbook.yml -i lund.fsfeurope.org

Usage on the FSFE’s Docker deployment

If deployed via the FSFE’s Drone/Ansible/Docker toolchain, the usage of this tool will look like the following:

  1. Create a list of the email addresses to be confirmed in /srv/mailman-reconfirm/data/, e.g. called mails.txt. It has to be one email per line.
  2. Enter the docker container in which all necessary tools are already installed by docker exec -it mailman-reconfirm bash
  3. In ~/mailman-reconfirm, execute the helper script with ./gen_database.sh data/mails.txt data/reconfirm.db. The script asks for each step. For a complete re-creation of the database, always enter y. Make sure you saved the old database to a safe place if it is still needed for another operation.
  4. Enter the data subdirectory and execute perl ../gen_links.pl --host mailman-confirm.fsfe.org to create a file called links.csv.

The links.csv file is a comma-separated list of mail addresses with the confirmation links. You can use tools like the Thunderbird addon “Mail Merge” to auto-generate emails for each address with the respective link.


This software is copyright 2018 by the Free Software Foundation Europe e.V. and licensed under the GPLv3 license. For details see the “LICENSE” file in the top level directory of https://git.fsfe.org/fsfe-system-hackers/mailman-reconfirm