I am out of town, but I found a copy of the message I sent to the list Sep 19 on my laptop, (how lucky...)
--
Notes: (also included as comments in the perl script)
Your list must have an open or auto (un)subscribe_policy if you do not
want the user to be burdened with a confirmation message. It will work
with open+confirm, but that kind of defeats the purpose, doesn't it.
This is how I set up the aliases;
listname-subscribe: "|/majordomo/wrapper subscribe listname"
listname-unsubscribe: "|/majordomo/wrapper subscribe -u listname"
You will need to edit the location of perl, and if you have a
preference, choose a $sender to match your taste as well.
Please consider this a skeleton with lots of room for flesh.
Dan Liston
--------BEGIN "subscribe" FILE-----------
#!/usr/local/bin/perl
# The above needs to be edited to match your system
# $Revision: 0.1 $
# $Date: 2000/08/09 12:54:16 $
# $Author: dliston $
# Shamelessly borrowed/stolen from request-answer
# PATH is set in the wrapper, so there is no need to set it here.
# syntax: wrapper subscribe [-u] <listname>
# where wrapper = fully qualified /path/to/majordomo/wrapper,
# subscribe = the name you saved this file as,
# [-u] = an optional "unsubscribe" modifier,
# and listname = the UNqualified name of your mailing list.
# Any variables defined in majordomo.cf will not be defined here.
# Example aliases file entry:
# $list-subscribe: "|/path/to/majordomo/wrapper subscribe $list"
# $list-unsubscribe: "|/path/to/majordomo/wrapper subscribe -u $list"
# Uncomment the $sender variable of your liking. Just be sure you
# have an entry in aliases that matches the $sender that you choose.
# The default $sender, owner-$list fits sendmail systems perfectly.
# NOTE: your mailing $list should be configured with an open or auto
# subscribe and unsubscribe policy for maximum script efficiency.
# Read and execute the .cf file
$cf = $ENV{"MAJORDOMO_CF"} || "/etc/majordomo.cf";
if ($ARGV[0] eq "-C") {
$cf = $ARGV[1];
shift(@ARGV);
shift(@ARGV);
}
if (! -r $cf) {
die("$cf not readable; stopped");
}
require "$cf";
chdir($homedir) || die("Can't chdir(\"$homedir\"): $!");
unshift(@INC, $homedir);
require "shlock.pl";
require "majordomo.pl";
&ParseMailHeader(STDIN, *hdrs);
$reply_to = &RetMailAddr(*hdrs);
$reply_to = join(", ", &ParseAddrs($reply_to));
$zub_command = "subscribe";
$list = $ARGV[0];
if ($list eq "-u") {
$zub_command = "unsubscribe";
$list = $ARGV[1];
}
die("$zub_command: $reply_to is not a valid return address.\n")
if (! &valid_addr($reply_to));
# robots should not reply to other robots...
if ($reply_to =~ m/$majordomo_dont_reply/i) {
&abort( "$whoami: not replying to $1 to avoid mail loop.\n");
}
$in_reply_to = $hdrs{"message-id"} . ", from " . $hdrs{"from"};
$sender = "owner-$list\@$whereami";
#$sender = "$list-owner\@$whereami";
#$sender = "$list-request\@$whereami";
#$sender = "$list-approval\@$whereami";
$mailcmd = eval qq/"$bounce_mailer"/;
if (defined($isParent = open(MAIL, "|-"))) {
&do_exec_sendmail(split(' ',$mailcmd))
unless $isParent;
} else {
&abort("Failed to fork prior to mailer exec");
}
print MAIL <<"EOM";
To: $whoami
From: $reply_to
Subject: mail to $list-$zub_command\@$whereami
In-Reply-To: $in_reply_to
$zub_command $list $reply_to
EOM
close(MAIL);
exit 0;
---------------END "subscribe" FILE-----------------
Final note:
I have tested both the subscribe and unsubscribe commands with
this file on my system successfully. This does not imply it
will work on your system. Use at your own risk.
" " wrote:
>
> Do you have any idea around what month I would find the script in in either
> list?
>
> >I can answer your question about the blank message going to a
> >listname-subscribe
> >address. Just dig back a few weeks in this archive, and the majordomo-
|
|