Set up a second domain and redirect the mails to the first

Hello, I have a question about the use of mailinabox, I have a dedicated server under Ubuntu Server and Mailinabox latest version. I have two domain names mydomain.fr and mydomain.com I created a redirection A mydomain .fr to the ip of the server and a second redirection A for mail.mydomain.fr and a redirection MX of the style, mydomain.fr priority 10 to mail.mydomain.fr. My question concerns the domain name mydomain.com, if for example a person sends me an email using contact@mydomain.com instead of contact@mydomain.com, he receives an error mail. I want to avoid adding the second domain in mailinabox, but how should I set? Should I create an MX redirection on the second domain so that the second domain returns to the first .Thank you in advance for your help.Good day

Sorry, I am a French user, my English may not be very good.

Your approach is incorrect.

You want to use a “Domain Alias” in the aliases section of the MiaB control panel.

You will set the alias to be @yourdomain.fr and the forwards to as @yourdomain.com.

Doing this all emails addressed to user@yourdomain.fr will be delivered to the inbox of user@yourdomain.com.

You want to set your MX record to be the hostname of the MiaB for BOTH domains. You only need to set the A record and CNAME record for the .fr domain IF you want to access roundcube or the admin area using the .fr domain. Personally, I would not do that.

I think that your original message had an typo in it … I am responding based upon the assumption that you want the mailboxes to be for the .com domain and the emails sent to the .fr domain to be delivered to the .com domain mailboxes.

You meant:
If a person sends an email using contact@mydomain.fr instead of contact@mydomain.com, correct?

In fact it is if for example a person sends me an email using contact@mydomain.com instead of contact@mydomain.fr,

Thank you all, it works great

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.