deoren
2014-Oct-21 16:18 UTC
What is the correct way to configure the mail_location option for Mailidr format?
Short version: What is the correct way to configure the mail_location option for Mailidr format? I've long had it setup this way: mail_location = maildir:/var/vmail/%d/%n based on this guide: https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql Is that correct? Longer version: After upgrading from Dovecot v2.0.x to v2.2.x yesterday I'm coming to the conclusion that I've got it configured wrong. This is probably compounded by my bright idea of explicitly setting the path separator prior to the upgrade like so: separator = . Because we're using Maildir I thought it would be useful to explicitly set the separator value to what the default is for Maildir. I figured this would be a good way to remind myself what the separator is by default. I also figured while I was merging the conf changes between v2.0 and v2.2 I could roll that additional change in also. Looks like that was a bad idea to include unnecessary changes until things had stabilized. I should know better; I was too optimistic for my own good. Here is an example error message I ran into: stat(/var/vmail/example.com/username/.dovecot.lda-dupes/tmp) failed: Not a directory which is nearly identical (other than leading path) to what is shown here: http://www.dovecot.org/list/dovecot/2010-April/048227.html Steffen Kaiser responded with, "You should not (must not) have home == maildir root." That is when I double-checked the guide that I mentioned above and found that I had followed their directions exactly for that conf setting. Looking at some other guides/tutorials shows something more like: mail_location = maildir:/var/vmail/%d/%n/Maildir I assume the latter is how it's supposed to be done? If so, that would explain the problems I've had with Sieve scripts in the past until I explicitly set 'sieve_dir' like so: sieve_dir = /var/vmail/sieve/%d/%n/sieve_dir I did review the official docs here: http://wiki2.dovecot.org/MailLocation/Maildir but I didn't find where it explicitly warns against setting home == maildir root. It should probably be apparent, but it wasn't to me when I first configured that setting. Thanks in advance for your help. If it turns out that the linode.com guide is wrong I'll create a Pull request to have that guide updated.
Benny Pedersen
2014-Oct-21 16:44 UTC
What is the correct way to configure the mail_location option for Mailidr format?
On October 21, 2014 6:18:07 PM deoren <Dovecot-mailing-list at whyaskwhy.org> wrote:> mail_location = maildir:/var/vmail/%d/%n/Maildir > sieve_dir = /var/vmail/sieve/%d/%n/sieve_dirmail_location = maildir:/var/vmail/%d/%n/.maildir sieve_dir = /var/vmail/%d/%n/.sieve More simple, and more easy to tarball backup
Steffen Kaiser
2014-Oct-22 07:29 UTC
What is the correct way to configure the mail_location option for Mailidr format?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 21 Oct 2014, deoren wrote:> What is the correct way to configure the mail_location option for Mailidr > format?mail_location = maildir:<path>> I've long had it setup this way: > > mail_location = maildir:/var/vmail/%d/%n > > Is that correct?any path is OK, as long: 1) it identifies the mail storage uniquely for the user, 2) does not store any other information in it.> Here is an example error message I ran into: > > stat(/var/vmail/example.com/username/.dovecot.lda-dupes/tmp) failed: Not > a directoryThat's because you use $HOME == Maildir root.> Looking at some other guides/tutorials shows something more like: > > mail_location = maildir:/var/vmail/%d/%n/Maildir"Maildir" is the default name for "Maildir"-type mail storeage root. No more, no less. If Dovecot is automatically detecting the type of storage, it probes for this directory name in $HOME.> I assume the latter is how it's supposed to be done? If so, that wouldNo, you are not "supposed" to do so.> I did review the official docs here: > > http://wiki2.dovecot.org/MailLocation/Maildir > > but I didn't find where it explicitly warns against setting home == maildir > root. It should probably be apparent, but it wasn't to me when I firstit applies to all mail storages. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBVEdc13z1H7kL/d9rAQIoSAf/WwdI10EmJbVfDGz+UJgE44kmNjicpiVt DJlkQyYp66s955UmepLMXfvRSZ5KeCAVOXZs1Oe1LYTKqmjzIOyFGBjDcoYGfIIV 6nEABpWUGTHjEuCpGfY/IvFlFE1gYUojKC2zrTFk1P3brvZ3nIBMrZ6hEOjh3bQJ 3m0SsOuu+9ZYvSxNt2EaVa7EkbTZdmLRN1K21JUDDoTXJ+myMsT3z2gJF+Gnr6Cr IppGlYRmVfSQ9E3Kpq7RxoJ4O29uIJa+dWB2fJYsctGxFrR4q6v6yZ//UuZWSrDo 7sdZUaugq2Y7nlimZKhsqsa/ly6AFlSfpto/Cc7AG7JEqpIG2vJKLw==lNuJ -----END PGP SIGNATURE-----