Re: rewriting rules....

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John Henders
Dátum:  
Címzett: exim-users
Tárgy: Re: rewriting rules....
On Tue, Aug 05/97, Nigel Cass <nigel@???> wrote:
>
> 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.
>


Hmm. I thought exim had something roughly equivalent to smail's
visible_domain setting that would force outgoing mail to be from
whatever was defined there. If it doesn't, however, wouldn't the above
do what you want if you reversed the order of the rules? i.e. Have the
local part looked up while you still had the subdomain attached, so you
could do the lookup based on the host the mail comes from? Something
like this?

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


I haven't tried this, but it would seem that if the rewrite rules are
processed in order then this would do what you want, unless I'm
misunderstanding.


-- 
  Artificial Intelligence stands no chance against Natural Stupidity.
            GAT d- -p+(--) c++++ l++ u++ t- m--- W--- !v
                 b+++ e* s-/+ n-(?) h++ f+g+ w+++ y*