Technical article 107679

How can I get sendmail to recognize a new hostname?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

After changing hostname with uname -S, the old server name still shows up in the "From:" field of outgoing email. How can I get Sendmail to recognize a new hostname?

Solution

Follow these steps:
1. Begin by editing the configuration file for sendmail(ADMN), the
   sendmail.cf, in the /usr/lib directory.  You will find references
   to the older server name there that need to be changed.

Note: If the domain name is staying the same, then don't change it, only the host name.

These will look similar to:
# All the names this host is known by
DWoldservername.domain.COM
#
CWoldservername.domain.COM      oldservername
Change the entries to:
# All the names this host is known by
DWnewservername.domain.COM
#
CWnewservername.domain.COM      newservername
2. You also should edit the /usr/mmdf/mmdftailor file.  Even though
   Sendmail is being used, the mmdftailor file is still important
   because Sendmail reads it to obtain several settings.  Change all
   references to the old server name here, too. For example:
MLOCMACHINE "oldservername.domain.COM"
would change to:
MLOCMACHINE "newservername.domain.COM"
3. Once the above two files have been modified, stop and restart
   Sendmail.  To stop Sendmail, use the following command to get the
   associated process number:
ps -ef | grep sendmail
This will return output similar to:
root  2488  1033  7 15:01:29   ttyp5    00:00:00 sendmail

4. Kill the parent of these two processes (in the above example):

kill 1033

5. Restart sendmail from the command line, which is in the /etc/rc2.d directory.

See also

ta103333, "How Do I Change the System's Name?"

From the Xinuos technical article database, record 107679. Reproduced with permission. The original is at www.sco.com/ta/107679, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.