Hi,
I did read quite a lot of documentation and tutorials before posting here, but what I found today finally did the trick.
The tutorial is here:
http://www.mill-yard.com/2011/06/centos-dovecot-sendmail-imap-and-maildir/For anyone having the same problem using Dovecot with Sendmail/Procmail:
1) Edit your Dovecot settings. You can do this either by editing your
/etc/dovecot.conf file directly, or through your Webmin, in
Servers > Dovecot IMAP/POP3 Server > Edit the configuration file.
Find this line:
#mail_location =
Replace it with:
mail_location = maildir:~/Maildir
(Make sure you removed the "#")
2) Stop your Dovecot server then restart it, or else the changes won't be applied. It only takes a few seconds.
3) Edit Procmail settings. Either by adding the 2 following lines at the very beginning of the
/etc/procmailrc file directly:
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
Or through your Webmin, in
Servers>Procmail Mail Filter, click on
Add new variable setting, then enter the following:
Variable name: ORGMAIL
Value: $HOME/Maildir/
Save.
Then click on
Add new variable setting again and enter:
Variable name: DEFAULT
Value: $HOME/Maildir/
Save.
All done! You can now create subfolders in your IMAP account.
Note: Your e-mails may no longer appear on your account, because they are still in the "mail" directory instead of the "Maildir" directory at the root of your username folder. I believe the link above provides a way to transfer old e-mails to the new folder.