0

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:

https://gist.github.com/azzamsa/174096975df0e16b5bf7e919ba90fce2/
https://doubleloop.net/2019/09/06/emacs-mu4e-mbsync-and-protonmail/
https://gist.github.com/A6GibKm/238b754a4a90051f60906b9efa3e8000

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:          127.0.0.1
  Issued to:          Proton Technologies AG
  Hostname:           127.0.0.1
  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 127.0.0.1:1025 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:

  (make-mu4e-context
        :name "protonmail"
        :match-func
            (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 . "127.0.0.1")
                (starttls-use-gnutls . t)
                (smtpmail-stream-type . starttls)
                (smtpmail-smtp-service . 1025))))

1 Answer 1

0

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 that you have read and understand our privacy policy and code of conduct.

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