dbconfig-common to set up DB using mysql just doesn't work.sudo mysql -p -e "CREATE DATABASE IF NOT EXISTS sympa CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER IF NOT EXISTS 'sympa'@'localhost' IDENTIFIED BY '<RANDOM PASSWORD HERE>'; GRANT ALL PRIVILEGES ON sympa.* TO 'sympa'@'localhost'; FLUSH PRIVILEGES;" sudo bash -c 'cat >> /etc/sympa/sympa/sympa.conf <<EOF ###\\\\ Database parameters ////### db_type mysql db_host localhost db_user sympa db_passwd <RANDOM PASSWORD HERE> db_name sympa EOF'
apparently standard setup is with Apache? But this works
server {
listen 80;
server_name <SUBDOMAIN NAME HERE>;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name <SUBDOMAIN NAME HERE>;
ssl_certificate /etc/letsencrypt/live/<SOMETHINGSOMETHING>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<SOMETHINGSOMETHING>//privkey.pem;
root /usr/lib/cgi-bin/sympa;
access_log /var/log/nginx/sympa-access.log;
error_log /var/log/nginx/sympa-error.log;
location /static-sympa/ {
alias /usr/share/sympa/static_content/;
access_log off;
}
location /css-sympa/ {
alias /var/lib/sympa/css/;
access_log off;
}
location /pictures-sympa/ {
alias /var/lib/sympa/pictures/;
access_log off;
}
location / {
include fastcgi_params;
fastcgi_pass unix:/run/sympa/wwsympa.socket;
fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/sympa/wwsympa.fcgi;
fastcgi_param SCRIPT_NAME "";
fastcgi_param PATH_INFO $uri;
}
}
sympa unix - n n - - pipe
flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}
mydestination line: <YOUR SUBDOMAIN>hash:/etc/postfix/transport to the transport_maps linehash:/etc/sympa/aliases.sympa.postfix to alias_mapsalias_database = hash:/etc/sympa/aliases.sympa.postfixmessage_size_limit = 41943040sympa unix - n n - - pipe
flags=R user=sympa argv=/usr/lib/sympa/bin/queue ${recipient}
wwsympa_url <YOUR_SUBDOMAIN> # 1. Add email address text when list is created alias_manager /usr/lib/sympa/bin/alias_manager.pl # 2. compile email address text and add to db aliases_program /usr/sbin/postalias # 3. file Location for text and db sendmail_aliases /etc/sympa/aliases.sympa.postfix # If you have trouble change from default log_level 1 log_level 2 # The sympa manager defaults to sympa so emails to subscribe/unsubscribe etc. will come from sympa@DOMAIN. You can change this. For example, to have them come from manager instead add the below line: email manager
/etc/sympa/sympa/sympa.conf$SYSCONFDIR is /etc/sympa$LIBEXECDIR is /usr/share/sympa/binsyslog. View in realtime: sudo tail -f /var/log/syslog | grep --line-buffered -Ei 'sympa|wwsympa/var/log/mail.logPrecedence/etc/sympa/sympa/sympa.conf: remove_outgoing_headers Precedencesending/receiving setup → Header fields to be removed before message distribution (remove_outgoing_headers)(default)Sympa uses a “Cascading” template system. It looks for a template (like welcome.tt2) in this specific order:
/var/lib/sympa/list_data/[list_name]/mail_tt2/ (Highest Priority)/etc/sympa/[domain]/mail_tt2//etc/sympa/mail_tt2//usr/share/sympa/default/mail_tt2/ (Lowest Priority)message.footer) and one html (message.footer.mime)/etc/sympa/list_configs/[list_name]/message.footer.mime/etc/sympa/lists.lawrencemakers.org/message.footer.mimeetc/sympa/message.footer.mime/usr/share/sympa/default/message.footer.mimeList-Unsubscribe: <mailto:sympa@<DOMAIN>?subject=SIGNOFF%20<LIST_NAME>>, <https://<DOMAIN>/signoff/<LIST_NAME>/user@email.com>
/var/lib/sympa/list_data/<LISTNAME>/configAdmin → Edit List Config → DKIM/DMARC/ARCDMARC Protection → AllNew From name format → "Name" (via list)Admin → Edit List Config → Sending/Receiving Setup"Reply address" → change to AllAdmin → Edit List Config → Sending/Receiving SetupSubject tagging (custom_subject) → [% list.name %]Admin → Edit List Config → DKIM/DMARC/ARCNew From name format (phrase) → set to NameAdmin → Edit List Config → Sending/Receiving SetupMaximum message size (max_size)(default) → 20971520Who can review subscribers (review) → Restricted to subscribers (private)# make a home for the new default override sudo mkdir -p /etc/sympa/create_list_templates # copy from the original default sudo cp -r /usr/share/sympa/default/create_list_templates/discussion_list /etc/sympa/create_list_templates/ # edit to your heart's content: sudo emacs -nw /etc/sympa/create_list_templates/discussion_list/config.tt2
/usr/share/sympa/static_content/etc/sympa/sympa/sympa.conf:logo_html_definition <a href="https://<DOMAIN>"><img src="/static-sympa/<FILENAME>" alt="my great logo" style="max-height: 120px; width: auto; border: 0;"></a> # adjust max-height as appropriate favicon_url /static-sympa/<BASEFILENAME>.ico
yes I know this is a terrible workaround but couldn't figure out anything better
/usr/share/sympa/lib/Sympa/Mailer.pm to use no-reply@ instead of null. In the file:#change ($return_path eq '<>' ? '' : $return_path), '--', @rcpt; #to ($return_path eq '<>' ? 'no-reply@SYMPA_SUBDOMAIN' : $return_path), '--', @rcpt;
Mailer.pm ever gets updated:#!/bin/bash
FILE="/usr/share/sympa/lib/Sympa/Mailer.pm"
TARGET_MD5="<PUT MD5 HERE>"
# Check if the file exists
if [ ! -f "$FILE" ]; then
/usr/bin/echo "Error: File '$FILE' not found."
/usr/bin/logger -t checkMailer "Error: File '$FILE' not found."
/usr/bin/swaks --from FROM_ADDR --to TO_ADDR --h-Subject "checkMailer: FILE NOT FOUND" --body "Error: File '$FILE' not found." --server localhost
exit 1
fi
# Get the md5 of the file
MD5=$(md5sum /usr/share/sympa/lib/Sympa/Mailer.pm | awk {'print $1'})
# Compare the md5 to the target
if [ "$MD5" == "$TARGET_MD5" ]; then
/usr/bin/echo "INFO: md5 for $FILE matches target."
/usr/bin/logger -t checkMailer "INFO: md5 for $FILE matches target."
/usr/bin/swaks --from FROM_ADDR --to TO_ADDR --h-Subject "checkMailer: md5 matches" --body "Good news: the md5 of $FILE has not changed" --server localhost
else
/usr/bin/echo "WARNING: md5 for $FILE does NOT match target."
/usr/bin/logger -t checkMailer "WARNING: md5 for $FILE does NOT match target."
/usr/bin/swaks --from FROM_ADDR --to TO_ADDR --h-Subject "checkMailer: md5 does NOT match" --body "Bad news: the md5 of $FILE changed. Update null sender now." --server localhost
fi
chmod 755 and set up a daily cron for the script/etc/sympa/aliases.sympa.postfix add no-reply: "|/bin/true"sudo postalias /etc/sympa/aliases.sympa.postfixsudo postfix reload
Outlook is pretty unhappy with Content-Type: multipart/report. To fix this:
/etc/sympa/mail_tt2/delivery_status_notification.tt2 from Content-Type: multipart/report to Content-Type: text/plainsudo /usr/lib/sympa/bin/sympa.pl --purge_list=LISTNAME@SUBDOMAIN_OF_WEB_UI