Friday 24 September 2010

sendmail and sm-client very slow to start

After changing the IP address of a server, at the time of booting up sendmail and sm-client took a very long time (about 5 minutes each) to start.


 

Usually when sendmail is sluggish starting - it's because it can't figure out hostname details.

# cat /etc/hosts

127.0.0.1 localhost.localdomain localhost


 

above needs to be the very first line of /etc/hosts

if you are accepting email for a domain then it would help if you have

the fully qualified domain name set in /etc/sysconfig/network and that

name resolves via dns or at least is listed with an ip address

in /etc/hosts...

i.e.


 

# hostname

linuxserver.mydomain.com


 

# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=linuxserver.mydomain.com


 

# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

192.168.0.1 linuxserver.mydomain.com linuxserver

# host linuxserver.mydomain.com

linuxserver.mydomain.com has address 192.168.0.1


 

# cat /etc/mail/local-host-names

mydomain.com

linuxserver.mydomain.com

www.mydomain.com

localhost

localhost.localdomain


 

That's it !

No comments:

Post a Comment