1. <i id='SEtlD'><tr id='SEtlD'><dt id='SEtlD'><q id='SEtlD'><span id='SEtlD'><b id='SEtlD'><form id='SEtlD'><ins id='SEtlD'></ins><ul id='SEtlD'></ul><sub id='SEtlD'></sub></form><legend id='SEtlD'></legend><bdo id='SEtlD'><pre id='SEtlD'><center id='SEtlD'></center></pre></bdo></b><th id='SEtlD'></th></span></q></dt></tr></i><div id='SEtlD'><tfoot id='SEtlD'></tfoot><dl id='SEtlD'><fieldset id='SEtlD'></fieldset></dl></div>
        <bdo id='SEtlD'></bdo><ul id='SEtlD'></ul>

      <tfoot id='SEtlD'></tfoot>

    2. <legend id='SEtlD'><style id='SEtlD'><dir id='SEtlD'><q id='SEtlD'></q></dir></style></legend>

      <small id='SEtlD'></small><noframes id='SEtlD'>

      如何允许apache发送电子邮件?

      How can apache be allowed to send email?(如何允许apache发送电子邮件?)

      <legend id='p9TQl'><style id='p9TQl'><dir id='p9TQl'><q id='p9TQl'></q></dir></style></legend>

        <tbody id='p9TQl'></tbody>

      1. <tfoot id='p9TQl'></tfoot>
            • <bdo id='p9TQl'></bdo><ul id='p9TQl'></ul>
            • <i id='p9TQl'><tr id='p9TQl'><dt id='p9TQl'><q id='p9TQl'><span id='p9TQl'><b id='p9TQl'><form id='p9TQl'><ins id='p9TQl'></ins><ul id='p9TQl'></ul><sub id='p9TQl'></sub></form><legend id='p9TQl'></legend><bdo id='p9TQl'><pre id='p9TQl'><center id='p9TQl'></center></pre></bdo></b><th id='p9TQl'></th></span></q></dt></tr></i><div id='p9TQl'><tfoot id='p9TQl'></tfoot><dl id='p9TQl'><fieldset id='p9TQl'></fieldset></dl></div>
            • <small id='p9TQl'></small><noframes id='p9TQl'>

              • 本文介绍了如何允许apache发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个运行 Apache 2.2 和 PHP 5.3 的 CentOS 6.2 虚拟机,我试图通过 PHP 的 mail() 函数发送电子邮件.我可以毫无问题地从 CLI 发送电子邮件,但是当 PHP 尝试时它会失败.在 sendmail 日志中如下:

                I have a CentOS 6.2 virtual machine running Apache 2.2 and PHP 5.3 that I'm trying to send email from via PHP's mail() function. I can send email from the CLI without problems but when PHP tries it fails. In the sendmail log is the following:

                Oct  9 11:42:03 localhost sendmail[3080]: NOQUEUE: SYSERR(apache): can not chdir(/var/spool/clientmqueue/): Permission denied
                

                似乎 Apache 没有执行此操作的权限,但我不确定如何修复它.我发现了很多关于此的讨论,但没有足够具体到我可以使用的我正在做的事情.任何帮助,将不胜感激.谢谢!

                It seems like Apache doesn't have permission to do this but I'm not sure how to fix it. I've found a lot discussion about this but nothing specific enough to what I'm doing that I could use. Any help would be appreciated. Thanks!

                推荐答案

                首先要检查权限是否正确.这是我系统中的以下权限

                First you have to check if permission are correct. Here is the permission below in my system

                # ls -l/usr/sbin/sendmail.sendmail -r-xr-sr-x root smmsp/usr/sbin/sendmail.sendmail

                # ls -l/var/spool/clientmqueue drwxrwx--- smmsp smmsp/var/spool/clientmqueue

                如果您的权限或所有权错误,请使用 chown 和 chmod 进行更改.

                If your permissions or ownership is wrong then change it using chown and chmod.

                如果上述情况正确,则禁用 selinux,或者如果您希望启用 selinux,请使用 chcon 设置正确的 selinux 上下文.

                If the above is right then disable selinux or if you want selinux enabled use chcon to set the correct selinux context.

                http://docs.fedoraproject.org/en-US/Fedora/13/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-SELinux_Contexts_Labeling_Files.html

                要暂时禁用 selinux,请使用 #setenforce 0

                For disabling selinux temporarily use #setenforce 0

                这篇关于如何允许apache发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                datetime to timestamp(日期时间到时间戳)
                PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)

              • <i id='lhl6c'><tr id='lhl6c'><dt id='lhl6c'><q id='lhl6c'><span id='lhl6c'><b id='lhl6c'><form id='lhl6c'><ins id='lhl6c'></ins><ul id='lhl6c'></ul><sub id='lhl6c'></sub></form><legend id='lhl6c'></legend><bdo id='lhl6c'><pre id='lhl6c'><center id='lhl6c'></center></pre></bdo></b><th id='lhl6c'></th></span></q></dt></tr></i><div id='lhl6c'><tfoot id='lhl6c'></tfoot><dl id='lhl6c'><fieldset id='lhl6c'></fieldset></dl></div>

                    <legend id='lhl6c'><style id='lhl6c'><dir id='lhl6c'><q id='lhl6c'></q></dir></style></legend>
                      <bdo id='lhl6c'></bdo><ul id='lhl6c'></ul>
                          <tbody id='lhl6c'></tbody>

                        <small id='lhl6c'></small><noframes id='lhl6c'>

                      • <tfoot id='lhl6c'></tfoot>