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」で強制再作成させました。

iredmail運用メモ 2021/09/09版

2019/12/06版:新規作成
2021/09/09版:更新


2021/09/09版前書き

2019年7月ぐらいから postfix+dovecot+iredmail環境の運用を開始し、2年が経過しました。

追加1:salesforce.comからのメールに対するgreylist適用取りやめ

salesforce.comからのメールは「23sadf984tasd.49fv2fdsdf.k54hsd74.ap23.bnc.salesforce.com」というような差し出しアドレスで送信されており、このアドレスはユーザごとに違うらしいようで、自動処理がうまくできませんでした。

調べて見るとiredmailフォーラム「How do I whitelist this sender?」にて、「python2 greylisting_admin.py –disable –from @.salesforce.com を実行してgreylist対象外にしろ」という回答が・・・

[root@mailserver ~]# /opt/iredapd/tools/greylisting_admin.py --disable --from @.salesforce.com
* Disable greylisting: @.salesforce.com -> @.
[root@mailserver ~]#

これで、salesforce.comからのメールは全て届くようになりました。

追加2:特定IPアドレスから送信されるメールの取り扱い

ユーザが開設しているウェブにあるフォームから送られてくるメールの送信者設定がうまく調整できないらしく、不適切なもので送信されてくる。

仕方が無いので、そのウェブサーバのIPアドレスから送られてくるメールへのgreylist適用をやめた

[root@mailserver ~]# /opt/iredapd/tools/greylisting_admin.py --disable --from  1xx.2xxx.1xx.1xxx
* Disable greylisting: 1xx.2xxx.1xx.1xxx -> @.
[root@mailserver ~]#


2019/12/06版前書き

qmail+vpopmailの環境からpostfix+dovecot+iredmail環境にテスト移行してもうすぐ1年、本稼働させて5ヶ月経ちました。

いろいろ行った対処についてのまとめです。

その1: Windows Live Mail 2012ユーザがいる場合の問題

iredmailの標準設定ではWindows Live Mail 2012でのPOP3アクセスによるメール受信に失敗します。原因はWindows Live Mail 2012はSSL無し+メールパスワードを平文で送ってしまうが、iredmail側では平文拒否+SSLのみ受付、という設定であるため拒否されているためです。

また、メール送信時も、Windows Live Mail 2012がメールサーバに送るホスト名情報(HELOコマンド)がiredmailが期待する書式になっていないために拒否されます。

この2点を解消するためにdovecotの設定と、postfixの設定を変更する必要があります。詳細は下記を参照のこと。

詳細:[postfix/dovecotメールサーバでWindows Live Mail 2012がエラーになる]

その2: WebメールのRoundcubeをアップデートする場合の問題

iredmailではWebメールとしてRoundcubeSOGoを利用できます。

SOGoはRPM提供なのでアップデートは簡単ですが、Roundcubeはphpコマンドを利用してのアップデートとなっています。

しかし、iredmail標準設定ではセキュリティ強化のphp設定がされているため、Roundcubeのアップデートスクリプトが必要とするphpの機能が使用できない状態となっています。

phpの設定を変更せずにroundcubeのアップデートスクリプトを実行するには下記を参照してください。

詳細:[php.iniを変更せずにdisable_functionsの内容を無効化してroundcubeのアップグレードスクリプトを動作させる方法]

その3: 自サーバ以外で送信されたメールが受信拒否になる問題

iredmail標準設定では、iredmailサーバ以外から送信された自ドメインメールを受信拒否します。

これは、iredapdの機能で拒否しています。

iredapdの設定にSPFレコードに登録されているサーバからの送信であれば許可する、という設定があるのでそれを有効にして回避します。

詳細:[postfixを使用したiredmailで他サーバで送信された自ドメインメールが受信拒否される]

その4: Barracudacentralがメールを拒否しすぎる問題

本格運用しはじめてからログを確認してみると、BarracudacentralのSPAMデータベースを参照にしたメール受信拒否率がとても高いことが判明。

ちょっとでも疑われたら登録されているレベルのようなので誤爆率がかなり高い。特に中小企業からのメールと(ちゃんとした)メルマガ系での拒否率が高すぎた。

このため、うちのサイトの運用ではbarracudacentralの使用はやめて、spamhaus.orgのみの運用にしている。

[iRedMailの初期設定から変えたところ 2018/08/21版]

その5: mail.goo.ne.jpメールが拒否される問題

iredmailが用意している/etc/postfix/helo_access.pcreを見てみると、なんとmail.goo.ne.jpメールが明示的に拒否されていた。

いったい過去に何をやらかしたのか・・・と驚愕しつつも受信できるように設定変更している。

[iRedMailの初期設定から変えたところ 2018/08/21版]

その6: ホスト名にIPアドレスっぽい文字列が入っていると拒否される問題

SPAMを送信してくるIPアドレスについてホスト名を調べて見るとIPアドレスっぽいホスト名( network-192-168.0.100.ぷろばいだ.ne.jp )であることが多い。

このため、iredmail標準設定ではこういったホスト名からのメールは拒否しているが、拒否ログを確認してみると、Amazon AWSサービスを使っているところからのメールが結構そんな感じのホスト名で送られていて、拒否率も高かった。

このため、IPアドレスっぽいホスト名からのメールは拒否、という設定を外した。

[iRedMailの初期設定から変えたところ 2018/08/21版]

その7: メールがすぐに届かず30分程度遅延する問題

SPAMメールの送信システムは再送処理は行わず、送信できなかったらすぐに次を送るような実装になっていることが多い。

このため、iredmailでは1回目の送信処理では、今忙しいからあとでもう1回送って、と返して、15分後から受信するようになっている。

しかし、分かっているドメインからのメールだったらすぐに受信できるようにしたい、という場合はwhitelistdomainを設定することで、該当するドメインでDNSのSPFレコードに登録されているメールサーバからのメールであればすぐに受信する、という設定を行っている。

[iRedMailの初期設定から変えたところ 2018/08/21版]

その6: vpopmailからユーザパスワードを移行した場合の問題点

これは該当する人があまりいないと思いますが、vpopmailで使っていたパスワード文字列(MD5エンコード)をそのままiredmailに持ってくると、dovecotとpostfixでは使えます。

しかし、SOGoとiredmailの管理画面ではSHA256エンコードであると想定した処理となっているため使えず、ログインできません。

これはどうしようもないので、パスワードを再設定してください。

[ユーザバックエンドがSQLのiredmailのSOGoでユーザがログインできない]