Views: 3379
Last Modified: 20.09.2021
Below is the example for mail configuration at CentOS 5 (Commands may differ for other OS).
- Delete sendmail:
# rpm -e --nodeps sendmail
- Indicate postfix:
# yum install postfix
# /etc/postfix/post-install upgrade-package
- Recompile alias database:
# cd /etc
# newaliases
- Modify sendmail_path in
/etc/php.ini
:
sendmail_path = /usr/sbin/sendmail -t -i
- Launch postfix:
# service postfix restart
- Relaunch apache:
# service zend-server restart
- Check availability of postfix at autoload
# chkсonfig --list|grep postfix
(available by default):
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
if no:
# chkconfig postfix on
- Check the operation:
<?
if (mail("moe_mail@gmail.com","test subject", "test body","From: sender@bitrix24.com"))
echo "Message passed to mail function, check the mailbox.";
else
echo "Function mail is in-operational, contact hosting administration.";
?>