1 (edited by sirpumpkin 2016-07-15 08:48:14)

Topic: Preferred way to set up MX DNS for multiple domains and SSL question

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: ----
====

Hey,

I've just got a quick question about setting the correct MX DNS records when using multiple domains.

Let's assume my mailserver is mail.myfirstdomain.com

The DNS records for myfirstdomain.com are:
mail A [IP of mailserver]
@ MX 10 mail.myfirstdomain.com
(... SPF, DKIM records)

Which of the following two variants is the best for the second domain myseconddomain.com?

Approach 1:
mail A [IP of mailserver]
@ MX 10 mail.myseconddomain.com
(... SPF, DKIM records)

or Approach 2:
@ MX 10 mail.myfirstdomain.com
(... SPF, DKIM records)

I'd prefer the first approach, but was wondering whether this could cause any problems when sending / receiving mails and if it has any disadvantages.

Also, the first variant would allow connecting to mail.myseconddomain.com for webmail and IMAP for example. Would a SAN certificate with both domains in it be fine for the mailserver software, or do I need seperate certificates for each domains (and additional IPs)?

Thank you for your help.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Preferred way to set up MX DNS for multiple domains and SSL question

sirpumpkin wrote:

Approach 1:
mail A [IP of mailserver]
@ MX 10 mail.myseconddomain.com
(... SPF, DKIM records)
or Approach 2:
@ MX 10 mail.myfirstdomain.com
(... SPF, DKIM records)

Both are ok.
but i PERSONALLY prefer approach #2 -- you don't need to ask your customer (owner of second domain) to update their DNS when you changed IP address of mail server (it sometimes happens).

sirpumpkin wrote:

Would a SAN certificate with both domains in it be fine for the mailserver software, or do I need seperate certificates for each domains (and additional IPs)?

Both are ok.

3 (edited by sirpumpkin 2016-07-15 09:01:20)

Re: Preferred way to set up MX DNS for multiple domains and SSL question

Wow, that was quick. Thank you! I'll go with approach 1, as I have access to the DNS records if needed.

sirpumpkin wrote:

Also, the first variant would allow connecting to mail.myseconddomain.com for webmail and IMAP for example. Would a SAN certificate with both domains in it be fine for the mailserver software, or do I need seperate certificates for each domains (and additional IPs)?

I'm still very interested in this. Can I use a multi domain certificate for IMAP / POP3 etc. connections from mail clients for example without problems or do I need seperate certificates (and maybe even IPs) for each domain? For the webserver it obviously would not be a problem but I'm not so sure of the mail component.

4

Re: Preferred way to set up MX DNS for multiple domains and SSL question

Both are ok. [i updated my first post.]

5

Re: Preferred way to set up MX DNS for multiple domains and SSL question

Thank you for your help, couldn't resist to buy you a coffee wink

6

Re: Preferred way to set up MX DNS for multiple domains and SSL question

sirpumpkin wrote:

Thank you for your help, couldn't resist to buy you a coffee wink

Thanks for your coffee. smile