procmail
[Top] [All Lists]

Re: Add a header, then forward?

1999-11-17 19:49:26
On Wed, 17 Nov 1999, Jaye Mathisen wrote:

jm> 
jm> 
jm> Here's what I'm using, but perhaps it's not optimal. 
jm> 
jm> 
jm> :0 fwh
jm> * ^TO_procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
jm> | formail -I "X-From-Procmail-list: yes"
jm> 
jm> :0 c
jm> * ^TO_procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
jm> ! some-other-address
jm> 
jm> 

  Well, your checking the headers twice, not sure if thats a big slow down
or not, but you could avoid it by doing the following

:0fwh
* ^TO_procmail(_at_)informatik(_dot_)rwth-aachen(_dot_)de
| formail -I "X-From-Procmail-list: yes"

:0ac
! some-other-address


jm> 
jm> The "some-other-address" filters it based on the addition of the X-From...
jm> header which it can find.
jm> 
jm> It doesn't have the sexy TO_ macro, nor a powerful regex language, hence
jm> the desire to use procmail first.
jm> 
jm> 
jm> Should I nest these rules?
jm> 
jm> Or is this OK.
jm> 
jm> 

-- 
        S.Toms - tomas(_at_)primenet(_dot_)com - New homepage coming soon
                   SuSE Linux v6.2+ - Kernel 2.2.13

Genius, n.:
        A chemist who discovers a laundry additive that rhymes with
"bright".

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