Re: [exim] router conditions

Top Page
Delete this message
Reply to this message
Author: Ted Cooper
Date:  
To: Exim-users
Subject: Re: [exim] router conditions
Erin Spiceland wrote:
> Is there a tutorial somewhere on adding conditions to routers? I asked
> about failing forwarding for emails bound for AOL, and someone was kind
> enough to provide this condition, which unfortunately doesn't work. I'd
> like to figure out why and fix it.
>
> condition = ${if match {$h_to:}{(aol.com}{0}{1}}


That looks like it has an extra ( on the from of the aol. You can test
expansions like that using the exim command line.

If you have a message available to test with you might want to read it
in the -bem <filename> option.

exim -bem example.eml '${if match{$h_to:}{aol.com}}

(The {0}{1} on the end is no longer needed for ${if statements so long
as you are using a recent version)

Apart from that you might want to check out the string expansion section
of the manual. see http://docs.exim.org/current/spec_html/ch11.html

Ted.