
Ubuntu日本語フォーラム
ログインしていません。
Ubuntu 16.04LTSでメールサーバを立ち上げようとしています。
SMTP-Authなしでメールの送受信が出来るのを確認しています。
しかしSMTP-Authを有効にするとメールの受信は出来ますが、送信が出来ません。
ログとPostfixの設定は下の通りです。
送信が出来るようにするにはどうすればいいでしょうか?
確認項目や修正項目があればご教示ください。
過去ログやネットで調べましたが、修正できなかったため質問させていただきました。
よろしくお願いいたします。
=== /var/log/mail.log ===
1. Jan 14 21:04:00 AAAAAA dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=XXX.XXX.XXX.XXX, lip=YYY.YYY.YYY.YYYYYY.YYY.YYY.YYY, mpid=1125, session=<10bfSrtiIcJ9ADY2>
2. Jan 14 21:04:00 AAAAAA dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=XXX.XXX.XXX.XXX, lip=YYY.YYY.YYY.YYY, mpid=1126, TLS, session=<aGXgSrtiIMJ9ADY2>
3. Jan 14 21:04:41 AAAAAA postfix/smtpd[1131]: warning: hostname systemip8.example.com does not resolve to address ZZZ.ZZZ.ZZZ.ZZZ: Name or service not known
4. Jan 14 21:04:41 AAAAAA postfix/smtpd[1131]: connect from unknown[ZZZ.ZZZ.ZZZ.ZZZ]
5. Jan 14 21:04:42 AAAAAA postfix/smtpd[1131]: warning: unknown[ZZZ.ZZZ.ZZZ.ZZZ]: SASL LOGIN authentication failed: Invalid authentication mechanism
6. Jan 14 21:04:42 AAAAAA postfix/smtpd[1131]: lost connection after AUTH from unknown[ZZZ.ZZZ.ZZZ.ZZZ]
7. Jan 14 21:04:42 AAAAAA postfix/smtpd[1131]: disconnect from unknown[ZZZ.ZZZ.ZZZ.ZZZ] ehlo=1 auth=0/1 commands=1/2
======
=== postconf -n(抜粋) ===
smtp_helo_name = $myhostname
smtpd_banner = $myhostname ESMTP unknown
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:10000
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = xxx.com
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_uid_maps = static:10000
======
=== sudo ls -l /var/spool/postfix/private/auth ===
srw-rw-rw- 1 postfix postfix 0 1月 14 21:03 /var/spool/postfix/private/auth
===
オフライン
SASL LOGIN authentication failed: Invalid authentication mechanism
つまり、SMTP-Auth の LOGIN 認証がエラーになっていますね。
LOGIN 認証は無効な認証メカニズムだとも表示されているので、dovecot の側でこれが無効になっている (指定されていない) のが直接の原因です。
とはいえ、通常であれば SMTP の送信手順の中で 250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 のように使用可能な認証メカニズムがサーバーから提示され、それを受け取ったメーラーが自身が対応可能なメカニズムを選択して認証を行うはずです。
dovecot の側で LOGIN 認証メカニズムが無効にされているのであれば、サーバーが提示する中にも LOGIN は現れないので、メーラーも LOGIN を使わないはずです。
LOGIN 認証メカニズムしか使用できず、サーバーからの提示を無視するようなメーラーをお使いなのでしょうか。
もしもそうであれば、セキュリティが低下するのを覚悟の上で、dovecot の側で LOGIN 認証メカニズムを有効にするしかありません。
念のために、postfix の main.cf に debug_peer_list=ZZZ.ZZZ.ZZZ.ZZZ (ZZZ.ZZZ.ZZZ.ZZZ メールを送信する端末のIPアドレス) と書き足して、送信後のログの 250-AUTH ~ の箇所にどんな認証メカニズムが列挙されているかを確認してみてください。
[余談]
LOGIN と PLAIN のふたつの認証メカニズムは、パスワードのやりとりを暗号化していないので、極力使用しないことが推奨です。
dovecot のログを見ると、PLAIN 認証メカニズムが有効になっているみたいなので、できればこれも無効にする方がいいと思います。
認証を行う通信がインターネットに露出しなければ、LOGIN や PLAIN を使っても構わないという考え方もあります。
dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=XXX.XXX.XXX.XXX, lip=YYY.YYY.YYY.YYYYYY.YYY.YYY.YYY, mpid=1125, session=<10bfSrtiIcJ9ADY2>
オフライン
ご指摘ありがとうございます。
メーラーはWindows10標準添付のものを使いました。
特にこのメーラーに限定する必要は無いので、メーラーの変更も考えたいと思います。
debug_peer_listを設定した後のログは下の通りです。
auth_mechanismsが次のようになっていたのが、認証エラーの原因でしょうか?
=== /etc/dovecot/conf.d/10-auth.conf ===
auth_mechanisms = cram-md5 plain
===
またLOGINやPLAINを使わない方が良いとのご指摘、感謝いたします。
これらを使わずに環境設定するにはauth_mechanismsを次のように変更だけで良いのでしょうか?
=== /etc/dovecot/conf.d/10-auth.conf ===
auth_mechanisms = cram-md5
===
お手数をおかけして恐縮ですが、ご教示いただけると幸いです。
よろしくお願いいたします。
=== /var/log/mail.log ===
13272 Jan 15 11:57:15 tk2-250-34691 postfix/master[1076]: daemon started -- version 3.1.0, configuration /etc/postfix
13273 Jan 15 11:57:15 tk2-250-34691 postfix/smtpd[1088]: warning: hostname no-reverse-dns-configured.com does not resolve to address aaa.aaa.aaa.aaa
13274 Jan 15 11:57:15 tk2-250-34691 postfix/smtpd[1088]: connect from unknown[aaa.aaa.aaa.aaa]
13275 Jan 15 11:57:16 tk2-250-34691 postfix/smtpd[1088]: warning: unknown[aaa.aaa.aaa.aaa]: SASL LOGIN authentication failed: Invalid authentication mechanism
13276 Jan 15 11:57:16 tk2-250-34691 postfix/smtpd[1088]: disconnect from unknown[aaa.aaa.aaa.aaa] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
13277 Jan 15 11:57:17 tk2-250-34691 postfix/smtpd[1088]: warning: hostname no-reverse-dns-configured.com does not resolve to address aaa.aaa.aaa.aaa
13278 Jan 15 11:57:17 tk2-250-34691 postfix/smtpd[1088]: connect from unknown[aaa.aaa.aaa.aaa]
13279 Jan 15 11:57:17 tk2-250-34691 postfix/smtpd[1088]: warning: unknown[aaa.aaa.aaa.aaa]: SASL LOGIN authentication failed: Invalid authentication mechanism
13280 Jan 15 11:57:18 tk2-250-34691 postfix/smtpd[1088]: disconnect from unknown[aaa.aaa.aaa.aaa] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
13281 Jan 15 11:58:08 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=ccc.ccc.ccc.ccc, mpid=1144, TLS, session=<dH02yMdieN13SMAL>
13282 Jan 15 11:58:18 tk2-250-34691 postfix/smtpd[1088]: warning: hostname newsoft1012.example.com does not resolve to address ddd.ddd.ddd.ddd: Name or service not known
13283 Jan 15 11:58:18 tk2-250-34691 postfix/smtpd[1088]: connect from unknown[ddd.ddd.ddd.ddd]
13284 Jan 15 11:58:18 tk2-250-34691 postfix/smtpd[1088]: warning: unknown[ddd.ddd.ddd.ddd]: SASL LOGIN authentication failed: Invalid authentication mechanism
13285 Jan 15 11:58:18 tk2-250-34691 postfix/smtpd[1088]: lost connection after AUTH from unknown[ddd.ddd.ddd.ddd]
13286 Jan 15 11:58:18 tk2-250-34691 postfix/smtpd[1088]: disconnect from unknown[ddd.ddd.ddd.ddd] ehlo=1 auth=0/1 commands=1/2
13287 Jan 15 11:58:51 tk2-250-34691 postfix/smtpd[1088]: warning: hostname walkerj235.example.com does not resolve to address eee.eee.eee.eee: Name or service not known
13288 Jan 15 11:58:51 tk2-250-34691 postfix/smtpd[1088]: connect from unknown[eee.eee.eee.eee]
13289 Jan 15 11:58:51 tk2-250-34691 postfix/smtpd[1088]: warning: unknown[eee.eee.eee.eee]: SASL LOGIN authentication failed: Invalid authentication mechanism
13290 Jan 15 11:58:52 tk2-250-34691 postfix/smtpd[1088]: lost connection after AUTH from unknown[eee.eee.eee.eee]
13291 Jan 15 11:58:52 tk2-250-34691 postfix/smtpd[1088]: disconnect from unknown[eee.eee.eee.eee] ehlo=1 auth=0/1 commands=1/2
======
オフライン
debug_peer_list で指定するアドレスは合っていますか?
メールを送信する端末の IP アドレスを指定していないように見えます。
よく分からなければ、debug_peer_list = 0.0.0.0/0 として全部の端末からの接続に対してデバッグ ログを出力させてください。
また、もしかすると Windows 10 標準のメーラーは LOGIN 認証メカニズムにしか対応していないのかもしれません。
その場合はメーラーを変えるか、SMTP-auth の認証メカニズムに LOGIN を追加するかのどちらかです。
なお、LOGIN のような非暗号化の認証メカニズムを提供する場合は、安全性が確保できるように、SMTPS または STARTTLS on SMTP の利用を強制するのが常道です。
SMTP-auth の動作確認が済んだ後に、必要であればそのように Postfix を設定してください。
オフライン
すいません。
debug_peer_list = 0.0.0.0/0
として再度ログをとりました。
またメーラーをWindows標準メーラーからiphone標準メーラーに変更しました。
ご指導いただけると幸いです。
=== /var/log/mail.log ===
15428 Jan 15 13:51:56 tk2-250-34691 dovecot: master: Dovecot v2.2.22 (fe789d2) starting up for imap, pop3 (core dumps disabled)
15429 Jan 15 13:51:57 tk2-250-34691 postfix/master[1069]: daemon started -- version 3.1.0, configuration /etc/postfix
15430 Jan 15 13:52:13 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=aaa.aaa.aaa.aaa, mpid=1129, TLS, session=<ouGSYMliReN3SMAL>
15431 Jan 15 13:52:13 tk2-250-34691 dovecot: imap([email protected]): Connection closed in=90 out=418
15432 Jan 15 13:52:20 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=aaa.aaa.aaa.aaa, mpid=1131, TLS, session=<dZzuYMliRuN3SMAL>
15433 Jan 15 13:52:23 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=aaa.aaa.aaa.aaa, mpid=1136, TLS, session=<kuwoYcliaeN3SMAL>
15434 Jan 15 13:52:23 tk2-250-34691 dovecot: imap([email protected]): Logged out in=253 out=3763
15435 Jan 15 13:52:24 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=aaa.aaa.aaa.aaa, mpid=1137, TLS, session=<by9BYcliauN3SMAL>
15436 Jan 15 13:52:24 tk2-250-34691 dovecot: imap([email protected]): Logged out in=98 out=461
15437 Jan 15 13:52:24 tk2-250-34691 dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=bbb.bbb.bbb.bbb, lip=aaa.aaa.aaa.aaa, mpid=1138, TLS, session=<YABFYclia+N3SMAL>
15438 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: connect from CCC.com[ccc.ccc.ccc.ccc]
15439 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: smtp_stream_setup: maxtime=300 enable_deadline=0
15440 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? 127.0.0.0/8
15441 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? 127.0.0.0/8
15442 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? 160.0.0.0/24
15443 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? 160.0.0.0/24
15444 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? aaa.aaa.aaa.aaa
15445 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? aaa.aaa.aaa.aaa
15446 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? AAA.com
15447 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? AAA.com
15448 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_list_match: CCC.com: no match
15449 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: match_list_match: ccc.ccc.ccc.ccc: no match
15450 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: auto_clnt_open: connected to private/anvil
15451 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: send attr request = connect
15452 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: send attr ident = smtp:ccc.ccc.ccc.ccc
15453 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: status
15454 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute name: status
15455 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 0
15456 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: count
15457 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute name: count
15458 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 1
15459 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: rate
15460 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute name: rate
15461 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 1
15462 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: (list terminator)
15463 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: input attribute name: (end)
15464 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 220 taiwannokoe.com ESMTP unknown
15465 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_create: SASL service=smtp, realm=taiwannokoe.com
15466 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: name_mask: noanonymous
15467 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: Connecting
15468 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: VERSION?1?1
15469 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: MECH?PLAIN?plaintext
15470 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: name_mask: plaintext
15471 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: MECH?DIGEST-MD5?dictionary?active?mutual-auth
15472 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: name_mask: dictionary
15473 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: name_mask: active
15474 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: name_mask: mutual-auth
15475 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: SPID?1126
15476 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: CUID?6
15477 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: COOKIE?48c8b9c58fd6b8d993ca60f53962748a
15478 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_connect: auth reply: DONE
15479 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN
15480 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_mech_filter: keep mechanism: DIGEST-MD5
15481 Jan 15 13:53:11 tk2-250-34691 postfix/smtpd[1144]: watchdog_pat: 0x55c7e3000930
15482 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: < CCC.com[ccc.ccc.ccc.ccc]: EHLO EX-SRV02
15483 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_list_match: CCC.com: no match
15484 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_list_match: ccc.ccc.ccc.ccc: no match
15485 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-taiwannokoe.com
15486 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-PIPELINING
15487 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-SIZE 10240000
15488 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-VRFY
15489 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-ETRN
15490 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-AUTH PLAIN DIGEST-MD5
15491 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-ENHANCEDSTATUSCODES
15492 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-8BITMIME
15493 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250-DSN
15494 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: > CCC.com[ccc.ccc.ccc.ccc]: 250 SMTPUTF8
15495 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: watchdog_pat: 0x55c7e3000930
15496 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: smtp_get: EOF
15497 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? 127.0.0.0/8
15498 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? 127.0.0.0/8
15499 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? 160.0.0.0/24
15500 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? 160.0.0.0/24
15501 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? aaa.aaa.aaa.aaa
15502 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? aaa.aaa.aaa.aaa
15503 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: CCC.com ~? AAA.com
15504 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: ccc.ccc.ccc.ccc ~? AAA.com
15505 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_list_match: CCC.com: no match
15506 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: match_list_match: ccc.ccc.ccc.ccc: no match
15507 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: send attr request = disconnect
15508 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: send attr ident = smtp:ccc.ccc.ccc.ccc
15509 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: status
15510 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: input attribute name: status
15511 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 0
15512 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: (list terminator)
15513 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: input attribute name: (end)
15514 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: lost connection after EHLO from CCC.com[ccc.ccc.ccc.ccc]
15515 Jan 15 13:53:12 tk2-250-34691 postfix/smtpd[1144]: disconnect from CCC.com[ccc.ccc.ccc.ccc] ehlo=1 commands=1
15516 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: warning: No server certs available. TLS won't be enabled
15517 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: connect from BBB.com[bbb.bbb.bbb.bbb]
15518 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: smtp_stream_setup: maxtime=300 enable_deadline=0
15519 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostname: smtpd_client_event_limit_exceptions: BBB.com ~? 127.0.0.0/8
15520 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostaddr: smtpd_client_event_limit_exceptions: bbb.bbb.bbb.bbb ~? 127.0.0.0/8
15521 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostname: smtpd_client_event_limit_exceptions: BBB.com ~? 160.0.0.0/24
15522 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostaddr: smtpd_client_event_limit_exceptions: bbb.bbb.bbb.bbb ~? 160.0.0.0/24
15523 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostname: smtpd_client_event_limit_exceptions: BBB.com ~? aaa.aaa.aaa.aaa
15524 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostaddr: smtpd_client_event_limit_exceptions: bbb.bbb.bbb.bbb ~? aaa.aaa.aaa.aaa
15525 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostname: smtpd_client_event_limit_exceptions: BBB.com ~? AAA.com
15526 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_hostaddr: smtpd_client_event_limit_exceptions: bbb.bbb.bbb.bbb ~? AAA.com
15527 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_list_match: BBB.com: no match
15528 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_list_match: bbb.bbb.bbb.bbb: no match
15529 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: auto_clnt_open: connected to private/anvil
15530 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: send attr request = connect
15531 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: send attr ident = submission:bbb.bbb.bbb.bbb
15532 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: private/anvil: wanted attribute: status
15533 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute name: status
15534 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute value: 0
15535 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: private/anvil: wanted attribute: count
15536 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute name: count
15537 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute value: 1
15538 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: private/anvil: wanted attribute: rate
15539 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute name: rate
15540 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute value: 1
15541 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: private/anvil: wanted attribute: (list terminator)
15542 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: input attribute name: (end)
15543 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 220 taiwannokoe.com ESMTP unknown
15544 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15545 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: EHLO [ddd.ddd.ddd.ddd]
15546 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_list_match: BBB.com: no match
15547 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: match_list_match: bbb.bbb.bbb.bbb: no match
15548 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-taiwannokoe.com
15549 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-PIPELINING
15550 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-SIZE 10240000
15551 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-VRFY
15552 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-ETRN
15553 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-STARTTLS
15554 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-ENHANCEDSTATUSCODES
15555 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-8BITMIME
15556 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250-DSN
15557 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 250 SMTPUTF8
15558 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15559 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: STARTTLS
15560 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 454 4.7.0 TLS not available due to local problem
15561 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15562 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: ???
15563 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax
15564 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15565 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: U=T|Ni~S??;?U?
15566 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax
15567 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15568 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: ?????0?/?(?'??????
15569 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax
15570 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15571 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: < BBB.com[bbb.bbb.bbb.bbb]: ????
15572 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax
15573 Jan 15 13:53:33 tk2-250-34691 postfix/smtpd[1146]: watchdog_pat: 0x55f920a97a40
15574 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: warning: hostname newsoft1011.example.com does not resolve to address 91.200.12.218: Name or service not known
15575 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: connect from unknown[91.200.12.218]
15576 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: smtp_stream_setup: maxtime=300 enable_deadline=0
15577 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 127.0.0.0/8
15578 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: 91.200.12.218 ~? 127.0.0.0/8
15579 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 160.0.0.0/24
15580 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: 91.200.12.218 ~? 160.0.0.0/24
15581 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? aaa.aaa.aaa.aaa
15582 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: 91.200.12.218 ~? aaa.aaa.aaa.aaa
15583 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? AAA.com
15584 Jan 15 13:53:36 tk2-250-34691 postfix/smtpd[1144]: match_hostaddr: smtpd_client_event_limit_exceptions: 91.200.12.218 ~? AAA.com
15585 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: match_list_match: unknown: no match
15586 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: match_list_match: 91.200.12.218: no match
15587 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: send attr request = connect
15588 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: send attr ident = smtp:91.200.12.218
15589 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: status
15590 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute name: status
15591 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 0
15592 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: count
15593 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute name: count
15594 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 1
15595 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: rate
15596 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute name: rate
15597 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute value: 1
15598 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: private/anvil: wanted attribute: (list terminator)
15599 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: input attribute name: (end)
15600 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: > unknown[91.200.12.218]: 220 taiwannokoe.com ESMTP unknown
15601 Jan 15 13:53:37 tk2-250-34691 postfix/smtpd[1144]: xsasl_dovecot_server_create: SASL service=smtp, realm=taiwannokoe.com
======
オフライン
提示いただいたログの中で必要な箇所だけを抜粋しました。
通信のブロックで空行を入れてあります。
connect from CCC.com[ccc.ccc.ccc.ccc] > CCC.com[ccc.ccc.ccc.ccc]: 220 taiwannokoe.com ESMTP unknown xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN xsasl_dovecot_server_mech_filter: keep mechanism: DIGEST-MD5 < CCC.com[ccc.ccc.ccc.ccc]: EHLO EX-SRV02 > CCC.com[ccc.ccc.ccc.ccc]: 250-taiwannokoe.com > CCC.com[ccc.ccc.ccc.ccc]: 250-PIPELINING > CCC.com[ccc.ccc.ccc.ccc]: 250-SIZE 10240000 > CCC.com[ccc.ccc.ccc.ccc]: 250-VRFY > CCC.com[ccc.ccc.ccc.ccc]: 250-ETRN > CCC.com[ccc.ccc.ccc.ccc]: 250-AUTH PLAIN DIGEST-MD5 > CCC.com[ccc.ccc.ccc.ccc]: 250-ENHANCEDSTATUSCODES > CCC.com[ccc.ccc.ccc.ccc]: 250-8BITMIME > CCC.com[ccc.ccc.ccc.ccc]: 250-DSN > CCC.com[ccc.ccc.ccc.ccc]: 250 SMTPUTF8 smtp_get: EOF lost connection after EHLO from CCC.com[ccc.ccc.ccc.ccc] disconnect from CCC.com[ccc.ccc.ccc.ccc] ehlo=1 commands=1 connect from BBB.com[bbb.bbb.bbb.bbb] > BBB.com[bbb.bbb.bbb.bbb]: 220 taiwannokoe.com ESMTP unknown < BBB.com[bbb.bbb.bbb.bbb]: EHLO [ddd.ddd.ddd.ddd] > BBB.com[bbb.bbb.bbb.bbb]: 250-taiwannokoe.com > BBB.com[bbb.bbb.bbb.bbb]: 250-PIPELINING > BBB.com[bbb.bbb.bbb.bbb]: 250-SIZE 10240000 > BBB.com[bbb.bbb.bbb.bbb]: 250-VRFY > BBB.com[bbb.bbb.bbb.bbb]: 250-ETRN > BBB.com[bbb.bbb.bbb.bbb]: 250-STARTTLS > BBB.com[bbb.bbb.bbb.bbb]: 250-ENHANCEDSTATUSCODES > BBB.com[bbb.bbb.bbb.bbb]: 250-8BITMIME > BBB.com[bbb.bbb.bbb.bbb]: 250-DSN > BBB.com[bbb.bbb.bbb.bbb]: 250 SMTPUTF8 < BBB.com[bbb.bbb.bbb.bbb]: STARTTLS > BBB.com[bbb.bbb.bbb.bbb]: 454 4.7.0 TLS not available due to local problem < BBB.com[bbb.bbb.bbb.bbb]: ??? > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax < BBB.com[bbb.bbb.bbb.bbb]: U=T|Ni~S??;?U? > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax < BBB.com[bbb.bbb.bbb.bbb]: ?????0?/?(?'?????? > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax < BBB.com[bbb.bbb.bbb.bbb]: ???? > BBB.com[bbb.bbb.bbb.bbb]: 500 5.5.2 Error: bad UTF-8 syntax connect from unknown[91.200.12.218] > unknown[91.200.12.218]: 220 taiwannokoe.com ESMTP unknown
ここには二度の通信ブロックと三度目の接続までが記録されています。
一つ目は原因は不明ですが、サーバーの Welcome メッセージ (220 taiwannokoe.com ESMTP unkown) にメーラーが EHLO を返し、その後のサーバーからの応答の後に切断されていますね。
メーラー側で強制的に中断したか何かでしょうか。
二つ目は、Welcome メッセージ、メーラーの EHLO とそのレスポンスの後にメーラーが STARTTLS で暗号通信しようとしたところ、サーバー側でエラー (454 ~) になっているにもかかわらず、メーラーがそのエラーを無視して暗号通信を行っているように見えます。
どちらもサーバー側の設定と言うよりも、メーラーの動作によるものなので、ここでは無視します。
さて、メーラーの EHLO に対するサーバーのレスポンスを見ると、一つ目と二つ目で内容が異なるのが気になります。
通常はこんなことはないはずです。
一つ目と二つ目で接続するポートが別 (例えば smtp [25] と submission [587]) というのなら、Postfix の master.cf でパラメーターが上書きされてこのようになってるのかもしれません。
とりあえずは、一つ目のブロックに関しては 250-AUTH PLAIN DIGEST-MD5 とあることから、LOGIN 認証メカニズムを受け付けない設定になっていることが明らかなので、これを受け付けるようにして確認するのが手っ取り早いでしょう。
LOGIN 認証メカニズムを使うようにして SMTP-auto の動作が確認できてから、これを無効にして CRAM-MD5 に対応したメーラーに限定するか、SMTPS や STARTTLS を強制するかを考えれば良いでしょう。
LOGIN 認証メカニズムを使えるようにするには Dovecot の設定で disable_plaintext_auth = no にして auth_mechanisms = ... に login を追加します。
disable_plaintext_auth は初期値が no なので、設定自体がない (コメントにされている) ならそれで十分です。
さらに Postfix の main.cf で smtpd_sasl_security_options = ... から noplaintext を削除してください。
smtpd_sasl_security_options は初期値が noanonymous の指定だけなので、これも設定自体がない (コメントにされている) ならそれで十分です。
二つ目のブロックについては、STARTTLS による暗号化がおかしいので、Postfix の main.cf のこの辺りの設定 (SMTPD_TLS_??? ) と Postfix で使う証明書を見なおすべきでしょう。
もっともまずは、STARTTLS を使わせない設定で Postfix 自体の動作の検証が先だとは思います。
こちらは Postfix の main.cf で smtpd_tls_security_level と、smtpd_use_tls、smtpd_enforce_tls、smtpd_tls_auth_only、smtpd_tls_wrappermode を全て削除 (コメントに) してください。
オフライン
ありがとうございます。
教えていただいたLOGIN認証メカニズムの設定でメール送信できました。
一歩ずつ進んでいる実感があり嬉しいです。
さて方向性としてはSTARTTLSに対応させたいと考えています。
まずはSMTP Authの動作確認と言うことで、次のように設定しましたが送信できない状態です。
お手数をおかけしますが、ご教示いただけたら幸いです。
よろしくお願いいたします。
=== postconf -n ===
smtpd_banner = $myhostname ESMTP unknown
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
======
=== /var/log/mail.log ===
Jan 16 17:20:15 tk2-250-34691 postfix/master[10229]: daemon started -- version 3.1.0, configuration /etc/postfix
Jan 16 17:20:15 tk2-250-34691 postfix/smtp[10233]: fatal: specify a password table via the `smtp_sasl_password_maps' configuration parameter
Jan 16 17:20:16 tk2-250-34691 postfix/master[10229]: warning: process /usr/lib/postfix/sbin/smtp pid 10233 exit status 1
Jan 16 17:20:16 tk2-250-34691 postfix/master[10229]: warning: /usr/lib/postfix/sbin/smtp: bad command startup -- throttling
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: warning: hostname newsoft1012.example.com does not resolve to address aaa.aaa.aaa.aaa: Name or service not known
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: connect from unknown[aaa.aaa.aaa.aaa]
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: smtp_stream_setup: maxtime=300 enable_deadline=0
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 127.0.0.0/8
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostaddr: smtpd_client_event_limit_exceptions: aaa.aaa.aaa.aaa ~? 127.0.0.0/8
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 160.0.0.0/24
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostaddr: smtpd_client_event_limit_exceptions: aaa.aaa.aaa.aaa ~? 160.0.0.0/24
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? bbb.bbb.bbb.bbb
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostaddr: smtpd_client_event_limit_exceptions: aaa.aaa.aaa.aaa ~? bbb.bbb.bbb.bbb
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? BBB.com
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_hostaddr: smtpd_client_event_limit_exceptions: aaa.aaa.aaa.aaa ~? BBB.com
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_list_match: unknown: no match
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_list_match: aaa.aaa.aaa.aaa: no match
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: auto_clnt_open: connected to private/anvil
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: send attr request = connect
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: send attr ident = smtp:aaa.aaa.aaa.aaa
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: private/anvil: wanted attribute: status
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute name: status
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute value: 0
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: private/anvil: wanted attribute: count
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute name: count
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute value: 1
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: private/anvil: wanted attribute: rate
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute name: rate
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute value: 1
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: private/anvil: wanted attribute: (list terminator)
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: input attribute name: (end)
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 220 CCC.com ESMTP unknown
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_create: SASL service=smtp, realm=CCC.com
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: noanonymous
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: Connecting
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: VERSION?1?1
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: MECH?PLAIN?plaintext
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: plaintext
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: MECH?LOGIN?plaintext
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: plaintext
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: MECH?DIGEST-MD5?dictionary?active?mutual-auth
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: dictionary
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: active
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: name_mask: mutual-auth
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: SPID?10237
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: CUID?1
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: COOKIE?566ed49b3b0cf5e9633eb2795ace49cd
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_connect: auth reply: DONE
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_mech_filter: keep mechanism: PLAIN
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_mech_filter: keep mechanism: LOGIN
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_mech_filter: keep mechanism: DIGEST-MD5
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: watchdog_pat: 0x5591e778ddc0
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: < unknown[aaa.aaa.aaa.aaa]: EHLO User
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_list_match: unknown: no match
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: match_list_match: aaa.aaa.aaa.aaa: no match
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-CCC.com
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-PIPELINING
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-SIZE 10240000
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-VRFY
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-ETRN
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-AUTH PLAIN LOGIN DIGEST-MD5
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-ENHANCEDSTATUSCODES
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-8BITMIME
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250-DSN
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 250 SMTPUTF8
Jan 16 17:20:56 tk2-250-34691 postfix/smtpd[10235]: watchdog_pat: 0x5591e778ddc0
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: < unknown[aaa.aaa.aaa.aaa]: AUTH LOGIN
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_server_first: sasl_method LOGIN
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_handle_reply: auth reply: CONT?1?VXNlcm5hbWU6
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 334 VXNlcm5hbWU6
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: < unknown[aaa.aaa.aaa.aaa]: c3dlZXR5
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_handle_reply: auth reply: CONT?1?UGFzc3dvcmQ6
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 334 UGFzc3dvcmQ6
Jan 16 17:20:57 tk2-250-34691 postfix/smtpd[10235]: < unknown[aaa.aaa.aaa.aaa]: c3dlZXR5MzIx
Jan 16 17:21:01 tk2-250-34691 postfix/smtpd[10235]: xsasl_dovecot_handle_reply: auth reply: FAIL?1?user=sweety
Jan 16 17:21:01 tk2-250-34691 postfix/smtpd[10235]: warning: unknown[aaa.aaa.aaa.aaa]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jan 16 17:21:01 tk2-250-34691 postfix/smtpd[10235]: > unknown[aaa.aaa.aaa.aaa]: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
Jan 16 17:21:01 tk2-250-34691 postfix/smtpd[10235]: watchdog_pat: 0x5591e778ddc0
======
オフライン
STARTTLS 対応以前に、認証に失敗していますね。
ユーザー ID とパスワードを確認し直してください。
connect from unknown[aaa.aaa.aaa.aaa] > unknown[aaa.aaa.aaa.aaa]: 220 CCC.com ESMTP unknown < unknown[aaa.aaa.aaa.aaa]: EHLO User > unknown[aaa.aaa.aaa.aaa]: 250-CCC.com > unknown[aaa.aaa.aaa.aaa]: 250-PIPELINING > unknown[aaa.aaa.aaa.aaa]: 250-SIZE 10240000 > unknown[aaa.aaa.aaa.aaa]: 250-VRFY > unknown[aaa.aaa.aaa.aaa]: 250-ETRN > unknown[aaa.aaa.aaa.aaa]: 250-AUTH PLAIN LOGIN DIGEST-MD5 > unknown[aaa.aaa.aaa.aaa]: 250-ENHANCEDSTATUSCODES > unknown[aaa.aaa.aaa.aaa]: 250-8BITMIME > unknown[aaa.aaa.aaa.aaa]: 250-DSN > unknown[aaa.aaa.aaa.aaa]: 250 SMTPUTF8 < unknown[aaa.aaa.aaa.aaa]: AUTH LOGIN > unknown[aaa.aaa.aaa.aaa]: 334 VXNlcm5hbWU6 < unknown[aaa.aaa.aaa.aaa]: c3dlZXR5 > unknown[aaa.aaa.aaa.aaa]: 334 UGFzc3dvcmQ6 < unknown[aaa.aaa.aaa.aaa]: c3dlZXR5MzIx xsasl_dovecot_handle_reply: auth reply: FAIL?1?user=sweety warning: unknown[aaa.aaa.aaa.aaa]: SASL LOGIN authentication failed: UGFzc3dvcmQ6 > unknown[aaa.aaa.aaa.aaa]: 535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6
オフライン
お恥ずかしい限りです。
正しく指定し直したところ、平文での認証に成功しました。
取り急ぎご報告まで。
オフライン
main.cfに次の設定を追加し、メール送信できました。
ありがとうございました。
ひとつ気がかりなのは、認証メカニズムにLOGINしか使えないことです。
DIGEST-MD5やCRAM-MD5を使うために確認すべき事はありませんか?
何度も申し訳ありませんが、ご教示いただけると幸いです。
よろしくお願いいたします。
=== /etc/postfix/main.cf ===
smtp_tls_security_level = may
smtp_tls_loglevel = 1
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
======
オフライン
guny による投稿:
ひとつ気がかりなのは、認証メカニズムにLOGINしか使えないことです。
DIGEST-MD5やCRAM-MD5を使うために確認すべき事はありませんか?
サーバーからの応答に以下の行があることから、認証メカニズムとして PLAIN、LOGIN、DIGEST-MD5 の三種類が使えるはずです。
> unknown[aaa.aaa.aaa.aaa]: 250-AUTH PLAIN LOGIN DIGEST-MD5
お使いのメーラーでは DIGEST-MD5 をサポートしていないため、次善案になる LOGIN で認証を行っているのでしょう。
DIGEST-MD5 をサポートしているメーラーは少なかった気がしますが、CRAM-MD5 ならそれなりにサポートしているはずです。
つまり、dovecot の方で cram-md5 を有効にしてやれば、これを使った認証がなされると思います。
p.s.
STARTTLS はどうするのかな。
最後に提示された main.cf の抜粋からは、メーラー次第で STARTTLS を使うような設定みたいですが。
オフライン
ご教示ありがとうございました。
STARTTLS の強制はmain.cfを下のような設定にするだけで良いでしょうか?
もし良ければ、debug_peer_listの設定を元に戻し、メールサーバーを稼働させたいと思います。
=== /etc/postfix/main.cf ===
smtp_tls_security_level = encrypt
======
オフライン
smtpd_tls_security_level=encrypt ですね。
なお、このサーバーが自サイトのメーラーからの送信受付専用なら問題無いですが、たとえばインターネット側の他のメールサーバーからのメールの受信が必要な場合は、この設定には問題があります。maincf では汎用的に smtpd_tls_security_level=may にしておき、master.cf で smtp ポート、submission ポート、(使うのなら smtps なお、自サイトのメーラーからの送信受付以外、たとえばインターネット側の他のメールサーバーからのメールの受信が必要な場合は、この設定には問題があります。maincf では汎用的に smtpd_tls_security_level=may にしておき、master.cf で smtp ポート、submission ポート、(使うのなら smtps ポート) のそれぞれで適切な値になるように設定してください。
オフライン
ありがとうございます。
smtpd_tls_security_levelでした。
当面は現在の設定で大丈夫です。
私だけではここまで到達できませんでした。
いろいろ教えていただき、心より感謝申し上げます。
オフライン