Please advise how to set Postfix and Dovecot mail server to store incoming emails with owner user and group vmail:vmail while currently it stores them as the mailbox owner user and group. I tried to set
virtual_minimum_uid = 5000
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
in /etc/postfix/main.cf (5000 is the uid of 'vmail' user),
mail_uid = vmail
mail_gid = vmail
in the /etc/dovecot/conf.d/10-mail.conf file and
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/mail/vmail/%d/%n
}
in the /etc/dovecot/conf.d/auth-sql.conf.ext with no effect.