社内のPCからメールを送信するためのsmtpサーバを立てるため
クラウド上(AWS)のサーバ(CentOS)にpostfixとsmtp認証のためのsaslをインストールし、ひと通り設定しました。
動作確認でtestsaslauthdコマンドを叩いたところ、 0: NO "authentication failed"
が返ってきてしまいます。
設定を何度も見直し、参考サイトをいくつも見て比較し、確認したのですが差があるようにみえず、どこに問題あるのか未だ解決できていません。
設定内容からここがおかしい、足りないなどがあれば教えていただけますと助かります。
以下、各種設定した内容になります。不足情報がありましたら追記します。
よろしくお願いします。
# testsaslauthd -u xxxx -p passwd -r hogehoge.co.jp -s smtp 0: NO "authentication failed"
# cat /var/log/messages (抜粋) saslauthd[20334]: do_auth : auth failure: [user=xxxx] [service=smtp] [realm=hogehoge.co.jp] [mech=pam] [reason=PAM auth error]
# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
# rpm -qa cyrus-sasl* cyrus-sasl-2.1.26-23.el7.x86_64 cyrus-sasl-md5-2.1.26-23.el7.x86_64 cyrus-sasl-lib-2.1.26-23.el7.x86_64 cyrus-sasl-gssapi-2.1.26-23.el7.x86_64 cyrus-sasl-scram-2.1.26-23.el7.x86_64 cyrus-sasl-plain-2.1.26-23.el7.x86_64 cyrus-sasl-devel-2.1.26-23.el7.x86_64
# sasldblistusers2 xxxx@hogehoge.co.jp: userPassword
# ll /etc/sasldb2 -rw-r----- 1 postfix postfix 12288 Sep 4 17:40 /etc/sasldb2
# cat /etc/sasl2/smtpd.conf #pwcheck_method: saslauthd pwcheck_method: auxprop #mech_list: plain login mech_list: cram-md5 digest-md5 plain login auxprop_plugin: sasldb
# cat /etc/sasl2/Sendmail.conf pwcheck_method:saslauthd
# cat /etc/sysconfig/saslauthd # Directory in which to place saslauthd's listening socket, pid file, and so # on. This directory must already exist. SOCKETDIR=/run/saslauthd # Mechanism to use when checking passwords. Run "saslauthd -v" to get a list # of which mechanism your installation was compiled with the ablity to use. MECH=pam # Additional flags to pass to saslauthd on the command line. See saslauthd(8) # for the list of accepted flags. FLAGS=
# cat /etc/pam.d/smtp #%PAM-1.0 auth include password-auth account include password-auth
# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix cyrus_sasl_config_path = /etc/sasl2/ daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 disable_vrfy_command = yes home_mailbox = Maildir/ html_directory = no inet_interfaces = all inet_protocols = ipv4 mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man message_size_limit = 25600000 milter_default_action = accept mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mydomain = hogehoge.co.jp myhostname = hogehoge.co.jp mynetworks = 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix non_smtpd_milters = $smtpd_milters queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relay_domains = $mydestination sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_tls_CAfile = /etc/pki/tls/cert.pem smtp_tls_loglevel = 1 smtp_tls_security_level = may smtpd_banner = $myhostname ESMTP unknown smtpd_helo_required = yes smtpd_milters = inet:127.0.0.1:8891 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550
# cat /etc/postfix/master.cf (抜粋) smtp inet n - n - - smtpd #smtp inet n - n - 1 postscreen #smtpd pass - - n - - smtpd #dnsblog unix - - n - 0 dnsblog #tlsproxy unix - - n - 0 tlsproxy 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_client_restrictions=permit_sasl_authenticated,reject
# postconf | grep mail_version mail_version = 2.10.1
# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
回答1件
あなたの回答
tips
プレビュー