Great Circle Associates Majordomo-Users
(February 2000)
 

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

Subject: "virtual hosting" with Majordomo 1.94
From: Morris Jones <mojo @ whiteoaks . com>
Date: Tue, 15 Feb 2000 13:12:05 -0800 (PST)
To: majordomo-users @ greatcircle . com

I did a little hack to majordomo 1.94 to add a "-w <hostname>" option to
the majordomo script.  This allows me to specify the $whereami variable
on the command line of majordomo.  If -w is specified, then I also set
the $whoami variable, which clobbers the $whoami from majordomo.cf.

At my site I host mailing lists for three astronomy clubs and one
bridge club, and while it's no big deal to have all of the majordomo
administrative email referring to "Majordomo@whiteoaks.com," I find it
aesthetically pleasing to use the registered domain names for each of
the organizations involved.

Below is a patch, if anyone is interested.

Does anyone have a good reason not to do this?

Best regards,
Mojo
-- 
Morris Jones         <*>
Campbell, CA
mojo@whiteoaks.com
http://www.whiteoaks.com

Patch to add "-w <hostname>" option to majordomo follows:
------------------ cut here ------------------- cut here ----------------
diff -Naur old/majordomo new/majordomo
--- old/majordomo	Tue Feb 15 21:02:14 2000
+++ new/majordomo	Tue Feb 15 21:01:51 2000
@@ -26,6 +26,7 @@
 
 # Read and execute the .cf file
 $cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf"; 
+undef $newwhereami;
 
 while ($ARGV[0]) {	# parse for config file or default list
     if ($ARGV[0] =~ /^-C$/i) {	# sendmail v8 clobbers case
@@ -36,6 +37,10 @@
         $deflist = $ARGV[1];
         shift(@ARGV); 
         shift(@ARGV); 
+    } elsif ($ARGV[0] eq "-w") {
+	$newwhereami = $ARGV[1];
+        shift(@ARGV); 
+        shift(@ARGV); 
     } else {
 	die "Unknown argument $ARGV[0]\n";
     }
@@ -45,6 +50,10 @@
 }
 
 require "$cf";
+if (defined($newwhereami)) { 
+    $whereami = $newwhereami;
+    $whoami = "Majordomo\@$whereami";
+};
 
 # Go to the home directory specified by the .cf file
 chdir("$homedir") || die "chdir to $homedir failed, $!\n";


Indexed By Date Previous: Re: Mderated lists...
From: "Bill Casti (System Admin)" <help@quality.org>
Next: Majordomo and Netscape Messaging Server
From: "Daniel chester" <talamar@chesternet.net>
Indexed By Thread Previous: Re: moderated list question
From: Paul English <tallpaul@mathworks.com>
Next: Majordomo and Netscape Messaging Server
From: "Daniel chester" <talamar@chesternet.net>

Google
 
Search Internet Search www.greatcircle.com