You may not have to do anything. Check your first_valid_uid
and last_valid_uid
settings - it limits which of the users you have configure in your user database are actually valid Dovecot users.
For logging in and mail delivery, these settings work the way you want: You can keep your system users, and keep Dovecot configured for reading the system user database (passwd
), yet only have some of them also be Dovecot users.
However, the doveadm
tools unfortunately mostly ignore this, as partly documented in the man pages:
If the -A option is present, the command will be performed for all users. Using this option in combination with system users from userdb { driver = passwd } is not recommended, because it contains also users with a lower UID than the one configured with the first_valid_uid
setting.