[Dovecot] Home directories

William Blunn bill+dovecot at blunn.org
Tue Aug 24 21:43:58 EEST 2010


On 24/08/2010 15:57, Timo Sirainen wrote:
> I've noticed that a lot of people are using e.g.:
>
> mail_location = maildir:/var/vmail/%d/%n
>
> Then either they don't have home directory set, or their home 
> directory is the same as the maildir. 
> http://wiki.dovecot.org/VirtualUsers/Home explains all the problems of 
> not separate home and mail directories.
>
> Also whenever I try to suggest using a separate home and mail 
> directory, the answer is way too often: "But I'm using virtual users. 
> (They don't have home directories.)"
>
> So I started wondering. Maybe simply renaming the "home" to something 
> else would help here at least some. Make all of the documentation use 
> only the new word, and add alias for userdb so that the new name and 
> the "home" both work (I guess docs would need to keep using the "home" 
> as field name for some more years).
>
> So far I've only come up with "vhome" as the replacement name. Other 
> ideas?

Note what follows is more a collection of ideas which jumps around a bit 
rather than a cogent coherent logical sequence.

Is there a potential problem with the term "virtual home" in as much as 
for system users it is not virtual but the user's (actual) home directory?

That being the case I'd avoid the word "virtual". It seems we also want 
to avoid the word "home".

So I see logic in calling it the "user state directory" which could be 
"userdir" for short.

-=-

Is there a global configuration directive like "mail_location" wherein 
the two directives could be placed adjacently?

# Note: Fictional example. Does not work.
mail_location = maildir:/var/vmail/%d/%n/mail
user_state_directory = /var/vmail/%d/%n

-=-

Could the documentation be re-structured to encourage the configuration 
of the two parts of the storage

1. Mail directory
2. User state directory

?

Then to say words to the effect of:

"For virtual user environments, you need to set both of these aspects 
up. You may want to set up mail as a subdirectory off the user state 
directory. Alternatively you can put them in separate locations."

"For system user environments, you may want to have the user state 
directory go directly on to the user's home directory / a subdirectory 
of the user's home directory."

-=-

Another idea would be to say that, perhaps for Dovecot 2.1 (i.e. a 
suitably large version bump), that having a configuration which Dovecot 
could divine leaves things open to filesystem name clashes between the 
user state directory and the mail directory (or whatever is considered 
to be a bad outcome of not properly configuring the user state 
directory) would create a fatal error at daemon start time. Perhaps 
there could be a configuration directive to override this check, wrapped 
in suitably comprehensive documentation which means that people who 
absolutely insist can ice skate uphill, but the path of least resistance 
would be to configure Dovecot properly.

Bill


More information about the dovecot mailing list