外寄郵件功能

    版本為 13:28, 3 Oct 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    使用 postfix 做 SMTP client

    移除 sendmail 套件以及安裝 postfix

    以 seednet 的 SMTP server 為例

    yum remove sendmail
    或者
    rpm -e sendmail sendmail-cf 
    
    yum install postfix
    

    編輯 /etc/postfix/main.cf

    ...
    myhostname = homepbx.osslab.tw
    ...
    myorigin = $myhostname
    inet_interfaces = all
    ...
    # for seednet SMTP server
    relayhost = [tcts.seed.net.tw]:25
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd_seednet 
    

    建立連線密碼檔

    新增 /etc/postfix/saslpasswd_seednet

    tcts.seed.net.tw yourid@seed.net.tw:yourpassword
    

    建立加密檔

    # postmap hash:/etc/postfix/saslpasswd_seednet 
    # chmod 600 /etc/postfix/saslpasswd_seednet /etc/postfix/saslpasswd_seednet.db

    重啟服務

    service postfix restart
    

    使用 ssmtp 做 SMTP Client

    參閱 Install and Setting ssmtp for FreePBX

    Powered by MindTouch Core