Where are mail folders located?

Web hosting discussion, programming, and shared and dedicated servers.
7 posts Page 1 of 1
by casner » Sun Oct 20, 2013 3:07 pm
I have recently opened a hosting account so that I can have mail service that allows me to use my extensive procmail processing honed over many years. Part of that processing is to deliver mail to several mail folders. I have found where my INBOX and DELETED_MESSAGES files are kept, but I have not found the pre-defined subfolders. I am used to an environment where the .procmailrc MAILDIR is a directory under my home directory, but it's not clear whether the IMAP server will access those files.
by joemuller » Mon Oct 21, 2013 12:13 pm
By default, you can get the path for your mail spool from the MAIL environment variable. If you're just doing an ls in that directory, your other folders won't show up - anything aside from the inbox will need to be prefixed with a dot:

INBOX.Alerts = $MAIL/.Alerts/
I'm a proud employee of Sonic.net! :-)
by casner » Mon Oct 21, 2013 4:21 pm
Thanks for that clue. Now for a couple more questions:

1. Can I create additional mailboxes at the same level as INBOX? I saw some other posts about the INBOX hierarchy having some legacy considerations, but I didn't pick up the answer to that question.

2. In my previous environments, I have used simple mailbox files. With dovecot, I need to use maildir format. Is the dovecot "deliver" tool available? I looked in a few places based on information in the Dovecot wiki, but didn't find it yet.
by kgc » Mon Oct 21, 2013 4:26 pm
Folders are created underneath the INBOX prefix (and directory.) This is hidden by most clients - to deliver to a folder displayed as "Alerts" or "INBOX.Alerts" in procmail - $DEFAULT/.Alerts/

NOTE - the trailing '/' is very important as it tells procmail to deliver to a maildir rather than a MH folder. Also note that lock are not needed.

Code: Select all

:0
* ^List-Id: Dovecot Mailing List
$DEFAULT/.dovecot/
Kelsey Cummings
System Architect, Sonic.net, Inc.
by casner » Mon Oct 21, 2013 11:14 pm
Thanks. Based on what I see in the procmail log, it looks like $DEFAULT includes a slash on the end already, so $DEFAULT.dovecot/ also works and might be cleaner (it avoids a double slash in the path).

The client I use is alpine (or pine) in which having the folders underneath INBOX is not as convenient, but I can manage.
by casner » Tue Oct 22, 2013 1:23 am
Also, I asked before about the Dovecot "deliver" tool. Their wiki page for procmail says:

Procmail delivers mails into Maildir folders, if a slash is appended to the folder name (e.g. ".spam/"). But Procmail itself could not update the Dovecot index files. This decreases the performance a bit, because the Dovecot IMAP or POP3 server has to add new mails for the index files.

Is that relevant here? If so, where can the deliver tool be accessed?
by kgc » Tue Oct 22, 2013 9:45 am
The dovecot LDA is not relevant or available in our current configuration.
Kelsey Cummings
System Architect, Sonic.net, Inc.
7 posts Page 1 of 1