当前位置:网站首页>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 sendmailThe test result shows that the component is not installed , Install decisively :
yum install sendmailAfter 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.inifind 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 –iSome of this defaults to this value . Then restart sendmail:
service sendmail restartTwo : 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/hostsResults found :
127.0.0.1 localhost.localdomain localhostNot 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 testhostnext , 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.mcEdit 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)dnlWill 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.cfThen , 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-cfProblem solving after completion .
There are other things to add !
边栏推荐
- 28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;
- 修改数据库中的记录为什么报这个错
- Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
- Reflection -- basic usage
- Exercise 9-3 plane vector addition
- Leetcode(4)——尋找兩個正序數組的中比特數
- The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
- QT learning 21 standard dialog box in QT (Part 2)
- QT learning 19 standard dialog box in QT (top)
- 虽然不一定最优秀,但一定是最努力的!
猜你喜欢

28:第三章:开发通行证服务:11:在配置文件中定义属性,然后在代码中去获取;

Exercise 10-6 recursively find Fabonacci sequence

天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪

7-10 calculate salary

Exercise 8-7 string sorting
![[clean up the extraordinary image of Disk C]](/img/0d/331115bc5d82d6337ae975a08494b2.jpg)
[clean up the extraordinary image of Disk C]

protobuf与grpc

Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them

Exercise 9-3 plane vector addition

concat和concat_ws()区别及group_concat()和repeat()函数的使用
随机推荐
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
Raft agreement
Leetcode(4)——尋找兩個正序數組的中比特數
Invalid Z-index problem
MongoDB数据库入门的常用命令
Fabric. JS document
7-2 and then what time (15 minutes)
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
Find specified characters
Collection of mobile adaptation related articles
Similarities and differences between Allegro, OrCAD, net alias, port, off page connector and how to select them
PCB中常用快捷键
Exercise 9-1 time conversion
必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿
Duet date picker (time plug-in that can manually enter the date)
Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
玖逸云黑免费无加密版本源码
剑指 Offer 28. 对称的二叉树
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
JS get DPI, PX to cm, cm to PX