اسم المضيف لا يطابق شهادة الخادم (Let's Encrypt)

مرحبًا، لدي مشكلة في استلام بريد التفعيل بعد تثبيت Discourse.

عمليتي:

لا أملك خادم بريد حاليًا، لذا أردت تشغيل خادم البريد وDiscourse على نفس الجهاز. قررت استخدام docker-mailserver. لقد طلبت VPS من مزود ألماني وأستخدم نطاق Namecheap لم أعد أستخدمه.

بما أنني لا أريد أن يكون هذا النطاق عامًا، فقد استبدلته بـ “domain.com” أدناه. آمل أن يكون ذلك مقبولًا.

  1. خادم البريد: قمت بتثبيت خادم البريد، وأنشأت بعض عناوين البريد باستخدام setup.sh، وقمت بتوليد مفتاح DKIM وأنشأت سجل TXT له لدى موفر DNS الخاص بي. جربت العناوين باستخدام 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.