Archive partitions are defined by the
archivepartition-name:<none>The pathname of the archive partition name, corresponding to spool partition partition-name. For any mailbox residing in a directory on partition-name, the archived messages will be stored in a corresponding directory on archivepartition-name. Note that not every partition-name option is strictly required to have a corresponding archivepartition-name option, but that without one there’s no benefit to enabling archiving.
Multiple partitions may be used for various reasons, such as to distribute load between different storage pools or technologies. Please consult Mail Spool Partitions for more details and use cases.
To define additional mail spools, add more
to imapd.conf(5) as needed. For example, let’s imagine we
want to migrate users to new partitions split by first character of the
user’s last name, and add a partition for shared mailboxes (see
defaultpartition: main partition-main: /var/spool/imap partition-am: /var/spool/imap-am partition-nz: /var/spool/imap-nz partition-shared: /var/spool/imap-shared
So, to add archiving to the system described above, we would need something like this (again, building on our previous examples):
defaultpartition: main partition-main: /var/spool/imap partition-am: /var/spool/imap-am partition-nz: /var/spool/imap-nz partition-shared: /var/spool/imap-shared archive_enabled: yes archivepartition-main: /var/spool/imaparchive/main archivepartition-am: /var/spool/imaparchive/am archivepartition-nz: /var/spool/imaparchive/nz archivepartition-shared: /var/spool/imaparchive/shared