Change Dovecot mail directory

dovecotimap

I've set up a mail server with Dovecot over SSL. It is receiving emails and placing them in the directory:

/home/*user*/Maildir/new

I can view them in Vim.

However, when I connect to the email via IMAP or Telnet, it does not retrieve anything. Is there somewhere I need to change a directory? Or does anyone have any ideas as to where to look for clue or potential issues. The mail logs are empty.

UPDATE

I found in /etc/dovecot/conf.d/10-mail.conf:

mail_location = mbox:~/mail:INBOX=/var/mail/%u

But /var/mail/user is empty; my mail is is /home/user/Maildir/new

Crossed wires somewhere.

Best Answer

This will depend on how your mail server is setup. I had to change the following file: /etc/dovecot/conf.d/10-mail.conf, change the variable to:

mail_location = maildir:~/Maildir

Because my mail is being saved there. It appears there are three different ways to save mail, see: http://wiki2.dovecot.org/MailLocation

Read to docs, find where you mail is being saved and change the configuration in /etc/dovecot/conf.d/10-mail.conf accordingly.

If you cannot find your mail in any of these locations, you probably have another error.