当前位置:网站首页>Sendmail can't send mail and it's too slow to send. Solve it
Sendmail can't send mail and it's too slow to send. Solve it
2022-07-03 14:17:00 【Brother Xing plays with the clouds】
Today's toss CentOS When Sendmail Some of the problems we encountered , If the email cannot be sent , Some problems after sending, etc , Make a unified record here , In case it's not necessary , At the same time, I hope it can help some children's shoes that encounter these problems . Each problem will have detailed operation steps , Follow the steps ;
Toss the environment : CentOS Mail component :Sendmail
One 、 Although the host supports mail() function , But I can't send email ; First use the following command to check whether it is installed sendmail:
rpm –q sendmail
The test result shows that the component is not installed , Install decisively :
yum install sendmail
After waiting for the installation to complete, I went to check php.ini To configure , Relevant parameters need to be modified , direct :
vi /usr/local/php/etc/php.ini
find sendmail_path Place of action , It is found that it is not enabled , Remove the semicolon from the front ;( Press i Edit mode ), Remove the semicolon , And change it to :
sendmail_path = /usr/sbin/sendmail -t –i
Some of this defaults to this value . Then restart sendmail:
service sendmail restart
Two : Sending email is too slow The above steps can send mail normally , But I found that the sending was too slow , here , Please check hosts:
cat /etc/hosts
Results found :
127.0.0.1 localhost.localdomain localhost
Not in China hostname, Add it to , View the host name direct command :hostname , The host name added here is :testhost, Then the changed content is :
127.0.0.1 localhost.localdomain localhost testhost
next , restart sendmail;
After completing this step, you can also solve one sendmail and sm-client The problem of slow startup ;
3、 ... and 、 The sender of the email is :[email protected] Issue on behalf
Method 1 : modify hostname For personal domain Method 2 : Disguised as a [email protected]
Execute the following command :
/etc/mail/sendmail.mc
Edit the file after opening , Add the following at the end :
MASQUERADE_AS(gongzi.me)dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(gongzi.me)dnl
Will be one of the gongzi.me Change to your own domain name , Then save . Then execute the following command :
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Then , restart sendmail service .
Four : perform m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf when , Report errors :sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory, And lead to sendmail Related services cannot be started normally .
reason : Not installed sendmail-cf solve : Execute the following command :
yum install sendmail-cf
Problem solving after completion .
There are other things to add !
边栏推荐
- Leetcode(4)——尋找兩個正序數組的中比特數
- Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
- Doxorubicin loaded on metal organic framework MIL-88 DOX | folic acid modified uio-66-nh2 doxorubicin loaded [email
- Interface for querying IP home
- QT learning 25 layout manager (4)
- Scroll detection, so that the content in the lower right corner is not displayed at the top of the page, but is displayed as the mouse slides
- Exercise 10-3 recursive implementation of exponential functions
- Onmenusharetimeline custom shared content is invalid, and the title and icon are not displayed
- Strategy, tactics (and OKR)
- 关于回溯问题中的排列问题的思考(LeetCode46题与47题)
猜你喜欢
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
关于回溯问题中的排列问题的思考(LeetCode46题与47题)
npm install卡住与node-npy的各种奇怪报错
一文了解微分段应用场景与实现机制
Redis:字符串类型数据的操作命令
Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride(
JS input number and standard digit number are compared. The problem of adding 0 to 0
Interface for querying IP home
Mysql多表查询 #子查询
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
随机推荐
SSH访问控制,多次失败登录即封掉IP,防止暴力破解
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
JVM garbage collector
一文了解微分段应用场景与实现机制
Strategy, tactics (and OKR)
Programmable logic device software testing
js 2023. String pair equal to the target string after connection
jvm-运行时数据区
MongoDB数据库入门的常用命令
7-20 print 99 formula table (format output)
Message subscription and publishing
Exercise 6-1 classify and count the number of characters
Too many files with unapproved license
使用并行可微模拟加速策略学习
JS download files through URL links
Leetcode (4) -- find the median of two positively ordered arrays
Invalid Z-index problem
Understanding of closures
Redis: redis data structure and key operation commands
中国锂电池电解液行业市场专项调研报告(2022版)