procmail
[Top] [All Lists]

Re: A bazillion processes

2004-04-17 03:09:22
On Sat, Apr 17, 2004 at 09:05:15AM +0200, Ruud H.G. van Tol wrote:
If there are only clean addresses on each line, it can be used on 
the left side, by changing it to an includable rc:

  myFriends = "
john(_dot_)relative(_at_)domain(_dot_)com
pete(_dot_)relative(_at_)domain(_dot_)com
"

Keep that friends.rc limited to a few KB of course.

  INCLUDERC = "friends.rc"
  :0
  *$ myFriends ?? ^[  ]*$MATCH[  ]*^
  { FRIEND = YES }


I do something similar I rolled myself to run a few small private
mailing lists.

In my main .procmailrc I have:

  :0  # 040126 () check some domains of mine for private list info
  * $   KEYCHECK  ??  ^^$MYFWDS^^
  * $ ! ^X-Sender:(.*\<)?${domKEY}bot(_at_)$\MYDOM^^
  { INCLUDERC = $SUBS/rc-lists }


Naturally, KEYCHECK was defined somewhere up above, as were $MYFWDS.
The KEYCHECK is derived from the gateway, since the lists go to
special addresses and domains of mine. 

Inside the rc-lists is this, in part:

 :0  # 040221 () check for a private list, set forward addressing
  { INCLUDERC = $HASH/mylists/$KEYCHECK }

 :0 A  # 040125 () deliver our list
  {
     LOGABSTRACT = all

     :0 whafi  # 021110 () Add X-Sender, Precedence headers; remove D-N-To:
      | formail -A"Precedence: junk"              \
                -I"X-Sender: ${domKEY}bot(_at_)$MYDOM" \
                -I"Disposition-Notification-To:"


     :0 w $COPY_ME  # 040126 () forward mail if LIST_DELIVERY is non-null
      * $  LIST_DELIVERY  ??  $TRUE
      ! $LIST_DELIVERY
  }


"$HASH" is where I have filename hashes.  If $KEYCHECK matches,
the includerc is run.  One might look like this inside:

  COPY_ME = c  # set to `c' if I'm on list

  LIST_DELIVERY="
  john(_at_)q(_dot_)public(_dot_)com
  paula(_at_)example(_dot_)com
"


Notice how, back in the rc-lists, I checked to see if $COPY_ME was set,
and if so, I dropped a copy in my own spool (without using sendmail
for my copy).

There's a w flag because underneath I do some checking to make sure
everything actually happened, and if not, I set some exit code stuff.

HTH,
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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