Certificate for smtp starttls missing subject alternate name / certificat pour smtp starttls manquant des subject alternate names

:uk:/:us:

My YunoHost server

Hardware: dedicated server
YunoHost version:

yunohost:
  repo: stable
  version: 4.3.6.2
yunohost-admin:
  repo: testing
  version: 4.3.4.1
moulinette:
  repo: stable
  version: 4.3.3.1
ssowat:
  repo: stable
  version: 4.3.3.1

I have access to my server : Through SSH + through the webadmin + direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: I migrated my server from a provider to another one by a backup/restore process.

Description of my issue

I received an error from a website I was registering to that could not send me an e-mail saying that my server’s certificate did not have the correct SAN.

I was using one of my e-mail aliases from a domain that’s not my primary domain (but hosted on the same YNH server).

Indeed, when I do a echo | openssl s_client -connect <my.alias.domain>:25 -starttls smtp -showcerts 2>/dev/null | openssl x509 -noout -ext subjectAltName I only see:

X509v3 Subject Alternative Name: 
    DNS:<my.main.domain>, DNS:xmpp-upload.<my.main.domain>

I have two questions (well actually more than two):

  • How come YNH does not use a certificate that’s valid for all of my domains?
  • How can I make my YNH server use a cert that is valid for all of my domains? I looked in the documentation, apparently I can use custom certs, so I could handle my letsencrypt certs manually setting the right domains in my SAN and use that cert as explained in the docs or did I miss something? Also the docs only mention nginx, what about anything else relying on those certificates, in my case postfix, but there is also the xmpp server I guess, …
    If I go this way, are there any issue I’m am going to face?

:fr:

Mon serveur YunoHost

Matériel: serveur dédié
Version de YunoHost:

yunohost:
  repo: stable
  version: 4.3.6.2
yunohost-admin:
  repo: testing
  version: 4.3.4.1
moulinette:
  repo: stable
  version: 4.3.3.1
ssowat:
  repo: stable
  version: 4.3.3.1

J’ai accès à mon serveur : En SSH + Par la webadmin + En direct avec un clavier/écran
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer: J’ai migré ce serveur d’un hébergeur à un autre par une procédure de sauvegarde + restauration

Description du problème

J’ai reçu une erreur d’un site web où je souhaitais m’inscrire car il n’arrivait pas à m’envoyer un e-mail, se plaignant que le certificat de mon serveur n’avait pas les bons SANs.

J’avais utilisé un de mes alias e-mail d’un de mes domaines secondaires (mais hébergé sur le même serveur YNH).

Effectivement, quand je fais un echo | openssl s_client -connect <domaine.de.mon.alias>:25 -starttls smtp -showcerts 2>/dev/null | openssl x509 -noout -ext subjectAltName je n’ai que:

X509v3 Subject Alternative Name: 
    DNS:<mon.domaine.principal>, DNS:xmpp-upload.<mon.domaine.principal>

J’ai quelques questions:

  • comment ça se fait que YNH n’utilise pas un certificat valide pour tous mes domaines?
  • Comment faire pour que YNH utilise un certificat valide pour tous mes domaines? J’ai regardĂ© dans la doc, apparemment je peux utiliser des certificats personnalisĂ©s, donc je pourrais gĂ©rer manuellement mes certificats LE en m’assurant d’utiliser les bons SANs comme expliquĂ©, ou peut-ĂŞtre que j’ai ratĂ© quelque chose? Je note aussi que la doc ne mentionne que nginx, mais quid des autres services censĂ©s utiliser ces certificats? Dans mon cas postfix mais j’imagine qu’il y a aussi le serveur xmpp et peut-ĂŞtre d’autres?
    Si je choisis cette solution, est-ce que je vais au devants de problèmes connus?

I guess you are referring to this issue which is gonna be fixed in Yunohost 11.0 : Client mail configuration and SSL certificates in multi-domain context · Issue #1301 · YunoHost/issues · GitHub

Exactly, I guess I’ll wait then. Thanks

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