On Fri 16 Sep 2005 05:07:45 BST , Marc Perkel <[EMAIL PROTECTED]> wrote:
I want to add this header only if it's not already there. This code
should work - but it doesn't. :(
warn message = X-Mail-from: $sender_address
condition = ${if eq{$h_X-Mail-from:}{}}
...because it's testing for the existence of an empty header, not
whether the header exists or not.
I think you probably want something like:
condition = ${if def:h_X-Mail-from:{$h_X-Mail-from}{fail}}
In other words, if it exists then the condition will return the
contents or it will return the word "fail". You may need to strap
another test around that to check for the word "fail" to make the
condition test fail.
Graeme
--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/