procmail
[Top] [All Lists]

Re: Using References: and/or In-Reply-To: headers

2006-06-21 15:20:32
Dallman Ross wrote:
On Wed, Jun 21, 2006 at 10:55:26PM +0200, Dallman Ross wrote:
  
I've test this.  It seems to work.


   LOCKFILE = msgid.russell$LOCKEXT
   :0 
   * ^Message-id:(_dot_)*(_at_)drussell[(_dot_)]dnsalias[(_dot_)]com>
   * ? formail -D 8191 msgid.russell
   { }
   LOCKFILE

   :0 fw h
   * ^In-Reply-To:(_dot_)*(_at_)drussell[(_dot_)]dnsalias[(_dot_)]com>
   * ^X-Beenthere:.*procmail
   * ? formail -IMessage-ID -RIn-Reply-To Message-ID -D 8192 msgid.russell
   | formail -A "X-Special-Flag: Followup to me!"
    

I think the LOCKFILE name should be something else.  Maybe
someone can refresh my thinking on that topic.
  
That is interesting.... WOW! I just learned another great thing.... the 
LOCKFILE variable... according to my "procmail companion" book, that 
needs to specify a path. The book is a little vague.... it goes on to 
say if the specified file exists, then procmail waits until the file 
does not exist. I take that to mean that setting this varible will 
create the file if it does not exist, and then continue. un-setting the 
variable then deletes the file... I'm guessing that the lock names are 
stacked LIFO in case multiple locks are used.
    LOCKFILE=${HOME}/.locks/lock1
       <do stuff>
    LOCKFILE=${HOME}/.locks/lock2
       <do other stuff>
    LOCKFILE      # deletes lock2
    LOCKFILE      # deletes lock 1

And just about TWO days ago I was wondering how I could possibly ensure 
serialized execution of two recipes.... the LOCKFILE variable... 
whu-who!! :-)
Also, one could use a similar trick to send mail to the
spam pile if it has "RE:" or "FWD:" in the Subject, is
not from a trusted person, and is not a follow-up to something
whose Subject is in a cache.  That is, I'll let whitelisted
folks send me RE: or FWD: stuff that I hadn't seen originals
to, but for unvetted people, they've no business sending that
to me, and it's a good spam indicator.
  

Handling of Re: and FWD: in the subject is tricky depending one your own 
situation.... if you deal with people in other languages/countiries... 
"Re:" may be in French for example.

There are no RFCs covering the use of Re: etc in the subject line.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail