procmail
[Top] [All Lists]

Re: Simple Procmail Listserv

1997-04-11 01:19:00
At 11:15 PM 4/10/97 -0500, Dave/WebMaster elucidated thus:

You might want to check into SmartList (I've got no experience with it
whatsoever, but it sounds like it should do most of what you want to do here).

Would someone please post a simple procmail recipe for a majordomo, 
listserv type autoresponder? I'm trying to help a friend set up a  Jokeswap
list. It doesn't need to be very fancy. Just capture the  incoming email and
point it to jokeswap file in the pine mail directory  where a copy is kept.
 
Are the users supposed to be able to self-subscribe, or are they added by
the list administrator?  I handle them via the latter method, since my
lists are by invitation only.  The former method is considerably trickier.

The submitter's email addy should be in a text file list for verification to
regulate stuff that gets posted and jokers don't SPAM the list. Its also 

Choose the header for this carefully.

Since the lists I maintain are all closed subscription (non public
submission addresses), I don't worry too much about blocking submissions -
besides, it has come in handy that someone can post from outside their
regular account if the need arises.  My spam filtering occurs sometime
before ANY remailer scripts, so messages that fall under known spam rules
never make it into the system.

preferable that the submitter's addy be removed from the Bcc: list and 
doesn't received a copy of their own email.

You might want to reconsider this -- I find that receiving a copy of the
posted messages acts as a good indicator that it crossed the list
successfully, which keeps repeat "I don't know if I sent this or not" posts
down.  This would hold particularily true for a remailer which isn't really
DISCUSSION, but forwards of jokes people have received from elsewherem,
where accidental repetition is sure to occur.

If this is too complex a request, how about a forwarding script or 
something that can be emailed to. Let's say someone sends me an email and 
procmail directs it to file. I read the joke and its okay so I forward it 
to an email addy that Bcc's to the recipient list or somesuch. I'm not  sure
of what options are available.

Depending on the complexity you want to make it, this can be fairly simple,
say  you could have a keyword in the subject, or a special optional header
(which is stripped out by the remailer recipe before it forwards the
message along to the list), or the script could automatically say if YOU
sent it, it is okay to distribute.  Or you could have a totally different
submission address YOU send it to, but formail would strip that out of the
message before sending it along to look as if it came from the user
submission list.

Follows is a pared down version of what I use (I have a separate script and
shellable execuatble which maintains the user name database, which is
simply an editable file with all the email addresses in it):


#change these two items

domain=domain.com
listname=humourlist

listaddr=$listname(_at_)$domain
listowner=$listname-mailer(_at_)$domain
listreq=$listowner
listdist=$LISTDIR/$listname
sendmailOPT=" -oem -odb -oi -F$listaddr "

:1 c:
* ^TO$listaddr
|gzip -9fc>>$MAILDIR/listname.gz


:0 A wfh
* $!^X-Loop: $listaddr
* !^Precedence:.*junk|^FROM_MAILER
| formail -b -IReturn-Receipt-To: -IErrors-To: \
   -I"Return-Path: \<$listowner\>" -iX-Envelope-To: -iX-Envelope-From: \
   -I"Precedence: list" -I"Resent-Sender: $listowner" \
   -a"Resent-From: $listaddr" -a"X-Loop: $listaddr" \
   -I"Reply-To: $listaddr" \
   -a"Subject: Unidentified subject!" \
   -a"X-Mailing-List: <$listaddr>"

:0 Aw
! $sendmailOPT `cat $listdist`

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