On Sat, 11 Aug 2001, Jakob Hirsch wrote:
please wrap your lines. it's rather annoying replying to a message i
can't see half of it
> I have a plain file with a list of domains and want mail for them to be
> forwarded to one single host. Is it possible to set up a router for
> this? I thought something like "route_list = if eq
> {{lsearch;/etc/exim/mailforward}{$domain}}{$domain
> mail.something.de}{}" should work, but Exim seems no to allow if
> etc. on a route_list command.
what i'm using for almost the exact setup (i'm forwarding messages
to different hosts based on the destination domain) is:
relay_domains = partial-lsearch; /etc/exim/router
forw:
driver = lookuphost
transport = internal_smtp
domains = partial-lsearch; /etc/exim/router
self = send
internal_smtp:
driver = smtp
hosts = ${lookup{$domain} partial-lsearch {/etc/exim/router} {$value}}
hosts_override
batch_max = 0
max_rcpt = 1
and the router file looks as
foo.hu: 12.34.56.78
now if you want 'em all to one host, just cut the partial-lsearch'es,
make the router file one domain a line (or you can just enumerate
them in the main config if you are willing do so), and make the
transport look like "hosts = 1.2.3.4" where 1.2.3.4 is where you
want mails to be forwarded.
if you want to do it with a domainlist router, it is also fine, you
just make sure you specify "domains =" properly (ie that is the exact
problem with your setup. your condition could just as well yield a
null result, which is kinda no-go):
[well i've almost written you a trivial domainlist router here but
looking at your example now, i can't decide what could you want... or
at second look maybe yes. and it looks like that your problem is that
you use a condition where you don't need one:
my_bar:
driver = domainlist
domains = /etc/exim/mailforward
route_list = "* mail.something.de bydns_a"
transport = remote_smtp
this will get you going.
--
[-]