Recently I asked for advice on moving a Majordomo list, but I
didn't receive any help on the main issue, which is how to get
the word out to the stragglers that are still sending a subscribe
message to a disabled Majordomo list. I thought about the problem
some more and it seemed the solution might be in a procmail script
as a front end to the Majordomo alias, so I posted a query to
the procmail mailing list. Below is my post to that list, and
a very useful reply posted by Chuq Von Rospach, also a member
of majordomo-users. I implemented Chuq's scheme and it works
like a charm. Thanks, Chuq!
My original query to the procmail list:
I was running a Majordomo mailing list on my home computer until
a few months ago, when it moved to a large LISTSERV machine
across the country. From the various announcements still
existing around the Internet, I continue to receive a trickle of
subscription requests for that list to my Majordomo installation.
I would like to have a filter on the front end that will send an
informational message whenever it sees that mailing list name,
so I don't have to keep checking for and mailing by hand in
response to these inquiries.
Majordomo continues in operation on my machine, even though that
particular list is now disabled, and I want to make sure that
new subscribers still find their way onto the list. I would also
like to avoid modifying the perl code in Majordomo, for reasons
of simplicity and upward compatibility.
Mail comes addressed to Majordomo, which is a sendmail alias:
majordomo: "|/usr/local/majordomo/wrapper majordomo", /usr/majordomo/archive/majordomo
If incoming mail to this alias contains a certain string LISTNAME,
I would like to reply with a canned message and then throw away
the message, otherwise pass it to Majordomo as normal.
Can anyone offer any suggestions for how to solve this problem?
And Chuq's reply:
To: procmail Maillist <firstname.lastname@example.org>
From: Chuq Von Rospach <email@example.com>
At 1:31 PM -0700 8/21/97, A. Lester Buck III wrote:
>Mail comes addressed to Majordomo, which is a sendmail alias:
>majordomo: "|/usr/local/majordomo/wrapper majordomo",
first, set up your aliases a bit differently:
majordomo: "| /usr/local/bin/procmail -m /etc/procmailrcs/majordomo-front"
majordomo-real: "|/usr/local/majordomo/wrapper majordomo",
Then, in the majordomo-front file (make sure it's owned by majordomo's
account for safety),
<build a mailbot to respond. See the procmailex man page for examples>
What list does is check the body of the message for the name
of the list you want to intercept.If you find it, you do the
mailbot-thing with formail, the X-loop: stuff, etc. Whatever
level of sophistication you want. If it doesn't, fall through
and simply pass it along to the majordomo to play with.
I'm doing a lot of this kind of thing bulding bozo-filters on
my lists. It comes in real handy and saves hacking at majordomo,
and lets me build in situation-directed help (instead of blatting
out a generic 10K help file every time someone makes a mistake,
actually tell them what their mistake was and how to fix it...)
you could also call majordomo directly by replacing !majordomo-real
which might be more efficient but easier to forget where all the
pieces are when things need to be updated or changed. Whichever
Chuq Von Rospach (firstname.lastname@example.org) Apple IS&T Mail List Gnome
Plaidworks Consulting (email@example.com) <http://www.plaidworks.com/>
(<http://www.plaidworks.com/hockey/> +-+ The home for Hockey on the net)
A. Lester Buck firstname.lastname@example.org