Quantcast
Channel: OSAKANA TAROのメモ帳
Viewing all articles
Browse latest Browse all 816

postfix/dovecotメールサーバでWindows Live Mail 2012がエラーになる

$
0
0

qmail+vpopmailという古代の環境から、postfix/dovecotのメールサーバに移行した。
移行の詳細については別途記事にしますが、移行後、Windows Live Mail 2012ユーザからクレームが・・・

POP3で受信ができないという
原因は、Windows Live Mail 2012のPOP3アクセス機能が古い、という点に尽きる。
対処するにはサーバ側でセキュリティを弱める設定を入れる必要があった。

その1:POP3受信時にエラー

/var/log/dovecot/pop3.log

Feb 19 10:35:59 oflex-1096-1 dovecot: pop3-login: Disconnected (tried to use disallowed plaintext auth): user=<osakana@example.net>, rip=xxx.xxx.xxx.xxx, lip=xxx.xx.x.xxx, session=<brxUt4ZlTfPbavEx>

→ dovecotの「ssl = required」と「disable_plaintext_auth = yes」の設定により発生
これを「ssl = yes」と「disable_plaintext_auth = no」に変更することで対処できる

設定箇所は下記の3ファイル
/etc/dovecot/dovecot.conf ではsslとdisable_plaintext_authの双方が設定されている可能性がある
/etc/dovecot/conf.d/10-auth.conf ではdisable_plaintext_authが設定されている可能性がある
/etc/dovecot/conf.d/10-ssl.conf ではsslが設定されている可能性がある
3ファイルをそれぞれ確認して修正すること

うちの環境ではssl=requriedがdovecot.confと10-ssl.confの双方で設定されていたが、
10-ssl.confしか認識しておらずいくら設定しても反映されないと悩んだ。

その2:SMTP送信時にエラー1

/var/log/maillog

Feb 19 10:41:49 mailserver.osakana.net postfix/smtpd[8343]: NOQUEUE: reject: RCPT from clienthostname.osakana.net[xxx.xxx.xxx.xxx]: 504 5.5.2 <clienthostname>: Helo command rejected: need fully-qualified hostname; from=<osakana@osakana.net> to=<osakana@example.com> proto=ESMTP helo=<clienthostname>

→postfixの「smtpd_helo_restrictions」で「reject_non_fqdn_helo_hostname」が設定されているため発生

現在値確認

# postconf smtpd_helo_restrictions
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated check_helo_access pcre:/etc/postfix/helo_access.pcre reject_non_fqdn_helo_hostname reject_unknown_helo_hostname
#

変更前の /etc/postfix/main.cf の該当部分

# HELO restriction
smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    check_helo_access pcre:/etc/postfix/helo_access.pcre
    reject_non_fqdn_helo_hostname
    reject_unknown_helo_hostname

変更後の /etc/postfix/main.cf の該当部分

# HELO restriction
smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    check_helo_access pcre:/etc/postfix/helo_access.pcre
    reject_unknown_helo_hostname
#    reject_non_fqdn_helo_hostname
# postconf smtpd_helo_restrictions
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated check_helo_access pcre:/etc/postfix/helo_access.pcre reject_unknown_helo_hostname
#

その3:SMTP送信時にエラー2

Feb 19 11:04:48 mailserver.osakana.net postfix/smtpd[11966]: NOQUEUE: reject: RCPT from clienthostname.osakana.net[xxx.xxx.xxx.xxx]: 450 4.7.1 <clienthostname>: Helo command rejected: Host not found; from=<osakana@osakana.net> to=<osakana@example.com> proto=ESMTP helo=<clienthostname>

→postfixの「smtpd_helo_restrictions」で「reject_unknown_helo_hostname」が設定されているため発生

変更前はエラー1と同じなので省略

変更後の /etc/postfix/main.cf の該当部分

# HELO restriction
smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    check_helo_access pcre:/etc/postfix/helo_access.pcre
#    reject_non_fqdn_helo_hostname
#    reject_unknown_helo_hostname

その4:SMTP送信時にエラー3
/var/log/maillog

Feb 19 11:07:08 mailserver.osakana.net postfix/smtpd[12710]: NOQUEUE: reject: RCPT from clienthostname.osakana.net[xxx.xxx.xxx.xxx]: 454 4.7.1 <osakana@example.com>: Relay access denied; from=<osakana@osakana.net> to=<osakana@example.com> proto=ESMTP helo=<DTCF801>

これはテスト用にセットアップしたアカウントがSMTPポート25を使っていたせいで失敗していた。
ポート587に変更したら成功


Viewing all articles
Browse latest Browse all 816

Trending Articles