I am trying to configure mu4e protonmail.

I can read my messages just fine, but attempting to send a message results in:

smtpmail-send-it: Sending failed: 502 5.7.0 anonymous login not supported

I followed these three links to the letter and they all result in the same error:


I am running emacs-nox 27.2 on Arch Linux.

If I can provide any additional information, please let me know.

Edit 1: Some more info:

When I attempt to send an email from protonmail (gmail works fine), emacs prompts this message:

Certificate information
Issued by:
  Issued to:          Proton Technologies AG
  Public key:         RSA, signature: RSA-SHA256
  Session:            TLS1.3, key: ECDHE-RSA, cipher: AES-256-GCM, mac: AEAD
  Security level:     Medium
  Valid:              From 2021-07-28 to 2041-07-23

The TLS connection to is insecure
for the following reasons:

* certificate signer was not found (self-signed)
* the certificate was signed by an unknown and therefore untrusted authority
* certificate could not be verified

It asks if I want to "Continue Connecting" in light of the above message. When I say yes, that is when I get the anonymous login not supported error that I discussed above.

Edit 2:

For reference, here is my protonmail context:

        :name "protonmail"
            (lambda (msg)
            (when msg
                (string-prefix-p "/m-soda-protonmail" (mu4e-message-field msg :maildir))))
        :vars '((user-mail-address . "my email")
                (user-full-name    . "my name")
                (mu4e-drafts-folder  . "/protonmail/Drafts")
                (mu4e-sent-folder  . "/protonmail/Sent")
                (mu4e-refile-folder  . "/protonmail/All Mail")
                (mu4e-trash-folder  . "/protonmail/Trash")

                (message-send-mail-function . smtpmail-send-it)
                (smtpmail-auth-credentials . "/home/marc/.config/mu4e/protonmailpass.gpg")
                (smtpmail-smtp-server . "")
                (starttls-use-gnutls . t)
                (smtpmail-stream-type . starttls)
                (smtpmail-smtp-service . 1025))))

1 Answer 1


I found the solution. My problem was probably caused by a bug. Correct me if I'm wrong.

The key referenced by smtpmail-auth-credentials MUST be stored as ~/.authinfo.gpg

Interestingly enough, the value assigned to smtpmail-auth-credentials (mine was "/home/marc/.config/mu4e/protonmailpass.gpg" above) can be anything. The function will always reference ~/.authinfo.gpg regardless of how it is assigned in your config file.

I will do some more digging, and if it is indeed a bug, I will make report to the maintainer of mu4e.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.