I have now set those (with some modifications detailed below) in /etc/dovecont/conf.d/10-mail.conf:
mail_uid=vmail mail_uid=vmail mail_home=/var/mail/vhosts/%d/%n mail_location=maildir:/var/mail/vhosts/%d/$n
I made these changes relative to your suggestion to more closely match my original settings.
After doing that, I modified /etc/dovecot/conf.d/auth-passwdfile.conf.ext and commented out the userdb block. After doing sudo service dovecot reload, I was having the same problem as I was originally when I ran sudo doveadm search -A NEW:
Error: User listing returned failure doveadm: Error: Failed to iterate through some users
I went back in and added the following userdb block to /etc/dovecot/conf.d/auth-passwdfile.conf.ext:
userdb { driver = passwd-file args = /etc/dovecot/dovecot-users }
After doing another sudo service dovecot reload and then trying sudo doveadm search -A NEW, I now get new errors:
doveadm(testuser@domain.test): Info: User no longer exists, skipping doveadm(pfuser1@domain.test): Info: User no longer exists, skipping
So at least I'm getting closer as it does see the two Dovecot mailbox accounts I have in /etc/dovecot/dovecot-users, but it is acting like the user doesn't exist for some reason. Any more ideas? I did not modify the /etc/dovecot/dovecot-users file at all from my previous description. Do I need to modify that to include, at the very least, a uid (vmail), gid (vmail), and userdb_mail locaiton (userdb_mail=maildir:/var/mail/vhosts/%d/%n)?
On Tue, Aug 30, 2016 at 12:33 PM Aki Tuomi <aki.tuomi@dovecot.fi> wrote:
You can provide those defaults with
mail_uid=vmail mail_gid=vmail mail_home=/var/mail/vhosts/%d/%u mail_location=Maildir:~/maildir
global settings.
And then you can remove userdb block completely.
Aki
On August 30, 2016 at 7:02 PM "Scott W. Sander" <scottwsx96@gmail.com> wrote:
Forgive me, I'm a novice. Consider that today I have already set up a working postfix + Dovecot server with userdb using the static driver and passdb using a password file (in the format <username>:{hashing algorithm}<password hash>). The Dovecot server has several mailboxes which are already in use today.
I understand that I'll need to change over to using the passwd-file driver in order to get doveadm mailbox iteration working. That said, can someone please explain how I could migrate over from the static to passwd-file without causing disruption to the existing mailboxes? Do I need to just add some more information to my Dovecot password file (namely the uid, gid, and mailbox home location)? If so, can I still use the "vmail" uid and gid for all mailbox users that I was using with the static driver configuration?
Sorry, when I followed the setup guide I did, I did not realize it would prevent me from being able to use doveadm expunge -A and doveadm search -A.
Thank you!
On Tue, Aug 30, 2016 at 1:07 AM Stefán Tamás <tamas@numex.hu> wrote:
- 29, hétfő keltezéssel 19.40-kor Scott W. Sander ezt írta:
userdb { args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n driver = static }
Use passwd-file driver to get iteration working. The static driver is can not be used for iteration.
-- Üdvözlettel
Stefán Tamás --------------------------------- domain > email > web >>> siker Numex Informatika Kft. Mobil: +36 20 956 0233, Tel: +36 1 205 3915, Fax: +36 1 203 6037 http://numex.hu