hostname - for mail server (or any other remote access server)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Follow this guide to properly set the hostname.
The hostname MUST be set correctly for a mail server or it will cause problems.
I found out the hard way what sort of trouble a small hostname error will cause your mail server, everything else was right, but the hostname wasn't set properly in every location. That landed my legit mailserver on a blacklist..
I still don't quite understand something though. I've seen it written in several places that the local hostname doesn't/shouldn't be the same as the DNS name - so I might call it 'mybox' locally but 'mail'... on the DNS.
This is fine, but if I add a certificate then it has to have the same name (common name) as the server does locally or else it throws up warnings, but the user is connecting via the DNS name. So how does that work? Or have I just got the wrong end of the stick??
Well wherever you read that it is incorrect. the local hostname set on the mail server needs to be the SAME as the public registered DNS name. That is what caused the problem for me. the DNS name registered for the machine was mail.mydomain.com but the hostname was being reported as something slightly different so when the other mail server got the HELO message and did the lookup, the local hostname reported by my server was different than the DNS name it didn't match and their server automatically submitted my machine to one of the blacklists..
It is true that you can set them differently but in the case of a mail server. the mail server had better respond in the HELO with a name that matches one registered in the public DNS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.