V
V
Vechkov Alexander2019-11-13 16:10:09
Mail server
Vechkov Alexander, 2019-11-13 16:10:09

Setting up mail for multiple sites on the same ip - how?

What we have:

  • one ip - 1.2.3.4
  • Multiple domains - domain1.com, domain2.com, domain3.com
  • PTR - ???
  • FQDN - ???

Each of the domains has its own mail. So that outgoing mail does not fall into spam and generally comes to the addressee, you need to play around with MX records, PTR, FQDN.
I'm trying to do the following:
Make a mail server on domain1.com, and refer via mx from other domains to this server.
Here is the DNS domain1.com (for mail):
  • MX domain1.com mail.domain1.com
  • A mail.domain1.com 1.2.3.4
  • SPF @
What to indicate here?
Here is DNS domain2.com
  • MX domain1.com mail.domain1.com - here I specify mx from the first domain - domain1.com
  • I do not specify the "A" record, because if I specify mail.domain1.com , mail.domain1.com.mail.domain2.com comes out
  • SPF @ What to put here?

Have I specified the dns records correctly?
What to specify in PTR and FQDN?
Should the PTR, FQDN and MX records be the same (should the PTR FQDN be the same)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
neol, 2019-11-13
@Comrues

Have I specified the dns records correctly?

Like yes.
If your mail server sends mail from IP 1.2.3.4 and appears as mail.domain1.com, then two conditions must be met
That is, everything (HELO server, FQDN and PTR) should just match each other.
MX records for all these domains do not have to point exactly to mail.domain1.com, but it can be done that way.
SPF is better to use SoftFail (~all). For example
, DKIM and DMARC are also worth reading (they are a bit more complicated than SPF).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question