Create a separated mailbox for archived mails

Claudio Corvino ccorvino at
Fri Oct 15 18:56:02 EEST 2021


I have an MTA configured with Postfix that deliver email to an IMAP/LMTP 
Dovecot server version configured to bind LDAP/AD for users.

I would like to configure Dovecot to create another mailbox to archive 
mails of users to a separated NFS mount.

Here is my /dovecot-ldap.conf/:


//auth_bind = yes//
//dn = XXX//
//dnpass = XXX//
//scope = subtree//
//user_attrs = 
//pass_attrs = sAMAccountName=user//
//user_filter = (&(objectclass=person)(samaccountname=%n))//
//pass_filter= (&(objectclass=person)(samaccountname=%n))/


I think I will add another conf file, let's say 
/dovecot-ldap-archive.conf /using "url" as LDAP/AD filed to distinguish 
from normal users:


//auth_bind = yes//
//dn = XXX//
//dnpass = XXX//
//scope = subtree//
//user_attrs = url=home=/mnt/mail-storage-archive/%$,=uid=501,=gid=501//
//pass_attrs = url=user//
//user_filter = (&(objectclass=person)(url=%n))//
//pass_filter= (&(objectclass=person)(url=%n))/


I then added to "test" user a "url" filed into Active Directory named 
/test-archive//, b/ut it's not working, when I bind Dovecot with:

/doveadm user test-archive/

I receive:

/field    value//
//userdb lookup: user test-archive doesn't exist/

With test user it works:

/doveadm user test//
//field    value//
//uid    501//
//gid    501//
//home    /mnt/mail-storage-dev/test//
//mail    maildir:~/Maildir:INDEX=/var/indexes/test/

What I'm doing wrong?

Thanks in advance!


*Claudio Corvino
IT Systems Administrator*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3517 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the dovecot mailing list