Cannot send mail through mail server with "Let's Encrypt"'s ssl cert. #1684

Closed
opened 2025-11-02 04:09:31 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @yhvicey on GitHub (Apr 8, 2018).

  • Gitea version (or commit ref): 1.3.2 built with: bindata, sqlite
  • Git version: 2.14.1
  • Operating system: Ubuntu 17.10
  • Database:
    • SQLite

Description

Cannot send mail through mail server with "Let's Encrypt"'s ssl cert.
Notification:

Failed to send test email to 'xxx@xxx.com': gomail: could not send email 1: StartTLS: x509: certificate signed by unknown authority
Originally created by @yhvicey on GitHub (Apr 8, 2018). - Gitea version (or commit ref): 1.3.2 built with: bindata, sqlite - Git version: 2.14.1 - Operating system: Ubuntu 17.10 - Database: - [x] SQLite ## Description Cannot send mail through mail server with "Let's Encrypt"'s ssl cert. Notification: ``` Failed to send test email to 'xxx@xxx.com': gomail: could not send email 1: StartTLS: x509: certificate signed by unknown authority ```
Author
Owner

@techknowlogick commented on GitHub (Jun 27, 2018):

@yhvicey can you try using StartTLS except with a service that doesn't sign with LE to help narrow down the cause?

@techknowlogick commented on GitHub (Jun 27, 2018): @yhvicey can you try using StartTLS except with a service that doesn't sign with LE to help narrow down the cause?
Author
Owner

@techknowlogick commented on GitHub (Sep 9, 2018):

Closing this ticket. Please feel welcome to reopen it.

@techknowlogick commented on GitHub (Sep 9, 2018): Closing this ticket. Please feel welcome to reopen it.
Author
Owner

@thomai commented on GitHub (Aug 15, 2019):

I tried it with a mailbox.org account and sending a test mail works like a charm. It seems like the problem appears only for LE.

openssl s_client -starttls smtp -crlf -connect smtp.mailbox.org:587

Certificate chain
 0 s:OU = Domain Validated Only, CN = *.mailbox.org
   i:C = CH, O = SwissSign AG, CN = SwissSign Server Silver CA 2014 - G22
 1 s:C = CH, O = SwissSign AG, CN = SwissSign Server Silver CA 2014 - G22
   i:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2
 2 s:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2
   i:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2

(edit: I do not have permissions to reopen the issue. I'd appreciate if you could do that.)

@thomai commented on GitHub (Aug 15, 2019): I tried it with a mailbox.org account and sending a test mail works like a charm. It seems like the problem appears only for LE. `openssl s_client -starttls smtp -crlf -connect smtp.mailbox.org:587` ``` Certificate chain 0 s:OU = Domain Validated Only, CN = *.mailbox.org i:C = CH, O = SwissSign AG, CN = SwissSign Server Silver CA 2014 - G22 1 s:C = CH, O = SwissSign AG, CN = SwissSign Server Silver CA 2014 - G22 i:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2 2 s:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2 i:C = CH, O = SwissSign AG, CN = SwissSign Silver CA - G2 ``` (edit: I do not have permissions to reopen the issue. I'd appreciate if you could do that.)
Author
Owner

@thomai commented on GitHub (Aug 15, 2019):

I was able to solve the issue by providing the full certificate chain on port 587 of the mailserver. My fault.

@thomai commented on GitHub (Aug 15, 2019): I was able to solve the issue by providing the full certificate chain on port 587 of the mailserver. My fault.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1684