Great Circle Associates Majordomo-Workers
(February 1999)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: mj2 + qmail?
From: Brian Grossman <brian @ SoftHome . net>
Organization: SoftHome
Date: Thu, 25 Feb 1999 23:42:21 -0700
To: majordomo-workers @ GreatCircle . COM
Cc: Jason L Tibbitts <tibbs @ math . uh . edu>, Russ Allbery <rra @ stanford . edu>
In-reply-to: Your message of "Thu, 25 Feb 1999 20:01:31 MST."


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:
Indexed By Date Previous: Re: Digests -- OK, so I'm a little slow...
From: Brock Rozen <brozen@torah.org>
Next: Re: mj2 + qmail?
From: Jason L Tibbitts III <tibbs@math.uh.edu>
Indexed By Thread Previous: Re: mj2 + qmail?
From: Brian Grossman <brian@SoftHome.net>
Next: Re: mj2 + qmail?
From: Jason L Tibbitts III <tibbs@math.uh.edu>

Google
 
Search Internet Search www.greatcircle.com