Re: [Exim] rewriting rules

Etusivu
Poista viesti
Vastaa
Lähettäjä: Vadim Vygonets
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] rewriting rules
Quoth Marc MERLIN on Wed, Aug 30, 2000:
> So my problem is that if a machine sends Email to root, I want it to be
> qualified as root@???, _and_ I don't want to hardcode
> that machine name anywhere in exim.conf since it's rsynced to many machines,
> I just leave qualify_domain commented out.
>
> However, I then need to rewrite stuff as such:
> *@${primary_hostname} ${lookup{$1}lsearch{/etc/mail/localadds}{$1@???}fail} T
> *@${primary_hostname}    $1@???                hE
> *@in.limbo        $1@${primary_hostname}            T


Ah, I got it.

*@@    ${lookup{$1}lsearch{/etc/mail/localadds}{$1@???}fail}    T


Or, better yet, combine the three rules by _not_ rewriting what
you don't need:

*@@    ${lookup{$1}lsearch{/etc/mail/localadds}{$0}{$1@???}}    T
*@@    $1@???                            Fh


(Note: rewriting envelope sender and headers in last rule).

Vadik.

--
Avoid reality at all costs.