procmail
[Top] [All Lists]

Re: Matching the first occurrence of a header field

2002-04-07 11:14:39
On Sun, Apr 07, 2002 at 09:10:44AM -0500, David W. Tamkin wrote:
José Romildo Malaquias asked,

| I want to construct a procmail recipe based on the _first_
| occurrence of the Received header field of the message.
| How can I detect the _first_ occurrence of a field in
| the header?

 :0 flags
 * 1^0 ^\/Received:.*
 * MATCH ?? regexp
 action

To look only at the last Received: header (or comparably, any other repeated
header), use 1^1 instead of 1^0.

And what about if I want to look only at the _second_ occurrence
of the Received: header? Is it possible? How?

Thanks.

Romildo
-- 
Prof. José Romildo Malaquias               Departamento de Computação
http://iceb.ufop.br/~romildo       Universidade Federal de Ouro Preto
romildo(_at_)iceb(_dot_)ufop(_dot_)br                                           
Brasil
romildo(_at_)uber(_dot_)com(_dot_)br
_______________________________________________
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>