I would like to set up Postfix properly to serve multiple virtual domains while complying to all standards and being able to enable security measures like SPF.
- The server has the hostname
server.domain.tld
. - Postfix has
mydomain
set todomain.tld
. - Postfix has
myhostname
set toserver.domain.tld
. - Postfix has not set
myorigin
to anything. - The server is hosting a few dozen virtual domains.
- All users have set up
mail.tld
as incoming and outgoing mail server. - I would like Postfix to act to the outer world as
mail.tld
.
My first thought was to just set mydomain
and myhostname
to mail.tld
. But it seems, that it is advised, that the reverse lookup of mail.tld
should resolve to the host's IP address (https://serverfault.com/a/366391/162258 for example). While I could do that, I am concerned though, that setting up the reverse lookup to mail.tld
might lead to problems, when it will be necessary to reverse lookup the host itself.
How can I achieve that Postfix acts as mail.tld
and that I will be able to specify mail.tld
as MX record and use SPF, DKIM and DMARC with it, while retaining the DNS integrity of the host server.domain.tld
?