From 0ee5381d8969827d4b2387315625148495907c33 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 11 May 2018 00:41:37 +0200 Subject: [PATCH] add mailman-check cronjob --- roles/postfix/files/mailman-check | 20 ++++++++++++++++++++ roles/postfix/tasks/postfix.yml | 13 ++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100755 roles/postfix/files/mailman-check diff --git a/roles/postfix/files/mailman-check b/roles/postfix/files/mailman-check new file mode 100755 index 0000000..595b28c --- /dev/null +++ b/roles/postfix/files/mailman-check @@ -0,0 +1,20 @@ +#!/bin/bash +set -e +## Usage: +## ./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" <