Subfolders with Dovecot/Postfix

Hey All,

I have googled this a few times, screwed around with it a bit, but I am not really sure what I am doing.

I've been using a Dovecot/Postfix setup on my Dapper Drake linode for the last 18 months, without the ability to have subfolders.

I can have :

[email protected]/

  • Folder Name

  • Folder Name Two

But I can't have:

[email protected]/

  • Folder Name/

– Subfolder Name/

  • Folder Name Two/

-- Subfolder Name/

--- Sub Sub Folder Name/

---- etc./

This is quite a hassle, because I'd like to be able to organise my emails in a much more appropriate way and just folders doesn't quite cut it.

My dovecot configuration file is:

http://www.gn.net.au/r/dovecot.conf

My postfix configuration file is:

http://www.gn.net.au/r/postfix_main.cf

I have tried to follow a few tutorials to configure it, and have googled quite a bit but I can't find anything that lets me know what/how I might be able to configure this.

Thanks for any help in advance!

Grant

9 Replies

I've never used dovecot, so this is a complete guess, but I know some IMAP implementations don't allow a folder to contain both message and sub folders. Have you tried creating a subfolder under and empty parent folder?

–James

@irgeek:

Have you tried creating a subfolder under and empty parent folder?

Thanks for your response James, but I am unable to create a subfolder if I try to create one in an empty folder either.

G

If I recall correctly, Postfix defaults to mbox delivery (there's nothing in your main.cf to override this) and if you are using the mbox mail storage format, Dovecot won't do subfolders. You need to switch to the maildir storage format (and convert your existing mbox data).

I have postfix/dovecot running with .maildir format, and I can confirm that it lets me create subfolders for IMAP accounts. When I look directly in the maildir they are stored in the base directory, but in Thunderbird they look and act just like subfolders.

 ~/.maildir $ ls -a
.  ..  .Sent  .Trash  .test  .test.testsub  cur ...

HTH

I think I have the same dovecot/mbox setup as you. How I've created subfolders is by using the shell command mkdir. I don't think you can make subfolder changes like that via IMAP unless you switch to maildir.

Dovecot is strange, but easy as hell to get SMTP auth, which is why I use it. Anyway, if your mail forder is named "mail", then its subfolders must be hidden (dot) files named ".mail.*" . So if mail has a Spam folder and Trash folder, they must reside in the "mail" directory with the names .mail.Spam and .mail.Trash.

That convention for folder names is not unique to Dovecot; it's a maildir thing. Something like that can't be unique to an MUA because the MTA has to speak it as well.

@Xan:

That convention for folder names is not unique to Dovecot; it's a maildir thing. Something like that can't be unique to an MUA because the MTA has to speak it as well.

What? I've been using Courier-IMAP for the past 5-6 years, and just converted to Dovecot. Courier and Dovecot don't share this convention you call a "maildir thing".

Maildir++, a minor extension to Maildir, was first implemented in the Courier MTA in 1998.

So if anything, it's a Courier-specific thing. (But it isn't, it's widely supported, as you are illustrating.)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct