reddit / emacs

Configure mbsync to work correctly with an Office365 hosted account (propagate changes)?

ndw · 2022-10-23 08:43
First, let me say, I accept that this isn't strictly speaking an Emacs question, but a quick search on Reddit suggests that there isn't a better place to ask. And I am using it with Emacs so I'm hoping you'll take a generous view. I download mail with mbsync, manage it with mu4e, and send it with SMTP. This all works fine and has for years. Except that I find that I suddenly have to deal with email hosted on office365. It does IMAP, so I can read my mail, but it warns \`Notice: far side store does not support flag(s) 'P'; not propagating.\` The consequence of this is that the changes I make locally aren't reflected on the server. Refiling or deleting mail doesn't have any effect. That means my INBOX is just going to grow and grow and grow and eventually that's going to be a problem. (Nevermind that if I decide to peek at my mail from my phone or something, it's going to be a confusing mess.) In a previous life, I managed with davmail, but dear $DEITY in heaven, I'd really rather not have to do that again. Anyone know if mbsync (or the office365 account) can be configured to make things Work Right(TM)?
ndw · 2022-10-23 09:00
There's nothing more effective in finding a solution to a problem than posting a question. I misunderstood the notice and assumed it was the cause of the issue. In fact, what was necessary was setting `expunge both` in the mbsync configuration. Apologies for the noise.
lrochfort · 2022-10-23 09:42
Glad you got it working. I'm in exactly the same situation as you at work. I also get the notice about the P flag, but so far haven't noticed any issues
mclearc · 2022-10-23 11:21
I’m curious - if you’re not using davmail how are you dealing with 2FA in Office365?
jumper047 · 2022-10-23 11:34
My work email previously was like this, and I noticed no issues with it - I created app password and all worked fine.
mclearc · 2022-10-23 11:39
I see. Unfortunately we don’t have that option at work (university IT controls everything)
stoopidjonny · 2022-10-23 11:43
Glad you posted it. I gave up on using email in emacs and this gave me 2 solutions to try.
Deewiant · 2022-10-23 12:18
https://wiki.archlinux.org/title/Isync#Using_XOAUTH2
donio · 2022-10-23 18:06
In my experience mbsync is best if using IMAP as it works well with very large IMAP folders. If you happen to be on Gmail and Notmuch then [Gmailieer](https://github.com/gauteh/lieer) is worth checking out as it provides full two-way label/tag sync between the two.
stoopidjonny · 2022-10-23 19:31
I’ll look into Gmailieer. thanks!
varsderk · 2022-10-24 19:27
Stuck with the same problem here. It would be *so easy* for them to just flip that switch on… 😭
varanusbengalensis · 2022-10-29 07:18
Can you please share your anonymized .mbsyncrc config? I've been struggling to get Office365 working on mbsync for months and it might help. Thanks!
ndw · 2022-11-02 14:26
Here you go: ``` # Remote username@acmecorp account IMAPAccount acmecorp Host outlook.office365.com Port 993 User username@acmecorp.com Pass ITSASEKRIT SSLType IMAPS SSLVersions TLSv1.2 AuthMechs LOGIN IMAPStore acmecorp-remote Account acmecorp MaildirStore acmecorp-local Path /Users/username/Maildir/Acmecorp/ Inbox /Users/username/Maildir/Acmecorp/INBOX SubFolders Verbatim Channel acmecorp Far :acmecorp-remote: Near :acmecorp-local: Patterns Archive Drafts SentItems DeletedItems JunkEmail INBOX Expunge both CopyArrivalDate yes Sync All Create Near SyncState * ``` Good luck!
varanusbengalensis · 2022-11-03 02:46
Thanks a lot. I'll have a go and let you know how it went.
varanusbengalensis · 2022-11-08 14:46
Thanks a lot.