Views: 114
Last Modified: 20.09.2021

Below is the example for mail configuration at CentOS 5 (Commands may differ for other OS).

  1. Delete sendmail:
    # rpm -e --nodeps sendmail
  2. Indicate postfix:
    # yum install postfix
    # /etc/postfix/post-install upgrade-package
  3. Recompile alias database:
    # cd /etc
    # newaliases
  4. Modify sendmail_path in /etc/php.ini:
    sendmail_path = /usr/sbin/sendmail -t -i
  5. Launch postfix:
    # service postfix restart
  6. Relaunch apache:
    # service zend-server restart
  7. 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
  8. 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.";
    ?>





Courses developed by «Bitrix», Inc.