procmail
[Top] [All Lists]

Re: recipe help

2003-11-05 09:06:07
On Tue, 4 Nov 2003, David W. Tamkin wrote:

[...]
Getting the entire Subject: line with formail rather than the extractor
looks weird, but I can see the point: it would preserve continuation
newlines, while

  :0
  * ^\/Subject:.*
  { SUBJECT=$MATCH }

would unfold them.


But honestly, I'm still not sure what line #7 is doing there.  #8 makes
sense: it tests whether "out of the office" appears in the unfolded
subject.  Actually, this is safer, because the continuation newline is
treated as a space, and the mailer may insert a tab there, and we don't
know which two words may be separated:

      # each pair of brackets encloses space and tab
      * ^Subject:.*out[       ]+of[   ]+the[  ]+office


        Regarding Christopher problem, it is interesting to show that
        we have two problems.   1) Matching   2) Assign to variable.
        The following recipe will do the matching and you will be able to
        send the message to folder, but, it will not assign the matched
        string into variable.

:0
* ^Subject:.*Out([    ]|$)of([    ]|$)the([    ]|$)Office
{ SUBJECT=$\MATCH }


        Test on the input:

Subject: Out
of the Office

        Gave this output (log):

procmail: ...
procmail: Match on "^Subject:.*Out([   ]|$)+of([   ]|$)+the([   ]|$)+Office"
procmail: Assigning "SUBJECT=()"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
From uuddii(_at_)ayalon(_dot_)eng(_dot_)tau(_dot_)ac(_dot_)il Fri Aug  8 
16:27:38 1995
 Subject: Out
  Folder: /dev/null                                                1027


Bye,
 Udi


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