> On 28/05/2021 12:39 Gabx <gabriel1 at tcpreset.net> wrote: > > > On 5/28/21 11:24 AM, Aki Tuomi wrote: > > > >> On 28/05/2021 12:21 Gabx <gabriel1 at tcpreset.net> wrote: > >> > >> > >> Hi, > >> on my vps (debian stable) I have an email system with postfix, dovecot, > >> virtual users and domains. > >> I have 3 users with different mail_locations. > >> > >> the first mail_location = maildir: ~ / Maildir > >> the second mail_location = maildir: ~ / user1 / Maildir > >> the third mail_location = maildir: ~ / user2 / mail > >> > >> In postfix the above schema is represented in virtual_mailbox_maps. > >> > >> In dovecot mail_location is set maildir:~/Maildir. > >> > >> The first user receives regular mail, the other two none. > > > > > > You can return `mail` attribute from your userdb (or passdb) to override the default mail_location. > > > > Ensure that `doveadm user targetuser` shows `mail` pointing to correct location. You can use ~/ with mail. > > > > Aki > > > > I don't want to override the default mail_location, i need 3 different > mail_locations for each user. > > Gabx >You do this by providing three different values for mail attribute in your passdb or userdb, for these users. You can use userdb { driver = passwd-file args = /etc/dovecot/override.passwd } to do this if it's not feasible with your current userdb provider. Aki
On 5/28/21 11:51 AM, Aki Tuomi wrote:> >> On 28/05/2021 12:39 Gabx <gabriel1 at tcpreset.net> wrote: >> >> >> On 5/28/21 11:24 AM, Aki Tuomi wrote: >>> >>>> On 28/05/2021 12:21 Gabx <gabriel1 at tcpreset.net> wrote: >>>> >>>> >>>> Hi, >>>> on my vps (debian stable) I have an email system with postfix, dovecot, >>>> virtual users and domains. >>>> I have 3 users with different mail_locations. >>>> >>>> the first mail_location = maildir: ~ / Maildir >>>> the second mail_location = maildir: ~ / user1 / Maildir >>>> the third mail_location = maildir: ~ / user2 / mail >>>> >>>> In postfix the above schema is represented in virtual_mailbox_maps. >>>> >>>> In dovecot mail_location is set maildir:~/Maildir. >>>> >>>> The first user receives regular mail, the other two none. >> >> >>> >>> You can return `mail` attribute from your userdb (or passdb) to override the default mail_location. >>> >>> Ensure that `doveadm user targetuser` shows `mail` pointing to correct location. You can use ~/ with mail. > You do this by providing three different values for mail attribute in your passdb or userdb, for these users. > > You can use > > userdb { > driver = passwd-file > args = /etc/dovecot/override.passwd > } > > to do this if it's not feasible with your current userdb provider. > > Aki >If I understand correctly I can repeat the userdb section: userdb { driver = passwd override_fields = mail=~/Maildir } userdb { driver = passwd override_fields = mail=/home/user1/user1/Maildir } userdb { driver = passwd override_fields = mail=/home/user2/user2/mail } What do you think of this setup ? Gab -- GPG fingerprint: 5A6A F742 ACEA C9A7 93A8 8D5E 7AEF 5A02 D080 89F7 Contact: xmpp://gabx at jabber.tcpreset.net -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_0x8ED8A7AD1473BC20.asc Type: application/pgp-keys Size: 3127 bytes Desc: OpenPGP public key URL: <https://dovecot.org/pipermail/dovecot/attachments/20210528/18d537d6/attachment-0001.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20210528/18d537d6/attachment-0001.sig>