Szerző: Phil Pennock Dátum: Címzett: Marc Perkel CC: exim-users Tárgy: Re: [exim] Usage of dnsdb primary mx
On 2009-05-29 at 07:42 -0700, Marc Perkel wrote: > Phil Pennock wrote:
> > ${if !eq{${reduce{<\n ${lookup dnsdb{mx=$domain}}}{70000 .}{${if <{${extract{1}{ }{$item}}}{${extract{1}{ }{$value}}}{$item}{$value}}}}}{70000 .}{${reduce{<\n ${lookup dnsdb{mx=$domain}}}{70000 .}{${if <{${extract{1}{ }{$item}}}{${extract{1}{ }{$value}}}{$item}{$value}}}}}fail}
> >
> I haven't really tried to figure this out yet but it seems to work. how
> would this code be modified to return all MX records EXCEPT the lowest?
> The above code works great for me to test "is the lowest MX pointing to
> any of my server". What I want to test separately is "are MX records
> other than the lowest numbered MX pointing to our server" so that then I
> can test "we are not the primary but we are the secondary for $domain"
Wait, how exactly do you want to test the local server?
The original request was use of dnsdb for checking a particular domain,
for unspecified reasons. If you're checking mail, you should be able to
just use the @mx_primary and @mx_secondary built-in domain-lists,
similar to @mx_any, to test if the domain under consideration is one
where the server which Exim is running on is in the primary MX or any
other.