When using .qmail-xxx-default, may I suggest using the DEFAULT environment
variable instead of the LOCAL environment variable?
I'm assuming one xxx per virtual domain.
Using LOCAL, you would see xxx-majordomo. With DEFAULT, you would
see just majordomo.
Below is a patch that uses DEFAULT if it's set and falls back to
LOCAL otherwise.
Brian
--- bin/mj_email- Thu Feb 25 19:58:06 1999
+++ bin/mj_email Thu Feb 25 19:56:56 1999
@@ -61,7 +64,8 @@
# -r - run as resend; -l _required_.
# -t - specify directory containing domains (arg)
# -v - specify debug verbosity (arg), default 50.
-# -Q - figure out addresses from $ENV{LOCAL} (for qmail)
+# -Q - figure out addresses from $ENV{DEFAULT} (for qmail)
+# (or use $ENV{LOCAL} if $ENV{DEFAULT} does not exist)
# -S - when done, exit 99 instead of 0 (for qmail)
getopts('d:l:moqQrSt:v:', \%opts);
@@ -437,11 +441,18 @@
}
-# look in $ENV{LOCAL} which tells us the local-part of the address we're
+# look in $ENV{DEFAULT} which tells us the local-part of the address we're
# being run at, and fake the other options. Expect that we were called
# with -d giving us the correct domain, so we don't have to fake that.
+# use $ENV{LOCAL} if $ENV{DEFAULT} does not exist.
sub do_qmail {
- my $addr = lc($ENV{LOCAL});
+ my $addr;
+ if(exists $ENV{DEFAULT}) {
+ $addr = lc($ENV{DEFAULT});
+ }
+ else {
+ $addr = lc($ENV{LOCAL});
+ }
my($list, $fun);
# First look at majordomo addresses
Follow-Ups:
|
|