procmail
[Top] [All Lists]

Re: running mailing lists off of procmail

1997-07-21 22:35:00
On Mon, 21 Jul 1997, TWiGGY wrote:
---
:fc
* ^TOSpookInfo(_at_)uiuc(_dot_)edu
* !^X-Loop: SpookInfo(_at_)uiuc(_dot_)edu
* ^Subject:\/.*
| formail -I "X-Loop: SpookInfo(_at_)uiuc(_dot_)edu" \
          -I "Subject: SpookInfo: $MATCH"
  :Awi
  ! `cat $HOME/.spookinfo.list`

---
Lastly, I'd like to prohibit people who aren't contained in 
.spookinfo.list frmo emailing the list (this hasn't been a problem 
either, but again, I may as well stop it before it starts ;)

I'm highly confused by formail and sed's crazy syntax, so, any help would 
be greatly appreciated...

Formail is easy to understand, sed, now that's a different matter
altogether... 

I've been using the recipe below for several months with great success. 
You are welcome to use it and it will lock out non-members. You can
actually run many mailing lists from the same address by having the
members add the mailing list name to their address books (Yourlist
<you(_at_)domain(_dot_)org>) and have procmail grep the listname from the To: 
field. 

        :0w
        * ^(To|Cc):.*$LIST_NAME
        * $!^X-Loop:.*"$LIST_ADDRESS"
        {
        :0fw
        * ? fgrep -is "$WHOM" "$MEMBER_FILE"
        | ( formail -zk \
        -I"Date:" -XDate: \
        -XFrom: \
        -XSubject: \
        -I"To: $LIST_NAME <$LIST_ADDRESS>" -XTo: \
        -I"Reply-To: $from" -XReply-To: \
        -I"X-Sender: $LIST_NAME <$LIST_ADDRESS>" -XX-Sender: \
        -I"Errors-To: <$OWNER_ADDRESS>" -XErrors-To: \
        -I"Precedence: list" -XPrecedence: \
        -I"X-Loop: $LIST_ADDRESS" -XX-Loop: \
        ; cat -s $SIG_FILE )

                :0aw
                {
                :0w
                * ? egrep -is "$FROM" "$NOACK_FILE"
                ! `fgrep -iv "$FROM" "$MEMBER_FILE"`
#               :0w
#               ! `cat -s "$MEMBER_FILE"`
                }


There are also sub/unsub recipes... and I'm always open to suggestions 
and improvements.

Regards,

Dave/Webmaster

           Join www.cauce.org | Join Joke-L
  Hit SPAMMERS Where It Hurts | Listserv <listserv(_at_)ddave(_dot_)com>
````````````````` Confirmed kills and counting...
"God grant me the serenity to accept the things I cannot change, 
the courage to change the things I can, and the wisdom to hide 
the bodies of the SPAMMERS that I had to kill."

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