procmail
[Top] [All Lists]

Re: Picking Off Sender's Address

1997-07-01 11:19:00

Re: Paul Barlett's question on running a mail list where
you're not supposed to.

I have some small mail lists that run this way (I can
give you the procmail and perl code if you like, but
it's pretty elementary):

Let's say that one list discusses banjos. The members know
that they have to start their subject lines like this:

  Subject: banjo:: Whatever the real subject is.

Procmail sees the double colon and extracts the sender address
and the list name (banjo), which it sends to a perl script.

The perl script uses fgrep to check that the sender is really
on the list; if not it sends a canned reply.  Otherwise, it
takes the addresses in the file and sends a copy of the email
to each one. It changes the sender name to "Banjo Discussion
List" (or whatever the keyword is).  It also inserts a line
at the beginning of the email that says

"Sender-name <sender address> writes:"

It also allows the commands "who" (to see whose on the list)
and "unsubscribe" which look like this:

  Subject: banjo::who
 
  Subject: banjo::unsubscribe

both use the same perl script as before which check that the
sender is really on the list.  "who" sends a copy of the
subscriber file and unsubscribe uses fgrep -v to take the
sender out of the file.

Subscribes I do myself because I want to know who is who.

It's simple and it works.

Kevin Kelleher <kevink(_at_)mit(_dot_)edu>

_________________________________________________________________________
Kevin Kelleher       <kevink(_at_)mit(_dot_)edu>         
http://world.std.com/~fury/

"The surest way to make a monkey of a man is to quote him."
        - Robert Benchley

<Prev in Thread] Current Thread [Next in Thread>