Re: [Exim] relay to another server doesnt work

Top Page
Delete this message
Reply to this message
Author: michael
Date:  
To: chiefjo, exim-users
Subject: Re: [Exim] relay to another server doesnt work
> I try to get exim to send all mail for one domain to another server.

That sounds like what qmail calls smtproutes.

> I tried the options mentioned in Q0232 and Q0325, but it didn´t work that
> way.
> The Problem is that exim delivers mail to domain test.dom via lookuphost,
> though the domainlist-option is set before it.


I haven't look at the examples, but here is what I use for that purpose:

t_smtproute:
  driver                = smtp
  max_rcpt              = 1
  delay_after_cutoff    = false
  hosts                 = a lookup that uses $domain to determine the route


d_smtproute:
  driver                = smartuser
  condition             = a lookup that uses $domain to determine the route
  transport             = t_smtproute


Most likely there is a better way. Please point out how, if I am right on
that. :)

For qmail style smtproutes, the domain needs to be local, otherwise you
won't relay mails for it. Check if you like delay_after_cutoff before
using it. The lookup evaluates to the route (or true for the condition)
and fails otherwise.

Smtproutes are very handy e.g. for firewall customers. I am best
preference MX for several firewall customers and use a smtproute that
routes all mail to their firewall, which only accepts mail from me.
They are also great for customers who suspect their MTA to be flaky,
because you can provide a complete log of all mails to them for comparison
with the mails their MTA actually delivers to them.

But also note that they have the potential for loops and they make
debugging much harder for other postmasters, who can't figure out from
MX records why mail runs the way it does. I would think twice before
using a router instead of a director for that purpose.

Michael