Solve the Sendmail slow card in Linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. From: ccvita.com
First
Ntsysv
Directly cancel the sendmail service. This completely solves the problem of slow sendmail.
Second
The main reason for the sendmail card is that your DNS resolution is abnormal. Check whether the following two files are set properly.
/Etc/hosts you can set the IP address for your domain name, and add the IP address you need to use the sendmail service.
/Etc/resolv. conf here is the dns ip address. Set a DNS with a good speed. If the above two items are not set, it will also lead to the slow sendmail card phenomenon.
Third
That is, in the most invincible situation I encountered, I shut down the machine, installed the software drive, and then turned it on, so I couldn't go anywhere in sendmail. Wait for 20 minutes. Under normal circumstances, if DNS resolution fails, it will take at most one or two minutes to start sendmail. Instead, restart linux and press I to start the system. At last, I found that the old man had paid for his network cable and replaced the new network cable to solve the problem.
Fourth
This is also the most common. When sending a large number of emails, the DNS resolution speed will become the biggest bottleneck of sendmail, especially when sending a batch of mail servers with extremely slow DNS resolution. In this case, you can install DNS Cache to solve the problem. Baidu or google Keyword "linux DNS cache" will have a lot, so I will not repeat it here!
A section on djbdns will show you.
The installation process is as follows:
# Cd/usr/ports/dns/djbdns
# Make install clean
# Mkdir/var/service
# Csh (or exit and log on again, or run bash)
# Dnscache-conf nobody/var/service/dnscache 127.0.0.1
# Add svscan_enable = "YES" to vi/etc/rc. conf"
#/Usr/local/etc/rc. d/svscan. sh start the service and complete the installation
Check the service startup status below
# Netstat-anl | grep LISTEN
Check whether there is a listening service with port 53. If so, OK.
Modify the/etc/reslove. conf file and add 127.0.0.1 to the first line, as shown below:
Nameserver 127.0.0.1
Nameserver xx. xx (other public network DNS)
Test the effect.
Ping www.ccvita.com
You will find that the first time may be a little longer, and the second response time is basically 0.001 msec. This is to get the local cache, the effect is good!
Then we tested a large number of concurrent sendmail sending requests, and the results were completely satisfactory for the concurrent business processing of medium websites!
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.