Windows Liveメール2012で使えるメールサーバ設定

Windows Live メール2012で使える暗号化形式についてのまとめ

 Windows Liveメール2012Outlook 2019
POP3ポート110、暗号化なし
POP3ポート110、暗号化あり(STARTTLS)××
POP3ポート995、暗号化あり(SSL/TLS)
IMAPポート143、暗号化無し
IMAPポート143、暗号化あり(STARTTLS)×
IMAPポート993、暗号化あり(SSL/TLS)
   
SMTPポート25、暗号化なし△(非推奨)△(非推奨)
SMTPポート587、暗号化なし
SMTPポート587、暗号化STARTTLS×
SMTPポート465、暗号化SSL/TLS

SMTPのポート25は、アクセス回線(プロバイダ)側で接続規制が行われている可能性が高いので通常は使わない(使えないことが多い)
SMTPは、SMTP認証(SMTP AUTH)を有効にすること

「SMTPポート465、暗号化SSL/TLS」はSMTPS(SMTP over SSL)と表現される。最近は「SMTPポート587、暗号化STARTTLS」が主流で、ポート465を使うのは古いOutlookやWindows Liveメールぐらい。ポート465を提供しているメールサーバも徐々に減っているので、新規環境では使用しないことを推奨(ポート587に対応していないWindows Liveメールは捨てろ)

Outlook2019の注意点:暗号化を有効にした場合、サーバ側のSSL証明書の有効期限が切れると接続できなくなる。また、サーバ側のSSL証明書にサーバ名指定で使ったホスト名が登録されていないと接続できない。無視してアクセスするようなオプションがない

WindowsLiveメール/Outlookの注意点: メール送信時、送信者名の欄が空欄だと送信エラーになる。

エラー番号:0x800CCC78 で拒否される場合、サーバ名/ポート番号の指定とかに問題がある。

ありがちなのが、SMTP/IMAPの暗号化あり、設定が「SMTP/IMAPのSSL接続も可能なやつ(STARTTLS)」なのか「SMTPS/IMAPSによるSSL接続」のどちらなのか、という問題。前述のとおりWindows LiveメールやOutlook 2013などはSMTPS/IMAPSなので「SMTPS ポート465」で「IMAPS ポート993」を指定する必要がある。

Windows Live メール 2012で「メッセージを表示できませんでした」となる

注: 必要な作業は「レジストリを設定してOS再起動」です。Liveメールの設定を確認する必要はありません。設定確認はきちんとした原因調査したい場合に行う操作です。

2020/12/23追記

2020年5月リリースのWindows 10 20H2適用後、「0x800c013e 不明なエラー」というエラーで使えなくなる、という件が発生しているようで来訪が多い。

うちのテスト用Windows10はこの記事を書いた10月時点ですでにWindows 10 20H2になっており「0x800c013e 不明なエラー」が発生していました。

そこで、このページのレジストリ設定を行ったところ、Windows Liveメール2012を使ったメール送受信は可能となりました。2020/12/23時点でもIMAP/POP3メール受信,SMTPメール送信ともに出来ています。

また、エラーがでたのでメールアカウントの再設定などを試そうとしている場合の注意点があります。

Windows Liveメールはサポートが切れて数年経ちますので、各メールサーバの設定案内で記述が削除されており、他のメールソフトの設定ページにある設定を利用しているのではないかと思います。

しかし、Windows Liveメールで使えるメールサーバ設定は10年以上前のメールサーバ用の設定であり、2020年のメールサーバが備えてる設定ではアクセスができないものがあります。

詳細については「Windows Liveメール2012で使えるメールサーバ設定」を見てください。

追記終了


メールサーバを管理しているといろんなユーザがいるわけです。

とっくにサポートが切れたWindows Live メール 2012をWindows10上で使っている人、とかね。

そんな人からの問い合わせに対応するために検証用Windows10にWindows Live メールをセットアップしてみたら、メールが表示されない。

「メッセージを表示出来ませんでした」ってなんだ?

いろいろ調査してみると、[オプション]-[メール]-[詳細設定]の「メンテナンス」でどんな状態にあるか確認できるらしい(注:これは調査のための操作なので、特にやる必要はありません)

これの「トラブルシューティング」の「全般」と「メール」にチェックを入れて、「保存先フォルダー」に書かれたディレクトリにあるWindowsLiveMail.log にログが出力されるようになる。

受信トレイのメールをクリックしてみると下記の様な「Zone_MailChk ERROR: (storutil.cpp:3965), failed with 0x800C013E」などのエラーが出力される。

[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (msgfldr.cpp:2741), failed with 0x800C013E  
[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (msgfldr.cpp:905), failed with 0x800C013E  
[15:11:00.34] 4138                 Mail:            Zone_MailChk ERROR: (storutil.cpp:3965), failed with 0x800C013E  

この情報を元に検索したところ、2020/08/26付けの「Windows Live Mail」というマイクロソフトコミュニティの書き込みを発見。

レジストリエディッタで「HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows Live Mail」直下にDWORD(32bit)で3つのキーを値「1」で新規作成して、Windowsを再起動してWindows Liveメールを開き直すとメッセージが読めるようになる、と。

作成するDWORDキー
  RecreateFolderIndex
  RecreateStreamIndex
  RecreateUIDLIndex

(該当する3つのキーの値は1回Windows Liveメールを起動することで「0」に戻ります)

この手順を実施したところ、ちゃんとメッセージが読めるようになりました。

Outlook2019で iredmail(postfix/dovecot)環境を登録しようとするとエラーになる

Becky!やThunderbird、Windows Live 2012では問題なく動いていたのだが、Outlook 2019(およびOffice 365のOutlook)に対してメールを新規登録した場合、うまく動かない、というクレームがあったので調査

姉妹記事:「Windows Liveメール2012で使えるメールサーバ設定」Outlookについての言及もあり

要点

その1: SSL対応するならちゃんとすること

自己署名SSLや、メールサーバとして指定したホスト名がSSL証明書に含まれていないとエラーになる。

Let’s Encryptでやっても良いが、POP3/IMAP/SMTPサーバ名でSSL証明書が発行されていること。

その2: Outlook側の「ユーザー情報」の「名前」が空欄は不許可

ここが空欄になっていると、メール送信がエラー(エラーコード 0x800c8101) になる。

成功例:IMAP設定の場合

上記では送信サーバ(SMTP)のポートが「587」となっているが、プロバイダ側で許可されている場合はポート25でも良い。

成功例:POP3の場合

上記では送信サーバ(SMTP)のポートが「587」となっているが、プロバイダ側で許可されている場合はポート25でも良い。


エラーログ集

SMTPサーバ指定を暗号化なしに設定した場合

使用する暗号化接続の種類を「なし」に設定した場合、エラーになった

Outlook側エラー「テスト電子メール メッセージの送信: このクライアントでサポートされている認証方法が、サーバーでサポートされていません。」

サーバ側のmaillog出力

Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: connect from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: lost connection after EHLO from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:41:28 mailserver postfix/submission/smtpd[16308]: disconnect from test.example.com[xxx.xxx.xxx.xxx]

SMTPサーバ指定をSSL/TLSに設定した場合

送信サーバの使用する暗号化接続の種類を「SSL/TLS」に設定した場合もエラーになった。

Outlook側のエラーメッセージ

テスト電子メール メッセージの送信: このサーバーは、指定した種類の接続暗号化をサポートしていません。暗号化方式を変更してください。詳細については、メール サーバーの管理者かインターネット サービス プロバイダー (ISP) に問い合わせてください。

メールサーバ側maillogのエラーメッセージ

Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: connect from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: lost connection after UNKNOWN from test.example.com[xxx.xxx.xxx.xxx]
Oct 13 10:46:34 mailserver postfix/submission/smtpd[18081]: disconnect from test.example.com[xxx.xxx.xxx.xxx]

存在しないポートを指定した場合

誤って不適切なポートを指定した場合、下記の様なエラーとなります。

テスト電子メール メッセージの送信: 送信 (SMTP) メール サーバーに接続できません。このメッセージを引き続き受信する場合は、サーバー管理者かインターネット サービス プロバイダー (ISP) に問い合わせてください。

ONTAP 9.5でsambaドメインに参加できない & ONTAP 9.7で失敗

samba 4.11.6で作ったActive DirectoryにONTAP 9.5を参加させようとするとエラーになる。

ONTAP API が失敗しました: Failed to create the Active Directory machine account "ファイルサーバ名". Reason: LDAP Error: Strong authentication is required Details: Error: Machine account creation procedure failed [ 136] Loaded the preliminary configuration. [ 215] Successfully connected to ip ADサーバIP, port 88 using TCP [ 284] Successfully connected to ip ADサーバIP, port 389 using TCP [ 308] Unable to connect to LDAP (Active Directory) service on ADサーバホスト名 (Error: Strong(er) authentication required) **[ 308] FAILURE: Unable to make a connection (LDAP (Active ** Directory):AD名), result: 7609 . (エラー:13001)

調べたところ、sambaのglobal設定で「ldap server require strong auth = no」を設定する、とのこと。

これを設定し、sambaを再起動したところ、参加できた。


ONTAP 9.7にて、上記手順を実施した上で参加を試みたところ「Unable to connect to NetLogon service on」というエラーになった。

netapp::> vserver cifs create -vserver ファイルサーバ名 -cifs-server ファイルサーバ名 -domain AD名 -ou CN=Computers -default-site "" -status-admin up -comment "" -netbios-aliases ファイルサーバ名

In order to create an Active Directory machine account for the CIFS server, you
must supply the name and password of a Windows account with sufficient
privileges to add computers to the "CN=Computers" container within the
"AD名" domain.

Enter the user name: administrator

Enter the password:

Warning: An account by this name already exists in Active Directory at
         CN=ファイルサーバ名,CN=Computers,DC=xx,DC=xx.
         If there is an existing DNS entry for the name ファイルサーバ名, it must be
         removed. Data ONTAP cannot remove such an entry.
         Use an external tool to remove it after this command completes.
         Ok to reuse this account? {y|n}: y

Error: Machine account creation procedure failed
  [    31] Loaded the preliminary configuration.
  [   107] Created a machine account in the domain
  [   108] SID to name translations of Domain Users and Admins
           completed successfully
  [   113] Modified account 'cn=ファイルサーバ名,CN=Computers,dc=xx
           =CO,dc=JP'
  [   114] Successfully connected to ip xx.xx.xx.xx, port 88 using
           TCP
  [   129] Successfully connected to ip xx.xx.xx.xx, port 464
           using TCP
  [   216] Kerberos password set for 'ファイルサーバ名$@AD名'
           succeeded
  [   216] Set initial account password
  [   223] Successfully connected to ip xx.xx.xx.xx, port 445
           using TCP
  [   274] Successfully connected to ip xx.xx.xx.xx, port 88 using
           TCP
  [   297] Successfully authenticated with DC
           adserver.AD名
  [   322] Unable to connect to NetLogon service on
           adserver.AD名 (Error:
           RESULT_ERROR_GENERAL_FAILURE)
**[   322] FAILURE: Unable to make a connection
**         (NetLogon:AD名), result: 3
  [   322] Unable to make a NetLogon connection to
           adserver.AD名 using the new machine account

Error: command failed: Failed to create the Active Directory machine account
       "ファイルサーバ名". Reason: general failure.

netapp::>

このとき「vserver cifs security show -vserver ファイルサーバ名」で確認する「SMB? Enabled for DC Connections」は下記の通り。

netapp::> vserver cifs security show -vserver ファイルサーバ名

Vserver: ファイルサーバ名

                            Kerberos Clock Skew:                   - minutes
                            Kerberos Ticket Age:                   - hours
                           Kerberos Renewal Age:                   - days
                           Kerberos KDC Timeout:                   - seconds
                            Is Signing Required:                   -
                Is Password Complexity Required:                   -
           Use start_tls for AD LDAP connection:               false
                      Is AES Encryption Enabled:               false
                         LM Compatibility Level:  lm-ntlm-ntlmv2-krb
                     Is SMB Encryption Required:                   -
                        Client Session Security:                none
                SMB1 Enabled for DC Connections:               false
                SMB2 Enabled for DC Connections:      system-default
  LDAP Referral Enabled For AD LDAP connections:               false
               Use LDAPS for AD LDAP connection:               false

netapp::>

「SMB1 Enabled for DC Connections」をtrueに変更しても状況は変わらず。

Sambaサーバの /usr/local/samba/var/log.samba を確認すると、以下の出力があった。

[2020/08/07 14:26:55.226653,  0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:284(dcesrv_netr_ServerAuthenticate3_helper)
  dcesrv_netr_ServerAuthenticate3_helper: schannel required but client failed to offer it. Client was ファイルサーバ名$

「schannel」というオプションが必要らしい。

Netlogon Issue “schannel required”」を参考に設定してみたところ、schannelというオプションはないというエラー…「Bug 13464 – smb.conf-configuration “server schannel = auto” needed in future versions」を見ると「server schannel = auto」が正しい模様。

/usr/local/samba/etc/smb.conf を下記の様に修正して、sambaを再起動したところ、ONTAP 9.7でのActive Directoryの参加が可能になった。

# Global parameters
[global]
        netbios name = ADサーバ名
        realm = AD名
        server role = active directory domain controller
        workgroup = AD名
        idmap_ldb:use rfc2307 = yes
        ldap server require strong auth = no
        server schannel = auto

[netlogon]
        path = /usr/local/samba/var/locks/sysvol/AD名/scripts
        read only = No

[sysvol]
        path = /usr/local/samba/var/locks/sysvol
        read only = No

samba 4で構築したドメインにNetApp 9.5が登録できない

注:この記事での事象はsamba 4で使用していた証明書の期限切れが原因でした。
「LDAP Error: Strong authentication is required Details」もしくは「「Unable to connect to NetLogon service on」」というエラーがでる場合については別途「ONTAP 9.5でsambaドメインに参加できない & ONTAP 9.7で失敗」という記事にしています。


テスト環境作成のためNetAppシミュレータの9.5P6を作ってsamba 4で構築したActive Directory環境に登録しようとした・・・

netapp95sim::*> vserver cifs create -cifs-server netappcifs -domain ad.osakana.net -ou CN=Computers -vserver netappcifs -netbios-aliases netappcifs

In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of a
Windows account with sufficient privileges to add computers to the "CN=Computers" container within the "AD.OSAKANA.NET"
domain.

Enter the user name: administrator

Enter the password:

Error: Machine account creation procedure failed
  [   215] Loaded the preliminary configuration.
  [   267] Successfully connected to ip 172.17.44.49, port 88 using
           TCP
  [   342] Successfully connected to ip 172.17.44.49, port 636 using
           TCP
  [   379] Required certificate with CA ADSERVER.ad.osakana.net is
           not installed
  [   381] Unable to start LDAPS: Can't contact LDAP server
  [   381] Additional info: error:14090086:SSL
           routines:ssl3_get_server_certificate:certificate verify
           failed
  [   381] Unable to connect to LDAP (Active Directory) service on
           adserver.ad.osakana.net (Error: Can't contact LDAP
           server)
**[   381] FAILURE: Unable to make a connection (LDAP (Active
**         Directory):AD.OSAKANA.NET), result: 7642

Error: command failed: Failed to create the Active Directory machine account "netappcifs". Reason: LDAP Error: Cannot
       contact the LDAP server.

netapp95sim::*>

エラー発生。

なんか調べたところ、active-directoryというコマンドでも登録できるらしいのでそれでもテストしてみる。

netapp95sim::*> active-directory create -vserver netappcifs -account-name adserver -domain ad.osakana.net
  (vserver active-directory create)

In order to create an Active Directory machine account, you must supply the name and password of a Windows account with
sufficient privileges to add computers to the "CN=Computers" container within the "AD.OSAKANA.NET" domain.

Enter the user name: administrator

Enter the password:

Error: Machine account creation procedure failed
  [   179] Loaded the preliminary configuration.
  [   230] Successfully connected to ip 172.17.44.49, port 88 using
           TCP
  [   298] Successfully connected to ip 172.17.44.49, port 636 using
           TCP
  [   333] Required certificate with CA ADSERVER.ad.osakana.net is
           not installed
  [   335] Unable to start LDAPS: Can't contact LDAP server
  [   335] Additional info: error:14090086:SSL
           routines:ssl3_get_server_certificate:certificate verify
           failed
  [   336] Unable to connect to LDAP (Active Directory) service on
           adserver.ad.osakana.net (Error: Can't contact LDAP
           server)
**[   336] FAILURE: Unable to make a connection (LDAP (Active
**         Directory):AD.OSAKANA.NET), result: 7642

Error: command failed: Failed to create the Active Directory machine account "ADSERVER". Reason: LDAP Error: Cannot
       contact the LDAP server.

netapp95sim::*>

同じようにエラー。

この後いろいろ試行錯誤した結果、自己証明CAをNetAppに入れればいいのでは?とやってみた。(「クラスタまたはSVMがクライアントであるSSLサーバを認証するためのサーバCA証明書のインストール」)

netapp95sim::*> security certificate install -vserver netappcifs -type server-ca

Please enter Certificate: Press <Enter> when done
-----BEGIN CERTIFICATE-----
<sambaの/usr/local/samba/private/tls/ca.pemの内容を張り付け>
-----END CERTIFICATE-----


Error: command failed: The certificate has expired.

netapp95sim::*>

ん?「The certificate has expired.」???

samba公式「Configuring LDAP over SSL (LDAPS) on a Samba AD DC」の「Verifying the certificate」に書いてある手法で確認してみます。

# ls -l  /usr/local/samba/private/tls
合計 12
-rw-r--r--. 1 root root 2041  3月 27  2018 ca.pem
-rw-r--r--. 1 root root 2045  3月 27  2018 cert.pem
-rw-------. 1 root root 3243  3月 27  2018 key.pem
#

# openssl verify /usr/local/samba/private/tls/cert.pem -CApath /usr/local/samba/private/tls/ca.pem
/usr/local/samba/private/tls/cert.pem: O = Samba Administration, OU = Samba - temporary autogenerated HOST certificate, CN = ADSERVER.AD.OSAKANA.NET
error 20 at 0 depth lookup:unable to get local issuer certificate
Error opening certificate file -CApath
140285523859344:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('-CApath','r')
140285523859344:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:404:
unable to load certificate
/usr/local/samba/private/tls/ca.pem: O = Samba Administration, OU = Samba - temporary autogenerated CA certificate, CN = ADSERVER.AD.OSAKANA.NET
error 18 at 0 depth lookup:self signed certificate
O = Samba Administration, OU = Samba - temporary autogenerated CA certificate, CN = ADSERVER.AD.OSAKANA.NET
error 10 at 0 depth lookup:certificate has expired
OK
#

はい。証明書の有効期限切れでした。

手順がめんどいので、/usr/local/samba/private/tlsにあるファイルをリネームしてから「systemctl stop samba-ad-dc.service」「systemctl start samba-ad-dc.service」で強制再作成させました。