HCoop
/
clinton
/
scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mailman-update-exim-db: Allow extras file and permit multiple domains per listname
[clinton/scripts.git]
/
mailman-update-exim-db
diff --git
a/mailman-update-exim-db
b/mailman-update-exim-db
index
ed84d21
..
3dcfacd
100755
(executable)
--- a/
mailman-update-exim-db
+++ b/
mailman-update-exim-db
@@
-1,17
+1,18
@@
#!/bin/bash
#
#!/bin/bash
#
-# mailman-update-
table: Make an associated list mapping list names and
-# the domain that they are associated with.
+# mailman-update-
exim-db: Make an associated list mapping list names
+#
and
the domain that they are associated with.
#
# This table is then used by Exim to verify that the list name and
# domain are correct.
#
#
# This table is then used by Exim to verify that the list name and
# domain are correct.
#
-# This script is meant to be called from a cron job.
+# This script is meant to be called from a cron job
, and run as root
.
MMDIR=/var/lib/mailman
LISTDIR=$MMDIR/lists
BINDIR=$MMDIR/bin
TABLE=/etc/exim4/mailmandb
MMDIR=/var/lib/mailman
LISTDIR=$MMDIR/lists
BINDIR=$MMDIR/bin
TABLE=/etc/exim4/mailmandb
+TABLE_EXT=/etc/exim4/mailmandb-ext
# Use return as separator, never space or tab.
IFS="
# Use return as separator, never space or tab.
IFS="
@@
-33,6
+34,11
@@
for i in $(find $LISTDIR -mindepth 1 -maxdepth 1 -type d -print); do
grep -E "^host_name = '.+'" 2>/dev/null | \
sed -r -e "s/host_name = '(.+)'/\\1/")
if test -n "$LIST" && test -n "$DOMAIN"; then
grep -E "^host_name = '.+'" 2>/dev/null | \
sed -r -e "s/host_name = '(.+)'/\\1/")
if test -n "$LIST" && test -n "$DOMAIN"; then
- echo "$LIST
: $DOMAIN
" >> $TABLE
+ echo "$LIST
@$DOMAIN: true
" >> $TABLE
fi
done
fi
done
+
+# Add extras file, for aliases of domains and whatnot
+if test -f $TABLE_EXT; then
+ cat $TABLE_EXT >> $TABLE
+fi