I want to install iRedMail (== postfix + dovecot) in a virtual machine inside an internet-facing host with a single IP.
- The host is named host.mydomain.com with IP 184.108.40.206.
- The PTR record for 220.127.116.11 is set to host.mydomain.com
- The SMTP/IMAP ports will be DNAT-ted to the VM on 172.16.1.1
I am not sure what name to give to the VM and whether to give it a FQDN or local name:
- Every guide I’ve seen says to use a FQDN, not a local name
- If I name the VM "host.mydomain.com" (same as the host), the DNS resolvers on both VM and host will get confused: is host.mydomain.com 127.0.0.1, 172.16.1.1, or 18.104.22.168 ?
- If I name the VM with a different FQDN, the PTR record for the IP will not match the host name anymore and the mails will be marked as spam.
I can change the PTR if necessary, but I’d rather avoid it unless it brings clear advantages. (It is easy to forget when moving/upgrading servers and some poor soul will lose sleep over why things suddenly don’t work anymore.)
What’s the best approach in this case and what settings (if any) do I need in the postfix/dovecot configs?
You can make Postfix identify itself as an arbitrary name by setting
myhostname= explicitly in
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.