misskey-dev / misskey

🌎 An interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.81k stars 1.32k forks source link

Misskey SMTP Error: self-signed certificate #14297

Closed PincessWoona closed 1 month ago

PincessWoona commented 1 month ago

💡 Summary

The problem is the following: I have Mailcow installed on my server in docker. I am trying to send an email with miskey via smtp and I get an error: Endpoint: admin/send-email Info: {"e":{"message":"self-signed certificate","code":"Error","id":"67b2a20f-9830-42c5-a98e-eed29a99a2bc"}} Date: 2024-07-24T09:41:15.207Z

🥰 Expected Behavior

Mail should send

🤬 Actual Behavior

Mail dont send

📝 Steps to Reproduce

  1. Just install Misskey
  2. Just install Mailcow
  3. Try to send mail message from Misskey

💻 Frontend Environment

* Model and OS of the device(s): Fedora 40
* Browser: Yandex Browser
* Server URL: ponysocial.ru
* Misskey: 2024.5.0

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service: systemd
* Misskey: 2024.5.0
* Node: 20.12.2
* PostgreSQL: 16.3
* Redis: 7.2.5
* OS and Architecture: Fedora 40 x64

             .',;::::;,'.                woona@ponysocial.ru 
         .';:cccccccccccc:;,.            ------------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 40 (Server Edition) x86_64 
    .:cccccccccccccccccccccccccc:.       Kernel: 6.9.9-200.fc40.x86_64 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Uptime: 23 hours, 21 mins 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Packages: 1409 (rpm), 5 (snap) 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Shell: bash 5.2.26 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Resolution: 1024x768 
:cccccccccccccc;MMM.;cccccccccccccccc:   Terminal: cockpit-bridge 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   CPU: AMD Ryzen 7 3800XT (16) @ 3.900GHz 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   GPU: AMD ATI Radeon HD 5550/5570/5630/6510/6610/7570 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   Memory: 6123MiB / 31997MiB 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;                             
cccccc;dNMWXXXWM0::cccccccccccccc:,                              
cccccccc;.:odl:.;cccccccccccccc:,.
:cccccccccccccccccccccccccccc:'.
.:cccccccccccccccccccccc:;,..
  '::cccccccccccccc::;,.

Do you want to address this bug yourself?

GrapeApple0 commented 1 month ago

Is an email can be sent via some email client?

PincessWoona commented 1 month ago

Is an email can be sent via some email client?

yeap

Mar0xy commented 1 month ago

Does the Server have a proper SSL Certificate? be it Let's Encrypt or something else as "self-signed certificate" normally would indicate that the SMTP server does not have an actual valid SSL certificate.

PincessWoona commented 1 month ago

Fixed: If you are using MailCow, then you must manually reissue the certificates:

cd /opt/mailcow-dockerized
touch data/assets/ssl/force_renew
docker compose restart acme-mailcow
# Now check the logs for a renewal
docker compose logs --tail=200 -f acme-mailcow