Changing the advertised hostname with Sendmail

To change the hostname advertised when you connect to Sendmail, such as the one displayed here:

Connected to
Escape character is '^]'.
220 ESMTP Sendmail 8.13.4/8.13.4; Wed, 14 Sep 2005 13:54:26 +0100

Edit your /etc/mail/ to include:

Dj<your hostname>


Then restart sendmail.

This is useful if you have more than one IP address on the server.

Last updated: 14/09/2005