summaryrefslogtreecommitdiff
path: root/mailman
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-11-11 09:47:32 +0100
committerJonas Smedegaard <dr@jones.dk>2010-11-11 09:47:32 +0100
commit87d53b78b69cd9ff5deeabf3dbd172374b8c3461 (patch)
treea27ab39a972078aa4b8d8c84fc78c3079836aaea /mailman
parentf09e8af52b32365de60f6cad6215c024c7d6035f (diff)
Support optional emailhost and urlhost arguments to mklist(); drop unusused LISTDOMAIN.
Diffstat (limited to 'mailman')
-rw-r--r--mailman/mklist.inc7
-rwxr-xr-xmailman/mklist.pl3
2 files changed, 6 insertions, 4 deletions
diff --git a/mailman/mklist.inc b/mailman/mklist.inc
index 0bd6862..3c38c60 100644
--- a/mailman/mklist.inc
+++ b/mailman/mklist.inc
@@ -7,7 +7,6 @@ sharedir="/etc/local-COMMON/mailman"
skeldir="$sharedir/skel"
MAILDOMAIN="${maildomain:-`head -n 1 /etc/mailname`}"
-LISTDOMAIN="${listdomain:-lists.$MAILDOMAIN}"
OWNER="${owner:-listmaster@$MAILDOMAIN}"
LANG="${lang:-en}"
@@ -21,11 +20,13 @@ mklist() {
desc="$1"; shift
lang="${1:-$LANG}"
owner="${2:-$OWNER}"
+ emailhost="$3"
+ urlhost="$4"
if ! echo "$existinglists" | grep -q "^$list\$"; then
- newlist -l "$lang" -q "$list" "$owner" "`gpw | head -n 1`"
+ newlist -l "$lang" -q "$list" ${emailhost:+-e "$emailhost"} ${urlhost:+-u "$urlhost"} "$owner" "`gpw | head -n 1`"
fi
- LISTNAME="$list" LISTDESC="$desc" LISTOWNER="$owner" "$sharedir/mklist.pl" "$skeldir/$type.$lang.py" > "$list.py"
+ LISTNAME="$list" LISTDESC="$desc" LISTOWNER="$owner" ${emailhost:+LISTHOST="$emailhost"} "$sharedir/mklist.pl" "$skeldir/$type.$lang.py" > "$list.py"
config_list -i "$cfgdir/$list.py" "$list"
config_list -o "$cfgdir/$list.py" "$list"
}
diff --git a/mailman/mklist.pl b/mailman/mklist.pl
index 8d3936b..c15d799 100755
--- a/mailman/mklist.pl
+++ b/mailman/mklist.pl
@@ -25,7 +25,8 @@ while (<>) {
# Replace keywords - except in comments
s/^([^#]*)LISTNAME/$1$listname/g;
s/^([^#]*)LISTDESC/$1$listdesc/g;
- s/^([^#]*)LISTHOST/$1$listhost/g;
+ s/^([^#]*)LISTHOST/$1$listhost/g if ($listhost);
+ s/^([^#]*)LISTHOST/#$1/g unless ($listhost);
s/^([^#]*)SENDERS/$1$senders/g;
s/^([^#]*)SENDERFILTER/$1$senderfilter/g;
s/^([^#]*)LISTOWNER/$1$listowner/g;