Mailing-list Maintenance
The mailing-list runs through a software called mlmmj (Mailing List Management Made Joyful). It's a small C program that works on text files, ultra unix (or Linux?) in the approach.
There's no real maintenance that so far has been needed in the functioning of the software, except sometimes debugging a new post not being published to the list (that was the case of re-opening a VPS port rather than the software itself).
See how to setup mlmmj from scratch.
Adding or removing email does not work
Usually adding and removing a new email to the list should happen by simply sending... an email to the list. Sometimes, probably due to moving the list of subscribers to this new setup (the shell script to bulk-import the email address might have added extra "invisible" characters to each email?), this automatic operation does not work.
A first operation should be to run the following command:
ADDRESS=$1
LIST=$2
echo "removing $ADDRESS from $LIST list"
sudo /usr/bin/mlmmj-unsub -L /var/spool/mlmmj/$LIST -a $ADDRESS
echo "checking if address has actually been fully removed..."
sudo rg "$ADDRESS" /var/spool/mlmmj/$LIST/subscribers.d/
(replace rg
with grep
if you don't have it installed)
What the above does is to remove the given address from the given list and then grep through all the files inside the subscribers folder to check if it's still there. Optimally it should not!
If it does still, you need to:
cd
to/var/spool/mlmmj/<LIST>/subscribers.d/
- open the correct file (files inside this folder are organized one per each letter of the alphabet) based on the first letter of the email address you need to remove
- remove the line of the email address and save the file
Yes it's a bit of a manual labor. The mistake has already been done. It would be handy to write a new script (maybe not in bash but in Python) to re-import all the email addresses without these possible extra invisible characters (which once I tried to remove and somehow managed —I thought).
For posterity, this is the shell script to bulk-import a list of address from a text file, that was found on the mlmmj mailing-list:
INPUT=$1
LIST=$2
if [[ $# -lt 2 ]] ; then
echo "✕ Not enough arguments supplied: please pass INPUT (path/to/file-with-list-of-addresses) and LIST (eg /var/spool/mlmmj/<list>)"
exit 1
fi
while IFS= read -r ADDR; do
sudo /usr/bin/mlmmj-sub -L $LIST -f -q -s -a $ADDR
printf 'imported: %s\n' "$ADDR"
done < $INPUT