The slow mail problem of sendmail under Linux host

  

In most Linux distributions, the old mail system package of sendmail is installed by default. After the system is installed, when restarting, many brothers encounter during the startup process. When it starts the sendmail service, it stops. Friends who have no patience and experience may think that the system is faulty or the system is not installed. In fact, neither the system is faulty, nor the system is not installed, but the system sendmail. When querying the A record or reverse domain name record of the host name you set, since the 9 DNS root systems in the world are all in the United States, this time you will query the dns A record corresponding to the host name of the machine, especially when you install the system. Set some of the "strange" host name, such as webserver, etc., this time sendmail will do this operation.

Apr 28 13:41:36 webserver sendmail[3494]: gethostby*.getanswer: asked for "webserver IN AAAA", got type "A"

Apr 28 13:42 :36 webserversendmail[3499]: gethostby*.getanswer: asked for "webserver IN AAAA", got type "A"

Apr 28 13:43:37 webserver sendmail: sendmail startup succeeded

Apr 28 13:43:37 webserver sm-msp-queue[3509]: gethostby*.getanswer: asked for "webserver IN AAAA", got type "A"

Good luck, mine It means your "RP", ok, oh, the query is faster, you can't feel the same, "RP" is not good, as little as one to two minutes, more than four to five minutes, and the fate is not reported any The error message, this time is much longer than the time we can endure "8s", and the brothers who suffer poorly in their hearts will suffer.

Understanding the crux of the problem, you can prescribe the right medicine. For example, we can modify the system configuration file /etc/hosts and /etc/resolv.conf

to let sendmial bypass the query remote host, here Given the easiest way to set an alias for the host

Modify /etc/hosts, before modifying

127.0.0.1 localhost.localdomain localhost


127.0.0.1 localhost.localdomain localhost webserver

Restart sendmail again

[root@webserver ~]# service sendmail restart

Shutting down Sm-client: [ OK ]

Shutting down sendmail: [ OK ]

Starting sendmail: [ OK ]

Starting sm-client: [ OK ]

The startup time has reached the second level.

Copyright © Windows knowledge All Rights Reserved