I am attempting to setup mu4e to read mail from a Protonmail account. I'm using offlineimap to sync my mail dirs. However, when I try to refile or move a message from my INBOX folder to any other folder that I sync with the server I get an error like this in offlineimap:

Server responded: NO ['cannot create messages outside the Drafts mailbox']

I'm surprised that there's not much that I can find on this error. Since it doesn't seem to be a common offlineimap error I have to wonder if it has something to do with the way that mu4e moves messages around?

Here's how I can reproduce the error:

  1. Receive a new message in my inbox
  2. Sync my local maildir with my Protonmail account successfully using offlineimap (which points at a hydroxide process)
  3. Run mu index
  4. Open mu4e and refile the message to my Archive folder
  5. Attempt to sync my mailbox again using offlineimap

Here is my .offlineimaprc file:

# ~/.offlineimaprc

accounts = protonmail
pythonfile = ~/.config/offlineimap/keyring.py
metadata = ~/.cache/offlineimap

[Account protonmail]
remoterepository = protonmail-remote
localrepository = protonmail-local

[Repository protonmail-local]
type = Maildir
localfolders = ~/.mail
sync_deletes = yes

[Repository protonmail-remote]
# delete local mails that were deleted on the remote server
expunge = yes
type = IMAP
remotehost =
remoteport= 1143
remoteuser = tompurl
remotepasseval = get_password("[email protected]")

folderfilter = lambda foldername: foldername in ['INBOX', 'Archive', 'Sent']
ssl = no

...and here's my mu4e config:

(add-to-list 'load-path "/home/tom/.nix-profile/share/emacs/site-lisp/mu4e")
(require 'mu4e)

(setq mu4e-maildir "~/.mail"
      mu4e-attachment-dir "~/Downloads")

(setq mu4e-sent-folder   "/Sent")
(setq mu4e-drafts-folder "/Drafts")
(setq mu4e-refile-folder "/Archive")
(setq mu4e-trash-folder  "/Trash")

(setq user-mail-address "[email protected]"
      user-full-name  "Tom Purl")

;; Get mail
(setq mu4e-get-mail-command "offlineimap"
      mu4e-change-filenames-when-moving nil
      mu4e-update-interval nil)

;; Send mail
(setq message-send-mail-function     'smtpmail-send-it
      smtpmail-auth-credentials "~/.authinfo.gpg"
      smtpmail-smtp-server ""
      smtpmail-smtp-service 1025)

Here's what I've tried:

  1. Set mu4e-change-filenames-when-moving to true, which is apparently necessary for mbsync but not offlineimap.
  2. Set sync_deletes in my .offlineimaprc file to "no".

Otherwise I'm just stumped. I'm surprised that this isn't a much more common error because my setup is pretty vanilla.

1 Answer 1


I'm having the same issue using hydroxide/offlineimap/mu4e and poking through the issues for hydroxide on github brought me to the last entry by emersion for issue 30, who says:

Kind of. When sending a message, the ProtonMail API requires the client to create a draft message then send it (that'll implicitly copy it to Sent).

To copy and add new messages in arbitrary folders we'd need to use the import API. Some WIP code for this is in https://github.com/emersion/hydroxide/blob/master/protonmail/import.go.

This may be the cause of the issue.

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.