Emails get sent to the wrong domain

0

My company has two domains: company.com and company.be, and have e-mail accounts on both. When sending from a .com address to a .com address, or from .be to a .com address, all is right. But when an e-mail is sent from a .com address to a .be address, the e-mail arrives at the .com account (in the case where both exist, so employee_a@company.be and employee_a@company.com both exist and are separate accounts the the thunderbird client, but are used by the same employee). Strange thing is that this does not happen when the e-mail is sent from a mailclient on a mobile phone that is configured in the same way) I've been searching a long time and can't seem to find a solution. MX records for company.com is set to mail.company.com which is the IMAP server.

Arno

Posted 2018-04-05T16:26:46.810

Reputation: 31

What are the MX records for example.be? If they point to mail.example.com that would be an indicator of why. Even if the MX records are correct, if you are sending via mail.example.com and mail.example.com is configured to handle mail for both example.com and example.be then that would also be a reason why. – ivanivan – 2018-04-05T16:31:33.503

Thanks for the response. MX records for company.be point to mx1, 2 ... .ovh.net (.be domain is registered at OVH) and MX records for company.com point to mail.company.com. – Arno – 2018-04-05T16:37:42.910

Does this only exist on the local data network internally though from the Thunderbird client? Can you try doing this from a newly configured Thunderbird client outside the data network via IMAP or whatever and see if the result is different on the outside of the network? Perhaps there's some statically cached DNS record pointer or something causing this per DNS resolution internally on the incoming and outgoing side of the client configuration. Specifically the outgoing and incoming Server Name in the TB configuration – Pimp Juice IT – 2018-04-05T16:41:30.520

I'm not sure what internal DNS points to internally for email server connections but if you have it pointed internally different than externally, this is something to check just in case. While the MX records are correct from the outside world, just double check it's directing to the correct internal servers, etc. internally in case that's what is going on here—simple enough to eliminate as a cause at least. I assume it's likely be the outgoing Server Name but I'd check them all, internal DNS resolution, etc. – Pimp Juice IT – 2018-04-05T16:43:06.210

@PimpJuiceIT - you are correct - I misread the OP - and had understood the email to go to 1 recipient in the first instance and 2 recipients in the second. – davidgo – 2018-04-05T21:42:23.843

1@PimpJuiceIT Likewise – davidgo – 2018-04-05T21:44:22.210

Thanks for the responses guys. Still not resolved, but I tried some things and got some intresting results: I used another laptop (with KMail), on the same network and configured it with the e-mail account 'user@company.com" (this account was used on another pc in the same network and mails sent from this address to "employeeA@company.be" ended up with "employeeA@company.com" address). This time, although using the exact same account, the e-mail ended up in the right mailbox. When later using KMail on the original machine, we still had the same problem. mailserver is a Synology NAS (DSM 6). – Arno – 2018-04-06T12:03:41.547

From the machine with and without the problems, see what IP address the outgoing email server you tell kmail to use to send email resolve when you ping it or look it up via nslookup, etc. If the trouble machine is sending to the wrong email server per DNS resolution, that may be the issue. Otherwise, simply try to configure a new KMail email profile on the trouble machine and see if the new profile has the issue. If the settings are identical from the trouble machine and the one that's not trouble with KMail on the local network, it sounds like DNS is resolved differently between the two. – Pimp Juice IT – 2018-04-06T12:52:37.373

To be clear, whatever outgoing SMTP server you configure KMail to use, check those DNS resolutions for that server from both the machines to see if there are differences. Check the TCP/IP DNS settings on both machines as perhaps one is using a different DNS server than the other. Otherwise do as I said to troubleshoot, flush dns on the machine accordingly, etc. and try with a different KMail profile on the same machine, and so on. It's going to be a process of elimination so start somewhere and start eliminating to help narrow it down a bit or find the culprit. – Pimp Juice IT – 2018-04-06T12:54:53.907

I configured KMail one of the machines with the problem, and found out the problem still exists. So we can rule out the e-mail client. – Arno – 2018-04-09T09:23:01.647

Turned out to be a faulty setting in the mailserver, see answer. Thanks for the help! – Arno – 2018-04-09T15:30:22.163

Answers

0

This issue turned out to be a Synolgy DSM MailServer settings problem. The setting 'Hostname (FQDN)' was set to mail.company.com, when it should have been company.com and 'additonal domains' also listed company.be and company.com. Removing the additional domains and changing the FQDN solved the problem. Thanks for the help

Arno

Posted 2018-04-05T16:26:46.810

Reputation: 31