4

My mail provider (Fastmail) puts the folders I define in the webinterface inside the INBOX. Thus when I sync them using mbsync I obtain the following:

INBOX
 - .Drafts
 - .Foobar

But I would prefer having them one level above and parallel to the INBOX:

INBOX
Drafts
Foobar

How can I achieve this? I've tried the Flatten option but then I still have a INBOX. prefixed to every folder and I loose the hierarchy for subfolders:

INBOX
INBOX.Drafts
INBOX.Foobar
INBOX.Foobar.Foofoo

I could define a channel/renaming rule for every folder but there must be an easier way to do this.

4

I actually found it out by myself. The rule must be:

Channel movetoroot
  Master :remote:INBOX/
  Slave :local:
  Patterns * !INBOX
2

mbbb's answer lets you pull down a bunch of mailboxes and just strip the INBOX/ leader. This is nice, but something else you might want to do is download a single mailbox and totally rename it. This is how you can rename your sent mail to something more UNIX-friendly:

Channel          fmails
Master           :fmimap:INBOX/"Sent Items"
Slave            :fmmaildir:sent
1

Excerpt from my online notes (re: Fastmail):

Another subtlety, for some email clients, you may not like how the standard folders are nested under INBOX. Then, use port 992, rather than 993. This is briefly mentioned here, Server names and ports | FastMail, and more at length at Alternate namespace IMAP port (may help Outlook, OL Express, Apple Mail and BIS users) | FastMail Blog.

In other words, use port 992 instead of 993, so that folders come in flat. (Correspondingly, ports 142 instead of 143, if not using SSL.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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