Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an issue due to "split DNS vision" where email is generated at a host and sent via a smarthost (relay) to an external system out of my control (business partner).

The generating server has access to the remote domain's internal DNS and do not see an MX record for the particular domain name (example.com), but resolves a CNAME instead (example.com. CNAME sub.example.com.), resolves an MX record listed for the CNAME target (sub.example.com. IN MX 10 mail.sub.example.com.), and passes the email on to the smarthost.

The smarthost which has the "external" view of the remote system's DNS zone where example.com does have a MX record (example.com. IN MX 10 mail.example.com.) tries to deliver the email by looking for the MX for sub.example.com, fails and rejects the email.

  • The business partner could publish a MX record in his internal DNS view for example.com, so my server won't do the CNAME expansion, and passing the mails to the smarthost without changing user@example.com to user@sub.example.com.

  • I could configure the generating sendmail to not do CNAME expansion by setting confDONT_EXPAND_CNAMES (sendmail.org docs), but this might have unforeseen effects for other domains.

    Is there a way to do this for only example.com emails?

share|improve this question

migrated from superuser.com Dec 8 '11 at 14:36

This question came from our site for computer enthusiasts and power users.

1 Answer 1

up vote 1 down vote accepted


R$+ <@ sub . example . com . > $*      $#smtp $@ [ smart.host.name ] $: $1 < @ example.com . > $2
share|improve this answer
In the end I added the following to the Canonify2 rule, after the part where DNS resolution is made: R$+ <@ sub . example . com . > $* $: $1 < @ example.com . > $2 Seems to give the wanted result in testing. Thank you very much for the suggestion! –  sajb Dec 9 '11 at 8:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.