On 08 Jan 2016, at 04:27, Bill Shirley Bill@knoxvillechristian.org wrote:
However, I would think that only applies to mail delivery or POP3/IMAP access. Are you saying that all doveadm -A commands will create Maildir and 'auto=create/subscribe' folders? Why did it not create '~/Maildir/SystemFolders'? I did hit Ctrl-C as soon as I saw what doveadm was doing.
Again, I don't think SEARCH should create any directories. Maybe have a doveadm CREATE for that purpose? I am not the creator nor a developer of Dovecot; just one user with an opinion. If they think this is the correct behavior I'm fine with that.
doveadm search doesn't autocreate any folders, but all mail accessing code will create the mail root directory. Whether that's good or not depends on your use case. It's safer to always create it though. That guarantees that if there are configuration mistakes, missing mountpoints or things like that the problem should get noticed immediately (due to a failing mkdir) rather than an empty mailbox provided to the user.
I think pretty much the only downside is the situation that you noticed: if userdb passwd-file is used it contains some users that aren't actually mail users. But even then not mkdiring would solve the problem only sometimes. You might want to use doveadm -A parameter for commands that actually modify the users, and those would still be failing. So I think the proper fix is to just make sure that -A matches only the actual mail users, which solves the whole issue. It could be nice to have some feature that allows filtering out specific users though, besides just having the first_valid_uid filter. Maybe something in /etc/passwd itself could control whether user would be a mail user or not, like:
userdb { driver = passwd # a) only return users with home directory prefix /home/ #args = include=home=/home/* # b) don't return users with shell set to /bin/false #args = exclude=shell=/bin/false }