Re: [exim] Check for a particular header in exim router

Góra strony
Delete this message
Reply to this message
Autor: John Burnham
Data:  
Dla: exim-users@exim.org
Temat: Re: [exim] Check for a particular header in exim router
> Is it possible to compare for a particular strings in header:
>
> Something like the one given below:
>
> -----------------
> mycustom_route:
>     driver = dnslookup
>     condition = "Check if the email header contains the string
> "X-Mail-Forwarder"            --- Not sure how to achieve this
>     ignore_target_hosts = +loopback : 64.94.110.0/24
>     headers_add = "${perl{mailtrapheaders}}"
>     transport = remote_smtp
> -----------------

>



Check out
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html

and look for
def:header_<header name>: or def:h_<header name>: This condition is true if a message is being processed and the named header exists in the message.

Hopefully that will do the trick.

John