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";
|
|