On 04/01/2024 08:21, Aki Tuomi via dovecot wrote:
On 03/01/2024 23:38 EET John Fawcett <john@voipsupport.it> wrote:
Hi I have recently rectified an old configuration error whereby I had virtual users' home and mail directories set to the same value. I used option 3 from "ways to set up home directory" https://doc.dovecot.org/configuration_manual/ home_directories_for_virtual_users/ so I have: home= /var/vmail/domain/user/home/ mail= /var/vmail/domain/user/ where domain and user are substituted for the real domain and user. For existing users where I created the home directory when migrating the settings, there is no issue. But I am seeing errors like this for new users: lmtp(test@example.com)<125035><EHDOAyS1lWVr6AEAjpgUYA>: Error: autoexpunge: Couldn't create dovecot.autoexpunge.lock lock: file_create_locked(/var/vmail/ example.com/test@example.com/home//dovecot.autoexpunge.lock) failed: safe_mkstemp(/var/vmail/example.com/test@example.com/home// dovecot.autoexpunge.lock) failed: No such file or directory Seems that differently to mail directory which is automatically created, the home directory is not created. I couldn't see any config setting that would autocreate home directories (where home directories are subdirectories of mail directories). Would it be worthwhile introducing an autocreate option for home directories? John
I don't really understand why you want home to be under mail directory? How about swapping them around like
home= /var/vmail/domain/user/ mail= /var/vmail/domain/user/mail
because this makes more sense in many ways?
Aki
Hi Aki
thanks, it's clear that swapping them would solve it since mail directories are being auto created. I can do that.
I was following one of the documented ways of doing it, albeit not the most preferred way (see point 3 of ways to set up home directory half way down the page). I guess that both option 2 and 3 will not work properly unless the home directory is created outside of dovecot (or a sieve script is published via mangesieve which does autocreate home directory). Option 4 is what I was using but just discovered it causes issues (with file that begin with . being interpreted as directories). It could be useful to add those notes to the documentation.
https://doc.dovecot.org/configuration_manual/home_directories_for_virtual_us...
best regards John