Re: [exim] sanity check, please?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Noah Meyerhans
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] sanity check, please?
On Wed, Jun 10, 2009 at 02:55:54PM -0700, Phil Pennock wrote:
> > Right, I wasn't sure if it would send mail to all of them or not. I had
> > only tested, so far, the case where this host is the only MX for
> > $domain. But there doesn't seem to be a way to get only the low-number
> > MX for a given domain...?
>
> http://lists.exim.org/lurker/message/20090527.213428.45e1069c.en.html


Wow, that's... impressive! And maybe just a little terrifying. :)

What do you think of this revised set of routes:

legacy_mx:
  driver = manualroute
  domains = @mx_primary : !+local_domains
  self = pass
  route_data = ${filter {${lookup dnsdb{>: mxh=$domain}}}\
                        {exists{/etc/exim/$item.db}}}


legacy_mx_redir:
driver = redirect
domains = @mx_primary : !+local_domains
data = ${lookup {$local_part}dbm{/etc/exim/$self_hostname.db}}
condition = def:self_hostname
file_transport = address_file
pipe_transport = address_pipe
allow_fail
allow_defer

legacy_mx_redir is basically unchanged. The change is in the route_data
in legacy_mx, where I filter out any MX that doesn't have a
corresponding .db file containing the aliases for that domain.

Remember that the goal here is for machines to be able to list either
foo.example.com or bar.example.com as primary MXes, and the aliases
database will be chosen based on which MX is used. I need to do this
because I'm inheriting foo.example.com and want to turn it into a
virtual domain on this server. foo.example.com has a number of other
domains that list it is a primary MX, and I want to continue providing
MX service for those domains. I hoping to come up with a reasonably
generic (and hopefully safe) way to do that.

noah

-- 
Noah Meyerhans                         System Administrator
MIT Computer Science and Artificial Intelligence Laboratory