外寄郵件功能

    內容表格
    1. 1. 使用 postfix
    2. 2. 使用 ssmtp

    版本為 13:25, 3 Oct 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    使用 postfix

    移除 sendmail 套件以及安裝 postfix

    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
    
    Powered by MindTouch Core