VPS侦探论坛

 找回密码
 注册
查看: 2845|回复: 2

菜鸟求助 关于 sendmail

[复制链接]
发表于 2020-4-20 17:38:58 | 显示全部楼层 |阅读模式

我安装的lnmp1.6 然后网站系统是dicuzs3.4

卸载 sendmail 重新安装
Modular dependency problem:

Problem: conflicting requests
  - nothing provides module(nginx) needed by module php:7.2:8010020191114034540:2430b045-0.x86_64
  - nothing provides module(httpd:2.4) needed by module php:7.2:8010020191114034540:2430b045-0.x86_64
No match for argument: sendmail
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!
[root@vultrguest ~]# yum -y install sendmail
Last metadata expiration check: 1:12:11 ago on Mon 20 Apr 2020 03:59:22 PM CST.
Dependencies resolved.
================================================================================
Package          Architecture   Version                Repository         Size
================================================================================
Installing:
sendmail         x86_64         8.15.2-32.el8          AppStream         773 k
Installing dependencies:
procmail         x86_64         3.22-47.el8            AppStream         180 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 953 k
Installed size: 2.7 M
Downloading Packages:
(1/2): sendmail-8.15.2-32.el8.x86_64.rpm        3.8 MB/s | 773 kB     00:00
(2/2): procmail-3.22-47.el8.x86_64.rpm          881 kB/s | 180 kB     00:00
--------------------------------------------------------------------------------
Total                                           1.3 MB/s | 953 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : procmail-3.22-47.el8.x86_64                            1/2
  Running scriptlet: sendmail-8.15.2-32.el8.x86_64                          2/2
  Installing       : sendmail-8.15.2-32.el8.x86_64                          2/2
  Running scriptlet: sendmail-8.15.2-32.el8.x86_64                          2/2
  Verifying        : procmail-3.22-47.el8.x86_64                            1/2
  Verifying        : sendmail-8.15.2-32.el8.x86_64                          2/2

Installed:
  sendmail-8.15.2-32.el8.x86_64           procmail-3.22-47.el8.x86_64

Complete!


相信这个是安装成功了吧?

按照网上的教程(贴在帖子尾部)
/etc/init.d/php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm  done
下一步
/etc/init.d/sendmail start
-bash: /etc/init.d/sendmail: No such file or directory

sendmail 不存在?

请问我安装成功了吗?网上的教程能用不?不能用求介绍一个能用的。菜鸟苦逼啊。

网上教程
第一、重新安装sendmail组件

在重新安装之前,最好我们先清空sendmail组件(yum -y remove sendmail),万一之前也有安装。

yum -y install sendmail
上面的命令基于centos重新安装sendmail组件,如果是debian系统,那就是apt-get。

第二、重启php-fpm进程

/etc/init.d/php-fpm restart
第三、启动sendmail

/etc/init.d/sendmail start
启动的时候需要等一会,不要以为卡住不动,其实是要我们等等,不要这么着急。

第四、检查sendmail是否运行

/etc/init.d/sendmail status
这里检测到是在running运行的,但确保能够完好兼容,再执行下面步骤。

第五、修改php.ini文档

编辑/usr/local/php/etc/php.ini文档,找到sendmail_path一行,设置为:

sendmail_path = /usr/sbin/sendmail -t -i
最后,重启php-fpm

/etc/init.d/php-fpm restart

这样,完整的sendmail就可以完毕实现,比如密码找回、注册提醒等都可以实现。如果需要评论提醒,比如WORDPRESS有些是需要组件和功能支持的,并不是所有主题都支持的。


美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2020-4-21 08:35:57 | 显示全部楼层


对于现在的系统来说不一定都有init.d的脚本,可以尝试 service sendmail restart 或 systemctl restart sendmail.service
个人自用使用自搭邮件服务器如果没做什么优化调整到达率其实很低,发信量不多的话可以直接使用自己邮箱的smtp或云服务商、邮件服务商的smtp之类的服务
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2020-4-21 09:25:40 | 显示全部楼层

明白了。 你说的  service sendmail restart 或 systemctl restart sendmail.service 我都用过。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-21 19:47 , Processed in 0.026014 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表