wdcp安装后sendmail 不能启动25端口即不能使用PHP的sendmail发信的解决方案
[i=s] 本帖最后由 idcbaidu 于 2016-1-23 09:51 编辑 [/i]wdcp安装后sendmail 不能启动25端口即不能使用PHP的sendmail发信的解决方案
[font=Tahoma,]1. sendmail 没有启动?[/font]
[font=Tahoma,]ssh上启动服务,命令:[/font]
[font=Verdana, Helvetica, Arial, sans-serif]service sendmail start [/font]
[font=Verdana, Helvetica, Arial, sans-serif]或者[/font]
[font=Verdana, Helvetica, Arial, sans-serif]service sendmail restart[/font]
[img=628,146]http://www.cnzhanzhang.com/data/attachment/forum/201601/22/224150gflhza61mhhlh0a9.png[/img]
[font=Verdana, Helvetica, Arial, sans-serif]
[/font]
[font=Verdana, Helvetica, Arial, sans-serif]然后在wdcp后台启动sendmail[/font]
[font=Verdana, Helvetica, Arial, sans-serif]
[/font]
[img=800,0]http://www.cnzhanzhang.com/data/attachment/forum/201601/22/224149exzooo0n1i1xqqyr.png[/img]
[img=800,0]http://www.cnzhanzhang.com/data/attachment/forum/201601/22/224150yy2kpf949phtz292.png[/img]
[font=Tahoma,]做完后显示都启动了,可以使用端口检测显示25端口依然在关闭着。[/font]
[img=800,0]http://www.cnzhanzhang.com/data/attachment/forum/201601/22/224319nyazrprjlp6xtrrl.png[/img]
[font=Tahoma,]不用管这个,因为我们在服务器中能看到端口是开启的.[/font]
[font=Tahoma,]命令:[/font][color=#454545][font=Tahoma,][font=arial, 宋体, sans-serif, tahoma,]netstat -an[/font][/font][/color]
[color=#454545][font=Tahoma,][font=arial, 宋体, sans-serif, tahoma,]
[/font][/font][/color]
[img=800,0]http://www.cnzhanzhang.com/data/attachment/forum/201601/23/090344e1yk32fy3yrqq2uf.png[/img]
[font=Tahoma,]测试邮件发送功能:[/font]
[img=650,0]http://www.cnzhanzhang.com/data/attachment/forum/201601/23/090009pl1mizjn369lbem4.png[/img]
[font=Tahoma,]没有问题,可以使用sendmail了。[/font]
[font=Tahoma,]注意: 如果开启的有防火墙,需要放行25端口哦。[/font]
[font=Tahoma,]wdcp 如何关闭防火墙? 如何修改防火墙配置 [/font][font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]http://www.cnzhanzhang.com/thread-4349461-1-1.html[/size][/font]
[font=Tahoma,]使用sendmail发信修改发信人信息(由XXX代发) [/font][font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]http://www.cnzhanzhang.com/thread-4350582-1-1.html[/size]
[/font][font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]
[/size][/font]本文来源:http://www.cnzhanzhang.com/thread-4349449-1-1.html
[font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]我QQ 78315851 微信 78315851 如果有问题也可以一起探讨。[/size][/font]
[font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]
[/size][/font]
[font=Microsoft Yahei, Hei, Tahoma, SimHei, sans-serif][size=16px]服务器使用的是[/size][/font][color=#333333]CentOS 6.5 64位 (阿里云的,如果需要阿里云联系我也可以打折优惠购买哦。)[/color] 发现处理后发信速度非常慢,修正发信速度慢的方法:
SSH链接服务器后,进去看下hostname
sendmail虽然可以发邮件了,但速度之慢,令人发指,此时可以输入如下命令:
cat /etc/hosts
查看到解析文件如下(第三行的是服务器内部ip和阿里云服务器的主机名,涉及服务器,我已经随意修改其中个别数字。):
127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.160.39.7 AY130816172449676d34Z
因为sendmail监听的是127.0.0.1,但却无法确认主机名 AY130816172449676d34(因为在服务器上/etc/sysconfig/network文件里记录的HOSTNAME是 AY130816172449676d34 ),所以发送邮件就非常慢了。那么我就把 AY130816172449676d34 这个主机名同时也加到127.0.0.1上面,变成:
127.0.0.1 localhost
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 AY130816172449676d34
10.160.39.7 AY130816172449676d34Z
修改方法依然是用vi命令(也可以直接下载相关路径文件夹的文件修改后上传,最好使用EditPlus或者Sublime text等专业编辑器修改文件),然后使用上面的命令service sendmail restart重启sendmail服务即可。
来源:http://www.cnzhanzhang.com/thread-4350787-1-1.html 搞定了,囧rz 感谢 系统启动服务没有sendmail怎么办
页:
[1]