[Dovecot] Virtual users - what is better Maildir or mbox?

Trever L. Adams trever at middleearth.sapphiresunday.org
Mon Jun 25 10:37:42 EEST 2012


On 06/25/2012 01:20 AM, Kaya Saman wrote:
> Now what I would like to know is, which is better for "virtual
> hosting" Maildir or mbox?
>
>
> Basically my requirement is that I would like to separate users via
> either individual folders and then put each user's mbox or Maildir in
> the created directory, or simply name each mbox or Maildir according
> to the user name.
>
>
> First up is this possible?
>
>
> Secondly, how would I go about doing it?
>
Sorry, I missed this at first. It is quite simple. I don't store it in
passwd or any other place, since you are doing vmail, you might find
this easiest:

in /etc/dovecot/conf.d/10-mail.conf (where mail_location is):

mail_home = /home/vmail/%Ld/%Ln
mail_location = maildir:~/Maildir

in /etc/dovecot/conf.d/10-mail.conf (after paragraph “# System user and
group used to access mails...”):

mail_uid=vmail
mail_gid=vmail

Obviously, vmail may not be your user for vmail. Also, some of my notes
may no longer be accurate for location, just find where it exists and edit.

I hope this helps. Of course, this is a Maildir setup. mbox is probably
very similar, but I have had too many mbox style mail queues go south
losing all of the mail (or more than one would like), so I do Maildir,
even though it isn't necessarily the best use of disk space.

Trever
-- 
"I do not fear computers. I fear the lack of them." -- Isaac Asimov


More information about the dovecot mailing list