Solve the problem of slow sendmail startup

Source: Internet
Author: User
Solve the problem of slow sendmail startup-Linux Enterprise Application-Linux server application information. The following is a detailed description. In most linux versions, the old mail system package sendmail is installed by default. After the system is installed, many of the brothers encounter a restart during the startup process, when the sendmail service is started, it stops. Friends Without patience and experience may think that the system is faulty or the system is not properly installed. In fact, it is neither a system fault, generally, this is not because the system is not properly installed. Instead, the system queries the record or Reverse Domain Name Record of the host name you set during sendmail. Because nine DNS root systems around the world are located in the United States, at this time, you will query the dns A record corresponding to the Host Name of the Local Machine, especially when you set some "strange" host names when installing the system, such as webserver, etc, sendmail will perform this operation at this time.

Apr 28 13:41:36 webserver sendmail [3494]: gethostby *. getanswer: asked for "webserver in aaaa", got type ""
Apr 28 13:42:36 webserversendmail [3499]: gethostby *. getanswer: asked for "webserver in aaaa", got type ""
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 ""

Good luck, I mean your "RP" is good. Haha, the query is fast, and you don't feel the same. The "RP" is not good, but it takes only one to two minutes, four to five minutes later, and no error message is reported. This time is much longer than the "8 s" time we can endure, A brother with poor endurance will suffer.

Once you know the crux of the problem, you can take the right medicine. For example, you can modify the system configuration file/etc/hosts and/etc/resolv. conf.

Let sendmial bypass the query remote host. Here is the simplest way to set an alias for the host.

Modify/etc/hosts. Before Modification

127.0.0.1 localhost. localdomain localhost

Modify
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.