Re: rewriting rules....

Top Page
Delete this message
Reply to this message
Author: Nigel Cass
Date:  
To: Chris Thompson
CC: exim-users
Subject: Re: rewriting rules....
I wrote:

> > the problem is that I will have several rules with the same 1st part
> > but each would be doing a lookup from a different dbm file after I
> > have first stripped out the *.humber.ac.uk to just humber.ac.uk.


Chris wote:

> How exactly does this differ from the example in doc/spec.txt ? i.e.
>
>   *@*.hitch.book.fict  $1@???
>   *@hitch.book.fict    ${lookup{$1}dbm{/etc/realnames}\
>                        {$value}fail}@??? bcfrF

>
> Is it that the dbm lookup needs to depend on the host part stripped off
> the front of "humber.ac.uk", as well as the local part?


The problem is that we currently we only do formal aliasing where the
incoming address is *@humber.ac.uk - where '*' conforms to our given
naming convention. The mail server then passes the message on to
whatever the host system is.

Unfortunately people in our institution could be mailing from 3 or
4 (at least) different host systems. However the local part differs
on each different host, so what I really want to do is very similar
to the example in the book. But I wanted to explicitly strip out the
hosts as below :

*@ecu.humber.ac.uk   $1@???
*@humber.ac.uk       $1{lookup{$1}dbm{/etc/revaliases}\
                     {$value}fail}@??? bcfrF


In this way I could have a different "realnames" file for each
different host, but manage to rewrite all outgoing mail into the form
that we would like to receive it in by.

I was just unsure whether the two lines above constituted one rule or
two. i.e - does it only do the lookup in 'revaliases' if it has
changed *@ecu.humber.ac.uk to *@humber.ac.uk first.

Obviously what will happen is that if I had several pairs of rules
like the above it would do the correct lookup at first, but then
continue performing lookups (each time it encountered a
*@humber.ac.uk precondition) as it parsed the rest of the rewriting
rules.

Any ideas ??

Nigel Cass
Corporate Internet Team Leader
Computing & Network Services
University of Lincolnshire & Humberside

Tel: 01482 463044

Thought for the day :
-----------------------------------------------
Hiroshima '45.....Chernobyl '86.....Windows '95
-----------------------------------------------