<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hi Sami,</p>
    <p>I just configured on my test environment (with two Dovecot in
      replica in geographical different branches) this namespace and it
      seems to works:<br>
    </p>
    <p><font size="-1"><i>namespace archive {</i><i><br>
        </i><i>  disabled = no</i><i><br>
        </i><i>  hidden = no</i><i><br>
        </i><i>  inbox = no</i><i><br>
        </i><i>  list = yes</i><i><br>
        </i><i>  location =
          maildir:/mnt/mail-storage-archivio/%u-archivio</i><i><br>
        </i><i>  subscriptions = yes</i><i><br>
        </i><i>  prefix = Archives.</i><i><br>
        </i><i>  separator =</i><i><br>
        </i><i>}</i></font></p>
    <p>Thanks!<br>
    </p>
    <div class="moz-cite-prefix">On 20/10/21 16:49, Sami Ketola wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9A92354A-96AD-4F15-AC09-D0A6889E6105@ketola.io">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br class="">
      <div>Hi,</div>
      <div><br class="">
      </div>
      <div>You can choose what ever storage driver you want. Sdbox was
        there just as an example that you can have separate storage
        driver from your mail_location storage driver.</div>
      <div><br class="">
      </div>
      <div>Also this way ARCHIVE shows as normal folder structure under
        Thunderbird as long as your users subscribe to the folders. </div>
      <div>Which you can also force with subscribe = auto </div>
      <div><br class="">
      </div>
      <div>Sami</div>
      <div><br class="">
      </div>
      <div>
        <blockquote type="cite" class="">
          <div class="">On 20. Oct 2021, at 17.36, Claudio Corvino <<a
              href="mailto:ccorvino@trustitalia.it" class=""
              moz-do-not-send="true">ccorvino@trustitalia.it</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <meta http-equiv="Content-Type" content="text/html;
              charset=windows-1252" class="">
            <div class="">
              <p class="">Hi Sami,</p>
              <p class="">thanks for your answer!</p>
              <p class="">Why should I use sdbox?</p>
              <p class="">If I configure the archive location on a NFS
                mountpoint and I move mails older than 5 years to the
                "archive", how can I tell client like Thunderbird where
                to find archived e-mails?</p>
              <p class="">Thanks!<br class="">
              </p>
              <div class="moz-cite-prefix">On 20/10/21 15:37, Sami
                Ketola wrote:<br class="">
              </div>
              <blockquote type="cite"
                cite="mid:3B8604CD-BFDF-4AAA-BC1B-D00EE1D3C121@ketola.io"
                class="">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=windows-1252" class="">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=windows-1252" class="">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; line-break: after-white-space;" class="">Hi,
                  <div class=""><br class="">
                  </div>
                  <div class="">You should be able to configure
                    something like this:</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">namespace archive {</div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>disabled
                    = no</div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>hidden
                    = no</div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>list
                    = yes</div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>prefix
                    = ARCHIVE/</div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>location
                    = sdbox:/archive/location/%u</div>
                  <div class="">}</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Sami<br class="">
                    <div class=""><br class="">
                      <blockquote type="cite" class="">
                        <div class="">On 20. Oct 2021, at 16.16, Claudio
                          Corvino <<a
                            href="mailto:ccorvino@trustitalia.it"
                            class="" moz-do-not-send="true">ccorvino@trustitalia.it</a>>
                          wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div class="">
                          <meta http-equiv="Content-Type"
                            content="text/html; charset=windows-1252"
                            class="">
                          <div class="">
                            <p class="">Hi Marc,</p>
                            <p class="">thanks for replying, I would
                              like to archive e-mail older than 5 years
                              on a second storage, it seems like the <i
                                class="">namespace</i> with a new <i
                                class="">mail_location</i> that you
                              suggested could be good for me, but then I
                              will need the auto-archiving script that
                              move mails older than 5 years to the <i
                                class="">archive</i> namespace.</p>
                            <p class="">A question: how can I configure
                              client like Thunderbird to access that
                              archive namespace so that users can still
                              access their old mails?<br class="">
                            </p>
                            <p class="">Please could you give me some
                              suggestion on how to do that?</p>
                            <p class="">Thanks for your time!</p>
                            <p class="">Regards<br class="">
                            </p>
                            <div class="moz-cite-prefix">On 17/10/21
                              12:06, Marc wrote:<br class="">
                            </div>
                            <blockquote type="cite"
                              cite="mid:782052e47538420a983d7052a1891bbe@f1-outsourcing.eu"
                              class="">
                              <pre class="moz-quote-pre" wrap="">I am not really sure what you are trying to realize with this ldap modification. But afaik you have just one mail_location= configuration per user and that is it. If you want to archive email on 2nd storage you can either use this ALT= storage location or create a namespace, and configure this namespace with a new mail_location. The latter I have done indeed as archive, and after every first quarter I am running an auto-archiving script that moves emails from the usual inbox and send folders to the archive namespace.



</pre>
                              <blockquote type="cite" class="">
                                <pre class="moz-quote-pre" wrap="">I have an MTA configured with Postfix that deliver email to an IMAP/LMTP
Dovecot server version 2.3.4.1 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:

[...]

ldap_version=3
auth_bind = yes
dn = XXX
dnpass = XXX
scope = subtree
user_attrs = sAMAccountName=home=/mnt/mail-storage-
dev/%$,=uid=501,=gid=501
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:

[...]

ldap_version=3
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, but 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
</pre>
                              </blockquote>
                            </blockquote>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br class="">
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
  </body>
</html>