Re: [exim] conditional compound rewriting

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Paul Rogers
CC: exim-users
Subject: Re: [exim] conditional compound rewriting
On 2009-11-19 at 12:14 -0800, Paul Rogers wrote:
> First of all, I'm using exim-3.20


*blink* Bear in mind I can't test any responses to be sure I remember
the details. It's been too many years since I admin'd an Exim 3 box to
be sure.

> *@* "${if eq {$domain}{$primary_hostname}{lookup{$1}lsearch{REWRITE}\
> {$value}fail}fail}" Ffrs


The value of each item inside {} in the branches is a string. So you
have a string starting "lookup".

You want a {...} for the TRUE-branch, inside which you want ${lookup...}
to do a substitution. I'd expect there to be logs of failures. If not,
exim -d<n> is your friend (numbers for increasing verbosity, instead of
areas to ask for extra debugging as in Exim 4).

ISTR some areas where Exim 3 was particular about whether or not
whitespace could appear; I don't recall if whitespace after the "eq" was
okay or not.

*@* "${if eq{$2}{$primary_hostname}\
    {${lookup{$1}lsearch{REWRITE}{$value}fail}}fail}"  Ffrs


and I no longer remember if the double-quotes there are a good or a bad
idea.

-Phil