
Postfix-SASL認証について質問があります。 Postfixを使用してメールサーバーを作成しました。ドメイン、パブリックIP、私のIPを指すMXレコードがあります。これで、自分のドメインでメールを送受信できます。今、私はメールクライアントを介して接続したいと思います。
私はcentos 7を使用していますが、この問題が初めてなので、誰でもこの問題を案内できますか? Cyrusを使ってみましたが、うまくいきません。
yum install postfix -y
yum -y install cyrus*
私のmain.cf
Postfixファイルは次のとおりです
myhostname = mx12.example.com
myorigin = $mydomain
mydomain = example.com
inet_interface = <my public ip>, localhost
inet_protocol = all
mydestination = localhost, $myhostname, $mydomain.....
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_type = cyrus
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
/etc/sasl2/smtpd.conf
:
pwcheck_method: saslauthd
mech_list: plain login
log_level: 7
/etc/pam.d/smtp
:
#%PAM-1.0
auth include pam_unix.so
account include pam_unix.so
/etc/postfix/master.cf
:
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
注文する:
systemctl enable --now postfix
systemctl enable --now saslauthd
testsaslauthd -u user -p password -s smtp
ファイアウォールオープンポート-: 25/tcp 143/tcp 587/tcp
これが私の設定ファイルです。誰にも解決策はありますか?