LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-05-2012, 12:01 PM   #1
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Rep: Reputation: Disabled
sendmail and hostnames on internal network only?


I realize this is a pretty specific question, but in my learning process it's an issue I've come across. This is part of a learning project for me.

What I have:

CentOS 6 virtual box
OTRS Ticketing system installed and browser accessible via IP
email: otrs@example.org

This ticketing system is on a box that is on our internal network.

I'm trying to set up sendmail to relay the ticket emails to our techs and to receive email notifications from Nagios in order to generate said tickets.

I have the email address created and I am able to send/receive emails from it from within Outlook on my work computer just fine. (otrs@example.org)

My question is really related the host name of the centos virtual box. Currently, my hosts file is as follows:

Code:
127.0.0.1 otrs.example.org
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
I'm at the point where I need to send in a ticket to our DNS server admin and have him make the necessary additions for this server to be able to use sendmail. However, I'm not certain if I need to change my hostname on this box? I'm not sure if setting the host name of this specific box to otrs.example.org is actually wrong? I'm a bit lost at this point (as if that wasn't obvious) and would appreciate any guidance that anyone might be able to provide.
 
Old 06-05-2012, 12:10 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You can't have multiple lines for the same IP in /etc/hosts so would ordinarily have all aliases on the same line. Also it is usual to have both a short name (no domain) and a fully qualified domain name (FQDN):

Code:
127.0.0.1 otrs.example.org otrs localhost.localdomain localhost
Although by default RHEL/CentOS puts the hostname you setup in the 127.0.0.1 entry I try to change that so that it has whatever IP I've assigned to the host's primary NIC. Note that the hostname entry must be the first line in /etc/hosts regardless of which IP you use. You should also have the localhost stuff as it is used for a lot of things so if your primary NIC were IP 10.01.01.10 you'd use:
Code:
10.10.10.10 otrs.example.org otrs 
127.0.0.1 localhost.localdomain localhost
Also on CentOS/RHEL the hostname as reported by the hostname comamand and uname -n is stored in /etc/sysconfig/network. The entries in /etc/hosts are just to allow lookups of IP associated with the name for various commands (such as ping).
 
Old 06-05-2012, 12:15 PM   #3
jbennett
Member
 
Registered: Apr 2012
Distribution: CentOS 6.2
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
Also on CentOS/RHEL the hostname as reported by the hostname comamand and uname -n is stored in /etc/sysconfig/network. The entries in /etc/hosts are just to allow lookups of IP associated with the name for various commands (such as ping).
So, I'm taking it that I should have the following in networking?

Code:
HOSTNAME=otrs.example.org
This is immensely helpful. Thanks!!

Last edited by jbennett; 06-05-2012 at 12:24 PM.
 
Old 06-05-2012, 12:23 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by jbennett View Post
So, I'm taking it that I should have the following in networking?

Code:
HOSTNAME=otrs.ntta.org
This is immensely helpful. Thanks!!
You could have either that FQDN or just the shortname otrs. You might want to reboot the server if you change that line as it affects what is written to syslog among other things.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Hostnames in Windows internal network mpn Linux - Networking 3 01-21-2006 05:54 PM
sendmail for internal network and network config questions RedHat123 Linux - Networking 0 04-06-2005 03:15 PM
Fedora can resolve external hostnames but not internal TheLandofSmeg Linux - Networking 3 02-25-2005 07:57 PM
Internal DHCP and Hostnames jeffxor Linux - Networking 2 11-26-2004 01:18 AM
smtp internal network 192.168.x.x sendmail sloboda Linux - Networking 0 10-03-2001 04:41 PM

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

All times are GMT -5. The time now is 12:31 PM.

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