Re: [EXIM] mx_only

Top Pagina
Delete this message
Reply to this message
Auteur: Jon Morby
Datum:  
Aan: Philip Hazel
CC: exim-users
Onderwerp: Re: [EXIM] mx_only
> On Wed, 21 Jan 1998, Jon Morby wrote:
>
> >
> > The output below is from exim -d9 -M message-id
> >
> > It reports mx_only set to false, but I can't find any documentation on
> > mx_only.
>
> It is an internal flag that gets set as a result of various options.
>
>   mx_only               if TRUE, require MX record(s) to exist

>
> Since it is reported as being FALSE, it means the lookup should proceed
> to search for an A record, having failed on an MX record.
>


Ahh ... any way to get it to bounce the message if no MX exists, rather
than trying to force delivery to an A record (either globally, or in
special cases?)

Or can you think of a better way of doing what we're trying to do[1]?

> > Any ideas?
>
> Try with -d10, in order to see the DNS resolver debugging output, but
> actually I think there is no problem (with Exim):


Will do, although I know what it's going to say ...

www.suffi.demon.co.uk exists, and has an A record.

suffi.demon.co.uk no longer exists

file lookup required for *.demon.co.uk in /usr/exim/cf/db/mx_hosts
original hostlist=$domain options=bydns_mx
expanded hostlist="suffi.demon.co.uk" options=bydns_mx
;; res_querydomain(suffi.demon.co.uk, <Nil>, 1, 15)
;; res_query(suffi.demon.co.uk, 1, 15)
;; res_mkquery(0, suffi.demon.co.uk, 1, 15)
;; res_send()
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18912
;; flags: rd; Ques: 1, Ans: 0, Auth: 0, Addit: 0
;; QUESTIONS:
;;      suffi.demon.co.uk, type = MX, class = IN


;; Querying server (# 1) address = 158.152.1.58
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18912
;; flags: qr rd ra; Ques: 1, Ans: 0, Auth: 1, Addit: 0
;; QUESTIONS:
;;      suffi.demon.co.uk, type = MX, class = IN


;; AUTHORITY RECORDS:
demon.co.uk.    582     IN      SOA     ns0.demon.co.uk. 
hostmaster.demon.net. (
                        1998012003      ; serial
                        10800   ; refresh (3 hours)
                        1200    ; retry (20 mins)
                        864000  ; expire (10 days)
                        54000 ) ; minimum (15 hours)


;; rcode = 0, ancount=0
DNS lookup of suffi.demon.co.uk (MX) gave NO_DATA
No MX records, and mx_only is FALSE
LOG: 0 MAIN
Error in mx_hosts router: lookup of host suffi.demon.co.uk failed


>
> Looking for that domain in the DNS gives neither an MX nor an A record.
> So that is consistent: you told Exim to send the message to a particular
> host, but that host doesn't exist. Exim says "Aarrgghh!! There's a mess
> in the configuration."



[1] Explanation

We have a smarthost which should only relay for a certain set of
domains, or IP addresses. If mail comes in for a certain domain which
matches in mx_hosts then it should be forwarded to one of the hosts
which know about that 'internal' domain, hence the bydns_mx.

According to the manual,

 .   bydns_mx: look up MX records for the host(s) in the DNS; fail if 
there  |
     are none.   


Which I took to be that if no MX record exists, bounce the message.
This doesn't seem to be the action we see though. I'm presuming this
is down to interpretation :)

demon.co.uk has (today) c. 220,000 entries, and as such it's not viable
to include as a table, and besides which we're using the DNS as the
authorative record.

-- 
Jon Morby                                             DDI: 0181 371 1286
Project Manager,                                      Fax: 0181 371 1167
Demon Internet Ltd.                    The Internet for a tenner a month




--
*** Exim information can be found at http://www.exim.org/ ***