sorry to bother but what theheck does this mean.
The rewrite works (citec.net changed to mail-rbk.mtnns.net)
but it fails after that.
Any ideas?
<snip>
>>> routing thomas@???
>>> calling redirect_domains router
>>> mtnns.net in "*"? yes (matched "*")
>>> thomas@??? in "*@*"? yes (matched "*@*")
>>> routed by redirect_domains router
>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>> routing thomas@???
>>> calling redirect_domains router
>>> redirect_domains router declined for thomas@???
>>> mail-rbk.mtnns.net in "! +local_domains"? yes (end of list)
>>> calling dnslookup router
>>> 209.212.109.146 in "0.0.0.0 : 127.0.0.0/8"? no (end of list)
>>> routed by dnslookup router
Shouldn't this go to my hub_route?
hub_route:
driver = manualroute
transport = remote_smtp
domains = ! +local_domains :\
lsearch;/usr/exim/virtual/virtual_domains
route_data = lsearch;/etc/mail/exim-forwarders/1rewrite_rules
host_find_failed = pass
hosts_randomize
Regards, Tom
-----Original Message-----
From: Philip Hazel [
mailto:ph10@cus.cam.ac.uk]
Sent: 14 January 2003 11:37
To: Thomas Kinghorn
Cc: Exim-Users (E-mail)
Subject: Re: [Exim] rewrite rules
On Tue, 14 Jan 2003, Thomas Kinghorn wrote:
> Is it possible to have the rewrite rules in a file, rather than in the
> cinfig file?
> I am using exim 4.10
Depends on exactly what you mean by that.
(1) You can use .include in the config to include a separate file that
contains the rewrite rules.
(2) You can use lookups in a rewriting rule, for example
*@* ${lookup{$local_part@$domain}lsearch{/some/file}{$value}fail}
> i need to rewrite the the recipient address before sending to the
> manual_route router.
(3) Changing addresses while routing is usually done by the redirect
router, not by rewriting.
> @booksite.co.za %1@???
> @dispatch.co.za %1@???
The standard Exim way of doing that would be to make the file contain
this:
booksite.co.za booksite.jev.co.za
dispatch.co.za mail.dispatch.co.za
and use a router like this:
redirect_domains:
driver = redirect
data = ${lookup{$domain}lsearch{/the/file}{$local_part@$value}}
If the lookup fails, the value of "data" is empty, which means that the
router declines. A setting of redirect_router would probably useful to
avoid multiple passes through this router.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.