Solution to Sendmail slow card in Linux

Source: Internet
Author: User
Tags nameserver

First
Ntsysv
Directly cancel the sendmail service.
Problem

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
Here, you can set the IP address for your domain name, and add the IP address you need to use the sendmail service directly.

 

/Etc/resolv. conf
Here is the dns ip address. Setting a DNS with a good speed will also lead to slow Sendmail card.

<

 

Modify/etc/hosts. Before Modification
127.0.0.1 localhost. localdomain localhost
Repair
Change

127.0.0.1 localhost. localdomain localhostMaster
Machine name

The command for viewing the Host Name of the local machine is: Hostname
Restart Sendmail again.

[Root @ Rac1 ~] #
Service
Sendmail restart
Shutting down Sm-Client: [OK]
Shutting
Down
Sendmail: [OK]
Starting sendmail: [OK]
Starting
Sm-client: [OK
]
[Root @ rac1 ~] # Service sendmail restart
Shutting down
Sm-client: [OK
]
Shutting down sendmail: [OK]
Starting sendmail: [OK]
Starting

Sm-client: [OK]
[Root @ rac1 ~] # Reboot

>>>

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, Baidu or google Keyword "linux DNS
There will be a lot of cache, 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 Nobody/var/service/Dnscache
127.0.0.1
# Add in VI/etc/rc. conf
Svscan_enable = "yes"
#/Usr/local/etc/rc. d/svscan. Sh start
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

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!

 

Original article reference:

Http://www.bizsn.com/info/a/fuwuqijishu/linuxfuwuqi/2009/0917/13682.html

Http://hi.baidu.com/xioazhu/blog/item/605db41182e90d76cb80c4d6.html

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.