-
安裝 Cyrus SASL 套件:
#yum -y install cyrus-sasl-*
-
啟動 saslauthd 服務:
#systemctl enable saslauthd.service
#systemctl start saslauthd.service
-
修改設定檔 /etc/postfix/main.cf:
#vim /etc/postfix/main.cf
#追加下列設定:
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated
-
重新啟動 postfix 服務:
#systemctl restart postfix
-
測試 postfix 服務:
#telnet localhost 25
輸入下列指令:
ehlo localhost
應該要出現下列兩行的資訊:
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
離開方式:
quit