应用php的mail函数

在OpenBSD环境下搭建各种服务器的相关讨论。

版主: lionuxchenjun天地乾坤

回复
头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

应用php的mail函数

帖子 leo » 2011-05-29 5:02

原文链接:http://www.bamweb.nl/index.php?option=c ... 6&Itemid=1
PHP mail function in OpenBSD I finally found out how to get some email functions working in Joomla. If you configure Joomla to use the SMTP server it works perfectly for updates in conjunction with Community Builder for example. But there are some components which uses the PHP mail function.
The downside of the PHP mail function with OpenBSD is, it wants to use sendmail. This is ofcourse a NO GO in a chrooted environment.
So the solution. Install the following package and execute the copy command.
pkg_add -v mini_sendmail-chroot
cp -p /var/www/bin/mini_sendmail /var/www/usr/sbin/sendmail
After this it works like a charm!!!

JSJer
钛 Ti
帖子: 24
注册时间: 2011-11-15 8:25

回复: 应用php的mail函数

帖子 JSJer » 2011-12-20 14:12

再加一步:
重启apache

#apachectl stop
#httpd -u

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: 应用php的mail函数

帖子 leo » 2011-12-20 15:50

根据网上的资料,mini_sendmail和femail功能类似,不过femail是安装PHP时自动安装的,估计是porter考虑了一些真实的应用中的问题。
如果启用了 -u 参数等于禁用了chroot,那就没有必要安装mini_sendmail或者femail了,JSjer兄确定这是最佳的方案吗?

JSJer
钛 Ti
帖子: 24
注册时间: 2011-11-15 8:25

回复: 应用php的mail函数

帖子 JSJer » 2011-12-20 19:41

对,应改成:

#apachectl stop
#apachectl start
的确要重启的,最好在开始用前把这个处理好。

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

回复: 应用php的mail函数

帖子 leo » 2011-12-29 0:12

改时间再研究,多谢提供方法。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 29 访客