We're in the process of changing mail servers. The new one will require a client certificate from our internal CA for all connections. How can I make gnus use a client certificate in the connection? I can't find any option for that in the nnimap documentation.
I tried setting it up like this:
(setq gnus-secondary-select-methods '(
(nnimap "imap"
(nnimap-address "imap.example.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-inbox "INBOX")
(nnimap-split-methods default)
)
))
and with the authinfo entry
machine imap.example.com port imaps key "~/.privat/certs/jenny.key" cert "~/.privat/certs/jenny.pem"
When I try to connect, I get the following errors in emacs:
Opening nnimap server on imap...
Opening connection to imap.example.com via tls...
auth-source-search: found 1 backends matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
auth-source-search: found 0 results (max 1) matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
auth-source-search: found 1 backends matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143"))
auth-source-search: found 0 results (max 1) matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143"))
auth-source-search-backend: got 1 (max 1) in netrc:~/.authnfo-test matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
auth-source-search: CREATED 1 results (max 1) matching (:max 1 :host ("imap.example.com" "imap") :port (993 "imaps" "imap" "993" "143") :user nil :require (:user :secret) :create t)
Opening nnimap server on imap...failed: NO (ALERT) Client didn't present valid SSL certificate
The mailserver also says no certificate was presented:
Dec 12 11:10:22 imap dovecot: imap-login: Disconnected (client didn't send a cert):