[Pkg-exim4-users] Sending outgoing email into the internet, incoming to smarthost

Marc Haber mh+pkg-exim4-users at zugschlus.de
Thu Oct 4 17:54:21 UTC 2007


On Tue, Oct 02, 2007 at 02:46:35PM -0700, Jeroen van Aart wrote:
> Marc Haber wrote:
> > Please tell us more about your setup, and what exactly you intend to do.
> 
> The situation has changed a bit.

Ah, a moving target ;)  Always joy to work with.

>  I am looking into a way to direct specific email addresses to a
>  specific server. Say I have 2 exim4 servers, both of which can
>  receive email for our domain. One server (Server1) only accepts one
>  set of email addresses, lets say all emails starting with a "k", take
>  my email address as an example.
> 
> Server1 needs to direct all emails but the "k" one to Server2, Server2 
> needs to direct all "k" emails to Server1. Both servers are added in the 
> MX records. Well actually they are added in postini's configuration. In 
> a load balancing kind of way.

Postini is a commericial Spam Filter? Is it a software, an appliance
or a service? Wikipedia seems to be not very helpful here to me.

Having a domain local on two servers is joy. I did this years ago for
the last time, and it was not fun. I'd advise to ditch the load
balancing idea and to go to a more conventional approach.

If you insist on going this route, you probably need to:

- Have both servers know both about the locally and the remotely
  hosted mail addresses.
- Have a router that routes the remotely hosted mail addresses to the
  remote host. This can be a manualroute router like the hubbed_hosts
  router which doesn't choose after domains but after local parts,
  like (untested!)
  hubbed_hosts:
     debug_print = "R: hubbed_hosts for $domain"
     driver = manualroute
     domains = yourdomain.example.com
     local_parts = "${if exists{CONFDIR/hubbed_hosts}\
                   {partial-lsearch;CONFDIR/hubbed_hosts}\
              fail}"
     route_data = ${lookup{$domain}partial-lsearch{CONFDIR/hubbed_hosts}}
     transport = remote_smtp
- By having a full list on both hosts you save yourself from loops
  that would arise otherwise for non-existing mail addresses where both
  hosts think that the other one is responsible

I am afraid that more detailed help is probably beyond the scope of
this list.

> > looking for /etc/exim4/hubbed_hosts, which is documented in the
> > exim4_files man page.
> 
> I think hubbed_hosts in my example above wouldn't work as it requires 
> domains. My email addresses all have the same domain.
> 
> As a side note, for a while now I am using hobbed_hosts to correct a dns 
> issue with a remote smtp server. I found out the hard way that using 
> tabs after the "domain:" entry will break it.

How does it break? I cannot reproduce this issue:

$ exim -bt bar at foo.zugschlus.de
R: domain_literal for bar at foo.zugschlus.de
R: hubbed_hosts for foo.zugschlus.de
bar at foo.zugschlus.de
  router = hubbed_hosts, transport = remote_smtp
  host nechayev.zugschlus.de [193.201.54.31]
$ cat /etc/exim4/hubbed_hosts
realnechayev.zugschlus.de: nechayev.zugschlus.de
foo.zugschlus.de:               nechayev.zugschlus.de
$

After "foo.zugschlus.de:" there are two tabs in the configuration.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190



More information about the Pkg-exim4-users mailing list