3 # mailman-update-exim-db: Make an associated list mapping list names
4 # and the domain that they are associated with.
6 # This table is then used by Exim to verify that the list name and
9 # This script is meant to be called from a cron job, and run as root.
11 MMDIR
=/var
/lib
/mailman
14 TABLE
=/etc
/exim
4/mailmandb
16 # Use return as separator, never space or tab.
20 # Create table with the right permissions or clear it.
21 if test ! -f $TABLE; then
23 chown root
:mail $TABLE
24 chmod u
=rw
,g
=r
,o
= $TABLE
29 # Iterate through available lists
30 for i
in $
(find $LISTDIR -mindepth 1 -maxdepth 1 -type d
-print); do
32 DOMAIN
=$
(su list
-c "$BINDIR/config_list -o - $LIST" | \
33 grep -E "^host_name = '.+'" 2>/dev
/null | \
34 sed -r -e "s/host_name = '(.+)'/\\1/")
35 if test -n "$LIST" && test -n "$DOMAIN"; then
36 echo "$LIST: $DOMAIN" >> $TABLE