Problème certificat sur serveur SMTP

Bonjour , je ne peux pas envoyer de message via Thunderbird (problème de certificat)

Mon serveur YunoHost

Matériel: VPS en ligne
Version de YunoHost: 11
J’ai accès à mon serveur : En SSH
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Domaine: ouestyan.fr avec certificat Let’s Encrypt

Description du problème

Le paramétrage IMAP port 993 et SMTP port 587 est effectué sans message d’erreur sur Linux Thunderbird version 102.
Lors de l’envoi d’un message j’ai un message d’erreur thunderbird

the certificate is not secure because it is impossible to verify 
that it was issued by a trusted authority...

J’ai localisé le problème en me connectant en SSH sur le VPS , en exécutant une commande pour vérifier la validité du certificat sur le serveur SMTP:

openssl s_client -starttls smtp -showcerts -connect ouestyan.fr:587 -servername ouestyan.fr

Le serveur SMTP n’a pas le certificat Let’s encrypt mais le certificat auto signé

CONNECTED(00000003)
depth=1 CN = yunohost.org, O = yunohost
verify error:num=19:self signed certificate in certificate chain
verify return:1
depth=1 CN = yunohost.org, O = yunohost
verify return:1
depth=0 CN = ouestyan.fr
verify return:1
---
Certificate chain
 0 s:CN = ouestyan.fr
   i:CN = yunohost.org, O = yunohost

Pour information j’ai une autre instance Yunohost sur le domaine xoyaz.xyz avec aucun problème

openssl s_client -starttls smtp -showcerts -connect xoyaz.xyz:587 -servername xoyaz.xyz

c’est bien le certificat Let’s Encrypt

CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = xoyaz.xyz
verify return:1
---
Certificate chain
 0 s:CN = xoyaz.xyz
   i:C = US, O = Let's Encrypt, CN = R3

NB: nous préférons que vous partagiez les logs complets en cliquant sur les boutons verts “Partager les logs avec YunoPaste”.
Vous pouvez aussi les copier dans paste.yunohost.org ou inclure directement ces messages en utilisant les “backticks” (accent grave) comme ceci :

Merci pour vos propositions

Salutations

Is that one already in Yunohost 11 too ?

I’m wondering if that could be related to the new SNI-based cert configuration we now have in postfix since 11.0

Can you check that the domain is properly listed in the file /etc/postfix/sni ? Maybe running postmap -F hash:/etc/postfix/sni could be a fix but I highly doubt tho

The setting of /etc/postfix/sni seems to me correct and it is identical to the one of the functional instance

ouestyan.fr /etc/yunohost/certs/ouestyan.fr/key.pem /etc/yunohost/certs/ouestyan.fr/crt.pem
xoyaz.xyz /etc/yunohost/certs/xoyaz.xyz/key.pem /etc/yunohost/certs/xoyaz.xyz/crt.pem

The working yunohost instance (xoyaz.xyz) was installed from a yunohost 11 beta version

J’ai le même problème

Hi, just running the command postmap -F hash:/etc/postfix/sni fixed the SMTP problem. This command should be run after a certificate renewal?

1 Like

incroyable, merci beaucoup

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.