LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-06-2007, 11:17 AM   #1
yogaboy
Member
 
Registered: Oct 2004
Location: Londinium
Distribution: CentOs 4, OSX Tiger
Posts: 93

Rep: Reputation: 15
hostname - for mail server (or any other remote access server)


Hi,

looking at most documentation I should use this in /etc/hosts

127.0.0.1 localhost.localdomain localhost
192.168.0.10 mybox.mydomain.com mybox


but what if that server is also a mail server that has a DNS entry of mail.mydomain.com??

should it now read...

127.0.0.1 localhost.localdomain localhost
192.168.0.10 mybox.mydomain.com mybox mail.mydomain.com mail


thanks for looking at this, any input is much appreciated
 
Old 02-06-2007, 01:28 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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..

http://www.cpqlinux.com/hostname.html
 
Old 02-06-2007, 05:32 PM   #3
yogaboy
Member
 
Registered: Oct 2004
Location: Londinium
Distribution: CentOs 4, OSX Tiger
Posts: 93

Original Poster
Rep: Reputation: 15
Thanks, that was really helpful.

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??
 
Old 02-06-2007, 08:28 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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.

Last edited by farslayer; 02-06-2007 at 09:38 PM.
 
Old 02-06-2007, 08:53 PM   #5
yogaboy
Member
 
Registered: Oct 2004
Location: Londinium
Distribution: CentOs 4, OSX Tiger
Posts: 93

Original Poster
Rep: Reputation: 15
ok, thanks, that was really helpful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting mails from remote mail server is slow,so need an intermediate server Sleen Linux - Networking 5 09-30-2006 03:09 PM
Can't access server using hostname from other PCs on the local network binister Linux - Software 5 09-01-2006 03:13 AM
Mail server for remote access VaughanR Linux - Networking 1 05-01-2006 02:36 PM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
Remote Access Server lewisc33 Linux - Software 0 11-05-2002 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration