Best Reverse DNS setup with 1 IP & email server in LXD container?

Will be running my email server within an LXD container. Server has 1 IP.

Unsure which hostname will be reported to other email servers as the hostname. My host OS hostname or the LXD email server container hostname?

Any recommended configuration for this type of scenario?

It will most likely be the hostname of your container, seeing as that is where the email software will be running from.

But you will also need to consider the reverse DNS of the public IP being used for outbound connections as that should match the hostname announce in the SMTP protocol for reliable delivery, as should the forward DNS of the announced hostname also match the reverse DNS of the public IP.

Thanks for your comments. That’s also what I’ve been thinking, that it will be the mail server container’s hostname that’s announced in SMTP connections.

Not sure if there are any downsides to pointing RDNS to the container rather than the host OS. As far as I’m aware, RDNS is pretty much only used in regards to email deliverability and shouldn’t impact anything else by pointing it to the mail server container.

I’ll be testing sometime soon and once I determine for sure how I’ll be setting it up I will post a reply here for anyone in the future who has the same questions & stumbles upon this discussion.

The hostname announced and the RDNS you use are all up to you (you can most likely change the hostname announced in the SMTP software to be different from the container hostname if you prefer). They just have to match.