This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Cannot send email through SMTP server with self-signed cert

Tags: kmail, smtp, certificate, trust kmail, smtp, certificate, trust kmail, smtp, certificate, trust
(comma "," separated)
Registered Member
I am trying to set up an email account in KMail with an institutional provider that has a self-signed certificate. IMAP works fine, but sending e-mails throught SMTP fails with the error message "Failed to transport message. The certificate is self-signed, and untrusted". I gather that this refers to the SSL certificate of the SMTP server. (The SMTP server uses SSL/TLS with authentication.)

I could not find a setting in KMail that would disable checking the certificate (I am told by the institutional administrator that e.g. Thunderbird or Outlook does have such a setting, but I try to stick with KMail), so I tried making the certificate trusted instead. These are the steps I followed:

Get the certificate by running
Code: Select all
openssl s_client -connect

the output of which will contain a BEGIN CERTIFICATE/END CERTIFICATE block: I copied this, and saved it to a certificate.pem file.

Then, I imported the certificate.pem file into Kleopatra (a.k.a KMail Tools > Certificate manager), and then tried trusting the root certificate by right clicking on the imported cert and choosing "Trust Root Certificate". I am not sure it achieved anything, since after doing this, the only available option after right clicking again is "Trust Root Certificate", I cannot distrust it or anything. On the other hand, there was no error message.

The above did not have any effect on the sending of mails, they still fail with the same error message.

I pieced together the above from various forum posts, so I might very well be mistaken there: not sure if Kleopatra is even meant for this, and not only for sending encrypted mail (which I have nothing to do with).

However, my overall goal is just to be able to send mails through this SMTP server with an unsigned cert, whatever the means, so any suggestions are welcome.

I am on the latest Manjaro with KDE, KMail version 5.19.2 (21.12.2).
Registered Member


Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]