RE: [Exim] How to run a lot of domain rewrites with Exim

Top Pagina
Delete this message
Reply to this message
Auteur: Bernard Stern
Datum:  
Aan: exim-users
Onderwerp: RE: [Exim] How to run a lot of domain rewrites with Exim
On Mon, 19 Feb 2001 21:33:45 +0100 Roger Boussen wrote:

> I want to rewrite a lot of domains with exim, what do I have to do


> eg.


> @thisone.nl        -->       @thisone.net
> @this.nl        -->    @why.com
> @what.nl    -->    @now.nl


> It has to be a flexible sollution so I could change things "on the fly"


You will want to do this with a lookup:

*    $local_part@${lookup{${lc:$domain}}lsearch{/path/to/your/file}{$value}fail}


This will change all headers, you can select the headers you want
to rewrite. Just look at the spec doc chapter 34 for the details.
However, bear in mind that by using such rewrite rules, you "overwrite"
the "old" headers with the new rewritten ones.
You might "upgrade" to cdb search if you file gets big.

The /path/to/your/file will contain lines like

thisone.nl: thisone.net
this.nl: why.com
what.nl: now.nl
(...)

Another alternative is to do this with a smartuser driver.

Regards,

Bernard Stern, SWITCH

____________S_W_I_T_CH___Swiss Academic_______________________________________
        mail: SWITCH Head Office       a          Tel: +41 1 268 1520
              Limmatquai 138           n          Fax: +41 1 268 1568
              CH-8001 Zurich           d        e-mail: stern@???
________________________________________Reseach Network_______________________