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
15 TABLE_EXT
=/etc
/exim
4/mailmandb-ext
17 # Use return as separator, never space or tab.
21 # Create table with the right permissions or clear it.
22 if test ! -f $TABLE; then
24 chown root
:mail $TABLE
25 chmod u
=rw
,g
=r
,o
= $TABLE
30 # Iterate through available lists
31 for i
in $
(find $LISTDIR -mindepth 1 -maxdepth 1 -type d
-print); do
33 DOMAIN
=$
(su list
-c "$BINDIR/config_list -o - $LIST" | \
34 grep -E "^host_name = '.+'" 2>/dev
/null | \
35 sed -r -e "s/host_name = '(.+)'/\\1/")
36 if test -n "$LIST" && test -n "$DOMAIN"; then
37 echo "$LIST@$DOMAIN: true" >> $TABLE
41 # Add extras file, for aliases of domains and whatnot
42 if test -f $TABLE_EXT; then
43 cat $TABLE_EXT >> $TABLE