{
  "$type": "site.standard.document",
  "content": "---\ntitle: \"mbsync v1.3.2 breaking change: <code>SubFolders</code> config required\"\ndescription: \"The mbsync 1.3.2 update silently requires a SubFolders setting. Here's the\n  fix, plus a bonus mu4e prettifier.\"\ntags:\n  - dev\n---\n\nAs part of my ongoing quest to Emacs-all-the-things, I'm a long-time satisfied\nuser of the [mu](https://www.djcbsoftware.nl/code/mu/) email client. I even\n[wrote the latest CI infrastructure setup](https://github.com/djcb/mu/pull/1725)\nfor the project as a way to give back to Dirk-Jan and the rest of the awesome mu\nteam.\n\nAnyway, mu doesn't care how you get your email onto your machine (i.e. into your\n`~/Maildir`), and so for that task I use\n[isync/mbsync](https://isync.sourceforge.net/mbsync.html) to download my mail\n(via IMAP) from [fastmail](https://www.fastmail.com/). My fastmail\n[config is online](https://github.com/benswift/.dotfiles/blob/master/mbsyncrc)\nif you want to see how I set it all up.\n\nEverything was working swimmingly, until a recent patch version update to mbsync\n(1.3.1 -> 1.3.2) broke things. All of a sudden, I started getting errors saying\n_Maildir error: found subfolder 'INBOX/Sent Items', but store 'fastmail-local'\ndoes not specify SubFolders style_\n\nThere was no mention of a breaking change relating to `SubFolders` style in the\n[v1.3.2 release notes](https://sourceforge.net/projects/isync/files/isync/1.3.2/),\nbut a look at the manual with `man mbsync` revealed this info:\n\n- **SubFolders** `Verbatim|Maildir++|Legacy`\n\n  The on-disk folder naming style used for hierarchical mailboxes. This option\n  has no effect when `Flatten` is used. Suppose mailboxes with the canonical\n  paths `top/sub/subsub` and `INBOX/sub/subsub`, the styles will yield the\n  following on-disk paths:\n  - _Verbatim_ - `Path/top/sub/subsub` and `Inbox/sub/subsub` (this is the style\n    you probably want to use)\n\n  - _Maildir++_ - `Inbox/.top.sub.subsub` and `Inbox/..sub.subsub` (this style\n    is compatible with Courier and Dovecot - but note that the mailbox metadata\n    format is not compatible). Note that attempts to set Path are rejected in\n    this mode.\n\n  - _Legacy_ - `Path/top/.sub/.subsub` and `Inbox/.sub/.subsub` (this is\n    mbsync's historical style)\n\n  - _Default_: unset; will error out when sub-folders are encountered\n\nBy setting `SubFolders Verbatim` in my `.mbsyncrc` things started working again.\nHooray!\n\nOf course, it might be the case that this was all documented somewhere, or that\nI'm just [doing it wrong](https://knowyourmeme.com/memes/youre-doing-it-wrong).\nBut I hope that this is helpful for anyone who runs into the same issue, because\nhaving your email break is _super_ frustrating; email is such a crucial part of\nmy (and everyone's) job, so it just needs to work.\n\n### Bonus: pretty mu4e mbsync filter\n\nIf you are using the same mu & mbsync combo for email, then you might find the\nfollowing elisp snippet handy. It does some cool tricks with the\n`mu4e~get-mail-process-filter` so that the \"in-progress\" output from mu, which\nlooks like this:\n\n```text\nC: 1/1  B: 0/0  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0\n```\n\ngets pretty colours in your `*mu4e-update*` buffer. It's purely cosmetic, but I\ncare about that stuff, and you (maybe?) should too. Anyway, here's the relevant\nelisp to put in your Emacs init file.\n\n```scheme\n(defun mu4e-pretty-mbsync-process-filter (proc msg)\n  (ignore-errors\n    (with-current-buffer (process-buffer proc)\n      (let ((inhibit-read-only t))\n        (delete-region (point-min) (point-max))\n        (insert (car (reverse (split-string msg \"\\r\"))))\n        (when (re-search-backward \"\\\\(C:\\\\).*\\\\(B:\\\\).*\\\\(M:\\\\).*\\\\(S:\\\\)\")\n          (add-face-text-property\n           (match-beginning 1) (match-end 1) 'font-lock-keyword-face)\n          (add-face-text-property\n           (match-beginning 2) (match-end 2) 'font-lock-function-name-face)\n          (add-face-text-property\n           (match-beginning 3) (match-end 3) 'font-lock-builtin-face)\n          (add-face-text-property\n           (match-beginning 4) (match-end 4) 'font-lock-type-face))))))\n\n(advice-add\n 'mu4e~get-mail-process-filter\n :override #'mu4e-pretty-mbsync-process-filter)\n```\n",
  "createdAt": "2026-05-13T23:14:53.564Z",
  "description": "The mbsync 1.3.2 update silently requires a SubFolders setting. Here's the fix, plus a bonus mu4e prettifier.",
  "path": "/blog/2020/07/17/mbsync-v1-3-2-breaking-change",
  "publishedAt": "2020-07-17T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "dev"
  ],
  "textContent": "The mbsync 1.3.2 update silently requires a SubFolders setting. Here's the fix, plus a bonus mu4e prettifier.",
  "title": "mbsync v1.3.2 breaking change: <code>SubFolders</code> config required"
}