Setting HostName in Linux

Today i found many of the mails send from server12.netfreehost.com used for free web hosting bounced back with following error.

The original message was received at Mon, 16 May 2005 16:53:28 +0100
from localhost.localdomain [127.0.0.1]

—– The following addresses had permanent fatal errors —–

(reason: 553 localhost.localdomain does not exist)

—– Transcript of session follows —–
… while talking to mail.vip.hr.:
>>> MAIL From: SIZE=2382
<<< 553 localhost.localdomain does not exist
501 5.6.0 Data format error

The mails are getting bounced because the hostname of the servers is set as

localhost.localdomain

To set the hostname, edit /etc/sysconfig/network

vi /etc/sysconfig/network

changed

NETWORKING=yes
HOSTNAME=localhost.localdomain

to

NETWORKING=yes
HOSTNAME=server12.netfreehost.com

And restarted service network

# service network restart

Now hostname is server12.netfreehost.com

# hostname
server12.netfreehost.com

Related posts:

  1. How to Access Windows Share in Linux
  2. Internet on linux virtual machine
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>