首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >PHP ()返回FALSE但整个雨水循环工作-后缀,Dovecot,PHP7.3

PHP ()返回FALSE但整个雨水循环工作-后缀,Dovecot,PHP7.3
EN

Server Fault用户
提问于 2021-10-21 22:15:16
回答 1查看 453关注 0票数 0

我早些时候遇到了这个问题,但不知怎么地设法把它修好了。在我不得不重新安装Dovecot和Postfix一个月后,同样的错误出现了。

在位于/etc/php/7.3/apache2/ /的php.ini中,sendmail_path设置为

sendmail_path =/etc/后缀

它写道,我对权限有一个问题:

代码语言:javascript
运行
复制
user@occamy:/etc$ sudo tail /var/log/mail.warn
Oct 21 16:27:36 localhost postfix/sendmail[20073]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied
Oct 21 16:28:36 localhost postfix/sendmail[20079]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied
Oct 21 16:35:02 localhost postfix/postfix-script[20270]: warning: symlink leaves directory: /etc/postfix/./makedefs.out
Oct 21 16:35:02 localhost postfix/postfix-script[20273]: warning: symlink leaves directory: /etc/postfix/./postfix_ab/makedefs.out
Oct 21 16:35:07 localhost postfix/sendmail[20328]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied
Oct 21 16:35:32 localhost postfix/sendmail[20350]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied
Oct 21 16:37:00 localhost postfix/postfix-script[20565]: warning: symlink leaves directory: /etc/postfix/./makedefs.out
Oct 21 16:37:00 localhost postfix/postfix-script[20568]: warning: symlink leaves directory: /etc/postfix/./postfix_ab/makedefs.out
Oct 21 16:37:07 localhost postfix/sendmail[20623]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied
Oct 21 16:37:15 localhost postfix/sendmail[20625]: fatal: /etc/postfix/dynamicmaps.cf: file open failed: Permission denied

/etc/postfix/dynamicmaps.cf

我对main.cf也有同样的问题。我用chmod 775解决了这个问题,我想没那么好.

然后写这个权限错误。最奇怪的是,我在取得电子邮件方面取得了这样的进展:

  1. 邮件在发送邮件()时返回FALSE
  2. 将整个后缀目录更改为perm。775和发送邮件-返回TRUE
  3. 未收到电子邮件
  4. 更改为每个文件的所有以前的权限。
  5. 电子邮件已经神奇地收到,但不能再发送。从第1点开始重复

另外,当我将dynamicmaps.cf设置为chmod 775时,sudo postconf -m写道:

代码语言:javascript
运行
复制
btree
cidr
environ
fail
hash
inline
internal
memcache
nis
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix

而mysql缺少这些权限集。

谢谢您的回复预告!

EN

回答 1

Server Fault用户

发布于 2021-10-22 06:57:23

您已经定制了sendmail_path参数,而不知道它做了什么。

来自PHP文档

在哪里可以找到sendmail程序,通常是/usr/sbin/sendmail或/usr/lib/sendmail。configure确实尝试为您定位这个选项,并设置了一个默认值,但是如果它失败了,您可以在这里设置它。

您很可能不需要对其进行调优,因为如果所有包都来自包管理器,则默认情况下它将工作;如果确实需要对其进行调优,则肯定不能将文件夹作为值传递。

后缀的权限错误可能是因为文件所有者没有正确设置。作为一个普遍的经验法则,chmodchown/etc中至少是不常见的。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1081335

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档