procmail
[Top] [All Lists]

Re: How can procmail handle the multiple names (Was Unidentified subject!)

1996-07-21 11:36:00
On Fri, 19 Jul 1996, B Schlank wrote:

Every once in a while, I (well my boss) needs to send them all memos at the
same time.  How can procmail handle the multiple names without quitting out
after the first one (does that make sense?)  Would something like this work:

         :0 c
             * ^TOjim(_at_)mydomain(_dot_)com
             ! jim(_at_)aol(_dot_)com

         :0 c
             * ^TOal(_at_)mydomain(_dot_)com
             ! al(_at_)aol(_dot_)com

         :0 c
             * ^TOcharles(_at_)mydomain(_dot_)com
             ! chuck4(_at_)aol(_dot_)com

If You also do this, it will work:

SAVELASTFOLDER=$LASTFOLDER
LOGABSTRACT=no

:0
* ^TO(jim|al|charles)@mydomain.com
* !^TO yourself(_at_)mydomain(_dot_)com
* LASTFOLDER ?? .
/dev/null

LOGABSTRACT=all
LASTFOLDER=$SAVELASTFOLDER

 
What it does? Well, *IF* the msg was to one or several of the other guys,
and not to You, and it indeed has been delivered somewhere already
(that's a safety precaution ... the * LASTFOLDER ?? .    stuff), then drop
the carbon copy or copies to the bit bucket. The SAVELASTFOLDER=$LASTFOLDER
and LOGABSTRACT=no stuff turns off logging and prevents LASTFOLDER to be set
to /dev/null. It is all turned back on again after this recepie.

I assume that somewhere later, or by the default rule, mail that pass this
recepie will be delivered to You personally.


B t w,  why not use /etc/aliases and sendmail for what You need?

-- Leif Erlingsson http://www.geocities.com/RodeoDrive/1998 +46 8 604 0995
   Stockholm, Sweden, Tellus, Milky Way, Gods Universe.


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