Seasoul,
Right from dovecot.conf:
Location for users' mailboxes. This is the same as the old
default_mail_env
setting. The default is empty, which means that Dovecot tries to find the
mailboxes automatically. This won't work if the user doesn't have any mail
yet, so you should explicitly tell Dovecot the full location.
If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
isn't enough. You'll also need to tell Dovecot where the other
mailboxes are
kept. This is called the "root mail directory", and it must be the first
path given in the mail_location setting.
There are a few special variables you can use, eg.:
%u - username
%n - user part in user@domain, same as %u if there's no domain
%d - domain part in user@domain, empty if there's no domain
%h - home directory
See /usr/share/doc/dovecot-common/wiki/Variables.txt for full list. Some
examples:
mail_location = maildir:~/Maildir
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
<doc/wiki/MailLocation.txt>
In my case: mail_location = maildir:/var/virtual/%Ld/%Ln/Maildir
Just because I prefer this way.
In your case I believe that something like this would be good: mail_location = maildir:/var/mail/vmail/%Ln@%Ld
The "L" if for lowercase (I think). In e-mail RFC is specified that mail should be case sensitive, but it might give you some problems where people send e-mail to foo@domain.com and FOO@domain.com, as we are working with UNIX like OS, these are different folders and different mailboxes.
With best regards,
Fábio Catunda.
On 12/30/2010 12:40 AM, Seasoul wrote:
Hi, I am running Dovecot Version 1.0.15on a Debian server, with postfix and postfixadmin. My mailbox base is /var/mail/vmail
When I send an email to a user1@domain.com for the first time, the user "mail" creates a set of dovecot folders under /var/mail/vmail/ user1@domain.com/ and my new emails are found in /var/mail/vmail/ user1@domain.com/new When I test my server using telnet (telnet domain.com 110), I can log in fine as a user1, but when I type "LIST", it tells me there are no emails. And I realize a new set of dovecot folders were created under /var/mail/vmail/user1/ ! The folders are created by the user "user1". Obviously the folder "new" under that is empty, since my emails received are in /var/mail/vmail/user1@domain.com/new and not /var/mail/vmail/user1/new . Therefore, connecting with an email client via POP also shows an empty inbox.
I am lost as to what to do to fix this, and how to let the server know that pop access should be looking into /var/mail/vmail/user1@domain.com/ instead of /var/mail/vmail/user1/ .
Hopefully someone on this list will be able to save me from my misery :)
Cheers Sea