On Sat, 18 Apr 1998, Dave C. wrote:
> I want to add a header in a transport, ONLY if that header does not
> already exist.
headers_add = ${if !def:headername: {headername:some text}}
Actually, that doesn't quite do it, because when the header does exist,
it still adds a blank line. I've made a note to change Exim sometime so
that an empty string here does nothing. (Also a forced expansion
failure, which currently will cause deferment.) If it's the last thing
a blank line it won't matter; alternatively you could temporarily fudge
it with a dummy like X-Dummy: or something.
> Actually, what I would really like to do, is:
>
> 1. Compare $sender_host_address with a list of networks.
> If it matches, remove any X-Originating-IP header.
Possible only if you can cast it as a regular expression, I suspect.
You would need to do this on a "condition" condition on a router or
director, and put the header_remove on that.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***