[Exim] question on peculiar situation

Etusivu
Poista viesti
Vastaa
Lähettäjä: John Jetmore
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] question on peculiar situation
I have a situation where exim's doing the right thing in rejecting an
email, but the error it produces is a bit misleading. I'm trying to find
out if this is the fault of my exim config or just how things are supposed
to work.

Suppose I send email to anyuser@???. DNS info for this
domain:

mx4             IN MX   0       baddomain.jetmore.net.
                IN MX   5       mail1.cinergycom.net.
                IN MX   10      mail2.cinergycom.net.


I send any email to this user through mail1, and mail1 rejects it with
"relay not permitted (0x07)", which is my fall-through deny in my
acl_smtp_rcpt. Here's the relevant snippet from exim -d -bh:

rcpt to:<anyuser@???>
**SNIP**
check domains = +relay_domains
DNS lookup of mx4.jetmore.net (MX) succeeded
DNS lookup of baddomain.jetmore.net (A) gave HOST_NOT_FOUND
returning DNS_NOMATCH
baddomain.jetmore.net in hosts_treat_as_local? no (end of list)
mail1.cinergycom.net in hosts_treat_as_local? yes (matched
"mail1.cinergycom.net")
local host in host list - removed hosts:
mail1.cinergycom.net 216.135.0.38 5
mail2.cinergycom.net 216.135.1.243 10
host_find_bydns yield = HOST_FIND_FAILED (0); returned hosts:
baddomain.jetmore.net <null> 0 *

so the mail gets past a certain point because it's mail1, then mail1 and
mail2 get removed from the list leaving only baddomain.jetmore.net.
baddomain.jetmore.net gets removed because it's an invalid domain.

Like I said, I fully agree that this should be rejected, but I was
wondering if there was anyway for me to catch this condition to present a
better message than "relay not permitted", which is misleading. (I
understand I could change the default deny message to something more
ambiguous, but that's not really helpful in the long run either.

This may be obvious, but my mind appears to be clouded by friday afternoon
fog...

Thanks
--John