Sympa and Postfix+MySQL

I recently migrated a linux Ubuntu server from 20.04 to 22.04 (two LTS versions). I am always afraid to do a migration, just because testing nowadays is not what it used to be, and there are always migration problems, sometimes conducting to catastrophic results. It was the case this time. Pure-ftp-mysql stopped working and I had to replace it with wsftpd, which is very fast and efficient yet awkward to use. Nevertheless a good tutorial helped me and solved my problem. Thought of proftpd-mysql but it had failed on a similar upgrade so I did not want to loose my precious time. But the worse was yet to come. Mailman 2.1.29 (mailing lists) I was running for a non-profit educational organization stopped working with the error:

output: File "/usr/lib/mailman/bin/postfix-to-mailman.py", line 162
except SystemExit, argument: ^^^^^^^^^^^^^^^^^^^^ SyntaxError:
multiple exception types must be parenthesized

I resorted to a search and found out mailman 2.1.29 was "deprecated" and would not be more supported. Typical, instead of an automated migration they just say "deprecated". Tried to install mailman3 and use this guide to migrate. Difficulties and complexity were of such an order that I un-installed it right away. Not even the basic apache configuration is carried out. I considered other alternatives and the only one that seemed apropriate was Sympa. It was furthermore readily available to install in system repos (6.2.66) so I installed it with:
# sudo apt install sympa

sympa


Installation was successful right-away, I just had to provide a mysql password for the sympa-created database wich I shall designate by 123456

Then I edited /etc/sympa/sympa/sympa.conf.
I replaced domain by mydomain.org, put my email address myemail@mydomain.org as listmaster and replaced db_passwd by 123456. Finally I changed wwwsympa_url to https://mydomain.org/wws and restarted sympa with:
# sudo service sympa restart
and apache with:
# sudo service apache2 restart

Proceeded to the sympa web interface and created a confidential list called test. As I was the list master the list was automatically enabled. I found the interface quite easy to use and with quite comprehensive capabilities compared to mailman2
Next step to be able to use the list was integrating sympa with postfix+mysql. There problems started. I used this guide, found it outdated, proceeded to use this one not prone to be used with postfix+mysql and gave up, deciding to use my prior experience with mailman2 and postfix+mysql. That took me 2 days of withchraft and guessing. After I had things aligned in database terms and sympa trying to lauch list mail I still got the error:

The following address is not a known mailing list:
sympa.domain.org@domain.org

Let us review the steps leading to correct behaviour:

1. Edit postfix mail database

1.1. In transport table insert:
domain sympa.mydomain.org
transport sympa:

1.2. In forwardings table:

source test@mydomain.org
destination test@sympa@mydomain.org

source test-request@mydomain.org
destination test-request@sympa@mydomain.org

source test-editor@mydomain.org
destination test-editor@sympa@mydomain.org

and that was the end of modifications to postfix database

2. Postfix 3.6.4 configuration files

2.1. Now to postfix /etc/postfix/main.cf:

sympa_destination_recipient_limit = 1
sympabounce_destination_recipient_limit = 1

2.1. Now to postfix /etc/postfix/master.cf (and here was the main source of the problem):

sympa unix - n n - - pipe
flags=hqRu null_sender= user=sympa argv=/usr/lib/sympa/bin/queue ${nexthop} ${user}
sympabounce unix - n n - - pipe
flags=hqRu null_sender= user=sympa argv=/usr/lib/sympa/bin/bouncequeue ${nexthop} ${user}

And that's it, check with sudo postfix check and reload with sudo postfix reload.

To export mailman 2 list members:
# sudo list_members test>test.txt

Everything started to work properly and everybody lived happily ever after (till the next upgrade...)

All information is provided as is, without any warranties.
If you liked this page, you may express it below...it won't cost you a dime...