I'm trying to set mu4e to use for both personal and work gmail accounts. I successfully configured
offlineimap and fetched the mail.
Then I tried setting mu4e, and according documentation:
the recommended way to deal with multiple accounts is through mu4e’s built-in Contexts system
Okay. I set the context values like this:
mu4e-contexts `( ,(make-mu4e-context :name "home" :match-func (lambda (msg) (when msg (mu4e-message-contact-field-matches msg :to "[email protected]"))) :vars '((mu4e-maildir . "~/.mail/personal") (mu4e-trash-folder . "/[Gmail].Trash"))) ,(make-mu4e-context :name "work" :match-func (lambda (msg) (when msg (mu4e-message-contact-field-matches msg :to "[email protected]"))) :vars '((mu4e-maildir . "~/.mail/work") (mu4e-trash-folder . "/[Gmail].Bin"))))))
of course there's more than that, I'm showing you only the relevant piece. So the problem I'm having is have to do with deleting messages. Sometimes it works, other times it doesn't. And when it fails it throws messages like this:
error in process filter: Error 70: error moving /Users/ag/.mail/personal/[Gmail].INBOX/cur/1457242634_2.42730.C02MT2ZDFH05,U=27933,FMD5=4b4b643246a6b95b2136ea99e0e5f614:2,S to /Users/ag/.mail/[Gmail].Trash/cur/1457242634_2.42730.C02MT2ZDFH05,U=27933,FMD5=4b4b643246a6b95b2136ea99e0e5f614:2,ST
You see that it picked file in
personal dir and trying to move to
[Gmail].Trash in root of
Actual directory tree looks more like this:
/Users/ag/.mail ├── personal │ ├── INBOX │ ├── [Gmail].All\ Mail │ ├── [Gmail].Important │ ├── [Gmail].Sent\ Mail │ ├── [Gmail].Spam │ ├── [Gmail].Trash └── work ├── INBOX ├── [Gmail].All\ Mail ├── [Gmail].Bin ├── [Gmail].Important ├── [Gmail].Sent\ Mail ├── [Gmail].Spam
mu4e-trash-folder values are different for
work. Honestly I dunno why - I set
synclabels = yes in my
offlineimaprc and that's what I got.
It seems to me, mu4e fails to set correct value of
mu4e-trash-folder during context switching. Can someone help me fix that? Show me a piece of config where different folders being used for different contexts? Thanks.