Re: [exim] This should be simple but ...

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Fred Viles
日付:  
To: exim-users
題目: Re: [exim] This should be simple but ...
On 16 Sep 2005 at 9:32, Graeme Fowler wrote about
    "Re: [exim] This should be simple bu":


| On Fri 16 Sep 2005 05:07:45 BST , Marc Perkel <marc@???> 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.


But according to spec.txt ISTM it should work as is:

$header_<header name>: or $h_<header name>:
...
               If the message does not contain the given header, the
    expansion item is replaced by an empty string.


| I think you probably want something like:
|
| condition = ${if def:h_X-Mail-from:{$h_X-Mail-from}{fail}}

                                                    ^:


Or just

    condition = ${if def:h_X-Mail-from:}


Either should work. I think the issue is more likely to be one of
the other questions I asked earlier.

- Fred