procmail
[Top] [All Lists]

Re: Flagging mail in maildir folders

2006-11-23 15:27:51
Hi David,


On Tue 21 Nov 23:38, David W. Tamkin wrote:
Nick,

This evening I had a look at the procmail source code and I _think_ I
could hack such a facility into it.  Should I?  I did come up with a
test recipe to do what I want, but I think it is somewhat evil to say
the least:

  :0 c
  * ^From:(_dot_)*njm(_at_)njm
  * ^Subject:.(Re: |)testing
  testing/

  :0 a
  * ^From:(_dot_)*njm(_at_)njm
  {
      :0 W
      | mv $LASTFOLDER ${LASTFOLDER}:2,F

      :0
      /dev/null
  }

Is there a better way to do this?

I don't know if there's a better approach, but there's a better way to 
code your current one.

   :0
   * ^From:(_dot_)*njm(_at_)njm
   * ^Subject:.(Re: )?testing
   {
     TRAP='mv $LASTFOLDER $LASTFOLDER:2,F'

     :0
     testing/
   }

Perfect!  Many thanks for that.  When I read about TRAP in the manual it
didn't quite register with me what it actually did.  Now I've used it,
seen what gets logged, it starts to make sense.  :-)


Cheers,
       Nick.
-- 
Captain Muller: "You boy! Your name will also go on the list. What is it?"
Captain Mainwaring: "Don't tell him Pike!"

____________________________________________________________
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

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