Closed phdoerfler closed 6 years ago
Whilst it is neat to have a mail.example.com, it would require having multiple IP addresses to work correctly with mail providers, one for the TLD and one for each subdomain. At least according to mail-tester.com.
Note that your rDNS entry has to be set correctly, but the FQDN does not have to match the sending address. Let's say you have the domains a.com
and b.com
and a server with correct DNS and rDNS entry at mx.c.com
. You can use that to send and receive emails for addresses from both a.com
and b.com
(i.e. as soon as we have multiple domains :) as long as you set a mx record to mx.c.com
for both a.com
and b.com
.
Generally speaking you should absolutely make sure that your rDNS is set correctly. Assuming you can't / don't want to set it to mail.example.com, this needs to be addressed.
I'll try to write a small tutorial how to set up a server to get the 10/10 on mail-tester as soon as I find some time. If you want to contribute, any help is greatly appreciated.
Others have mentioned that the hostName should be set manually, which is fine but can lead to subtle problems when postfix dovecot assume the hostName is set correctly. This would need additional testing to implement.
This should be addressed by the multiple domain extension. You can now specify fqdn = whatever.you.like;
independent of the host name
Testing mailing with mail-tester.com I get the following warning:
This is because my reverse DNS resolves to example.com, but the mail was sent from mail.example.com. Apparently some services like AOL take offence to that and treat mail as spam or bounce it.
Whilst it is neat to have a mail.example.com, it would require having multiple IP addresses to work correctly with mail providers, one for the TLD and one for each subdomain. At least according to mail-tester.com. Please
However, simply using
hostPrefix = "";
results in a bunch of errors relating to.example.com
not being a valid domain.The most feasible thing might be to use a lib.optional to make the hostPrefix optional for those who are worried about their reverse DNS.
Thoughts?