Skip to content

Instantly share code, notes, and snippets.

@drio
Created April 7, 2014 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drio/10026912 to your computer and use it in GitHub Desktop.
Save drio/10026912 to your computer and use it in GitHub Desktop.
Disable all the monthly reminders for all mailman mailing lists
#!/bin/bash
# vim: ts=2 et:
#
bin=/usr/local/cpanel/3rdparty/mailman/bin
for l in $($bin/list_lists -b)
do
# send_reminders = 0
echo $l
$bin/config_list -o - $l > /tmp/mm.config.$l # backup just in case
$bin/config_list -o - $l | grep -v "^#" | \
sed -s 's/send_reminders = True/send_reminders = 0/' > /tmp/_t
$bin/config_list -i /tmp/_t $l
done
rm -f /tmp/_t
# And you should restart mailman ...
# /usr/local/cpanel/3rdparty/mailman/bin/mailmanctl restart
# and remove /tmp/mm.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment