Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a problem with receiving mails. I do not know if my server or the server of the sender is wrong configured.

I have a domain daniel-marschall.de which has following DNS RR:

daniel-marschall.de.    86400   IN  CNAME   viathinksoft.com.

The domain viathinksoft.com has the MX RR to "mail.viathinksoft.com":

viathinksoft.com.   85651   IN  MX  0 mail.viathinksoft.com.

mail.viathinksoft.com runs Postfix, Cyrus and Debian Linux.

When I send an email to webmaster (at) daniel-marschall.de e.g. using GoogleMail, the user "Daniel Marschall" at our system receives the email, which is correct.

But when the server "startcom.org" sends an email to webmaster (at) daniel-marschall.de , the email gets "hard redirected" to webmaster (at) viathinksoft.com which is a different mail account.

The relevant parts of the email headers are:

Received: from viathinksoft.de ([unix socket])
     by viathinksoft.de (Cyrus v2.2.13-Debian-2.2.13-19+squeeze3) with LMTPA;
     Tue, 06 Nov 2012 02:15:02 +0100
Received: by viathinksoft.de (Postfix, from userid 5001)
    id AD83016CE112; Tue,  6 Nov 2012 02:15:01 +0100 (CET)
Received: from mta1.startcom.org (apache-7.startcom.org [192.116.242.7])
    (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
    (No client certificate requested)
    by viathinksoft.de (Postfix) with ESMTPS id 90F5116CE107
    for <webmaster (at) viathinksoft.com>; Tue,  6 Nov 2012 02:14:55 +0100 (CET)
Received: from localhost (com.internal.startcom.org [192.168.0.180])
    by mta1.startcom.org (8.13.8/8.13.8) with ESMTP id qA61EbIS010233
    for <webmaster (at) daniel-marschall.de>; Tue, 6 Nov 2012 03:14:37 +0200
From: ...
To: webmaster (at) viathinksoft.com (<-- WRONG!!!)

As you can see, the email was initially intended for "webmaster (at) daniel-marschall.de", but now it has the field "To: webmaster (at) viathinksoft.com", so my MTA dropped the mail to the owner of viathinksoft.com .

I think the sender's MTA thinks that "CNAME" RR means that the address needs to be rewritten, but as far as I know, CNAME is only a soft redirect on DNS basis and should not force the MTA to rewrite the domain name. Or am I wrong?

PS: The log entries are showing that my server already has the wrong address when the mail is incoming:

$ cat /var/log/mail.log | grep '90F5116CE107'
Nov  6 02:15:00 viathinksoft postfix/smtpd[18184]: 90F5116CE107: client=apache-7.startcom.org[192.116.242.7]
Nov  6 02:15:00 viathinksoft postfix/cleanup[19928]: 90F5116CE107: message-id=<c76cb951ea724270c94ff1b0e8d4de4e (at) startcom.org>
Nov  6 02:15:00 viathinksoft postfix/qmgr[9843]: 90F5116CE107: from=<certmaster (at) startcom.org>, size=1583, nrcpt=1 (queue active)
Nov  6 02:15:01 viathinksoft postfix/pipe[20419]: 90F5116CE107: to=<info (at) viathinksoft.de>, orig_to=<webmaster (at) viathinksoft.com>, relay=spamassassin, delay=6.2, delays=5.5/0/0/0.76, dsn=2.0.0, status=sent (delivered via spamassassin service)
Nov  6 02:15:01 viathinksoft postfix/qmgr[9843]: 90F5116CE107: removed
share|improve this question
1  
I'm pretty sure this is as per the design of SMTP. I don't have a reference but I remember that kind of CNAME renaming happening for as long as I've configured email. Moral of the story: don't put a CNAME records on a domain you intend to use for email. Beside, your CNAME records in this case is invalid anyway. –  Celada Nov 6 '12 at 17:14
    
Thanks for your answer. Seems like I have to remove CNAME and change every domain as soon as the IP changes. But why do you think it is illegal? I have a SOA record and beside CNAME I do not have other RRs (A, MX etc). –  Daniel Marschall Nov 6 '12 at 17:32
    
CNAME can't sit beside any RR, including SOA. You should just set the MX records of your domain to point to the same as viathinksoft.com. –  James O'Gorman Nov 6 '12 at 18:52

1 Answer 1

As the comments indicated, you can't have your MX as a CNAME. You can detect problems like this by using a site like intoDNS. Here is the report for your domain -- I see from it that you've already fixed the problem.

share|improve this answer

Your Answer

 
discard

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.