improve mailman-check
authorRalf Jung <post@ralfj.de>
Tue, 13 Nov 2018 09:47:57 +0000 (10:47 +0100)
committerRalf Jung <post@ralfj.de>
Tue, 13 Nov 2018 09:47:57 +0000 (10:47 +0100)
roles/email/files/mailman-check

index 595b28ce37c36ddad1334fe567367b5dc8b791cf..0a5d9deba46979faf8dc035ecdf27d3e2c939b17 100755 (executable)
@@ -4,14 +4,8 @@ set -e
 ##   ./mailman-check
 ## Checks all the mailman lists for bad configuration, and prints further details if it finds one.
 
-if ! test -d /var/lib/mailman; then
-    # nothing to do
-    exit 0
-fi
-
-cd /var/lib/mailman/lists
-for list in *; do
-    /usr/sbin/config_list  -i /dev/stdin "$list" <<EOF
+for list in $(list_lists -b); do
+    /usr/sbin/config_list -c -i /dev/stdin "$list" <<EOF
 if not ((mlist.dmarc_moderation_action in (1, 2) and mlist.dmarc_quarantine_moderation_action == 1) or mlist.from_is_list in (1, 2)):
     print "List",mlist.real_name,"by",(', '.join(mlist.owner)),"is not configured to deal with DMARC."
 if mlist.reply_goes_to_list != 0 and not mlist.first_strip_reply_to: