ホスト名がサーバー証明書(Let's Encrypt)と一致しません

こんにちは、Discourse のインストール後にアクティベーションメールが届かない問題についてお尋ねします。

私の手順:

現在メールサーバーを持っていないため、同じマシン上でメールサーバーと Discourse を実行したいと考えています。docker-mailserver を使用することにしました。ドイツのベンダーから VPS を注文し、以前使用していた Namecheap のドメインを使用しています。
このドメインを公開したくないため、以下では「domain.com」に置き換えています。問題ないことを願っています。

  1. メールサーバー: メールサーバーをインストールし、setup.sh でいくつかのメールアドレスを作成し、DKIM を生成して DNS プロバイダーで対応する TXT レコードを作成しました。Thunderbird でアドレスをテストしたところ、問題なくメールの送受信ができました。Telnet でも 220 が返ってくるため、すべて正常なようです。
    DNS レコードのスクリーンショット:


    SSL-Tools の結果:
    Imgur: The magic of the Internet

  2. Discourse: Discourse を 初心者向け Docker インストールガイド に従ってインストールしました。
    discourse-setup を実行し、以下のデータを入力しました:

    Hostname      : domain.com
    Email         : dun@domain.com
    SMTP address  : domain.com
    SMTP port     : 587
    SMTP username : discourse@domain.com
    SMTP password : ABCDEFG123
    LETSENCRYPT_ACCOUNT_EMAIL: tls@domain.com
    

その後、dun@domain.com にアクティベーションリンクを送信しましたが、届きませんでした。

dun@server:~$ tail /var/discourse/shared/standalone/log/rails/production.log 

Sent mail to dun@domain.com (69.5ms)
Job exception: hostname "domain.com" does not match the server certificate

Sent mail to dun@domain.com (61.3ms)
Job exception: hostname "domain.com" does not match the server certificate

Sent mail to dun@domain.com (22.8ms)
Job exception: hostname "domain.com" does not match the server certificate

このエラーの意味を完全に理解できていません。これは初めて TLS を設定しているためです。おそらく、メールサーバーで異なる証明書を使用していることが原因ではないでしょうか。両方のコンテナで同じ証明書を使用するにはどうすればよいでしょうか。

This is an issue with the mail server certificate. You can probably get one with Let’s Encrypt, but it’s not a problem with Discourse, so ask for help from the docker-mailserver people. If you want people to receive your mail and not to spend a long long time getting your mail server trusted, you’ll be better off using a mail service like Mailgun.

「いいね!」 1

Thanks for your reply.
I guess I understand it a little bit better now. With my configuration Discourse already created the LE certificate while installing. The next step to get this running would be using that certificate on my mailserver which seems to be kinda tricky. At least I didn’t found anyone mentioning a process like this. I searched for pem files in the Docker VM and found them in /etc/ssl/certs and in ruby-folders under /usr/local/lib and /var/www/discourse/vendor. But I don’t really know if I could just copy them to the virtual machine that’s running the mailserver.

So the conclusion is, that it’s not possible to make this setup run without having more knowledge about TLS.