0

I created a mail server (mail.mydomain.com) and can send emails from something@mydomain.com without any issue. But when some email addresses (which I tried to send email to) fail, bounce messages try to go to something@mail.mydomain.com and can't be delivered to me.

My current MX records:

            MX  mail.mydomain.com
    mail    MX  mail.mydomain.com

I use CentOS 7 x64, VestaCP, Exim and Dovecot.

How can i redirect all @mail.mydomain.com emails to @mydomain.com and let the server accept these emails?

Xel Naga
  • 103

1 Answers1

1

Regardless of your OS and mail-software, MX-records need to have a priority figure too.

For example, here the priority is set to 11:

@ IN MX 11 mail.example.com # MX-record for the domain itself
* IN MX 11 mail.example.com # MX-record for any hosts or subdomains

These will tell the rest of the Internet, whom to give e-mails sent to your domain (and any of the subdomains).

You will still need to configure the e-mail software on your computer(s) to handle such delivery attempts, but that's another topic.

Mikhail T.
  • 2,405