procmail
[Top] [All Lists]

Re: Optimizing recipes.

2000-08-01 01:01:43
On Tue, 1 Aug 2000, John Summerfield wrote:

Date: Tue, 01 Aug 2000 08:56:28 +0800
From: John Summerfield <summer(_at_)OS2(_dot_)ami(_dot_)com(_dot_)au>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: Optimizing recipes. 

The friends thing is easy:

   # Note that the leading whitespace after the line continuation 
   # below is ignored.
   :0:
   * ^From:.*(myfriend(_at_)somewhere|friend2(_at_)elsewhere|\
              morefriends(_at_)somewhereelse)
   FRIENDS



The bloke claims 40 friends. A recipe like that for a few is fine. For 40, it 
would be hell to debug when something breaks.

7 mharris(_at_)asdf:~$ grep FRIENDS .procmailrc-friends |wc -l
     25

Sorry, 25 friends.  ;o)

I agree with your logic though.

Note that one error in the recipe is likely to misfile mail for all of his 
friends.

Bad.  Never occured to me.

I still say, KISS, and reduce the risk of losing all 40 friends at once.

Good advice.  I just thought of a new solution.  An input data
file containing email addresses, one line per email address, and
a perl/bash script to generate ~/.procmailrc-friends which is
included by the mail procmailrc.  I'll make the script chmod away
the "w" permission so that manual editing of the file warns me to
edit the input datafile instead.  Hmm. I think I need a procmail
directory instead of all these files.  ;o)

Thanks for the good protective advice!  

-- 
Mike A. Harris                                     Linux advocate     
Computer Consultant                                  GNU advocate  
Capslock Consulting                          Open Source advocate

... Our continuing mission: To seek out knowledge of C, to explore
strange UNIX commands, and to boldly code where no one has man page 4.


_______________________________________________
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>