Appearance
Virtual Attachments Plugin (virtual-attachments)
The virtual attachments plugin automatically creates an email message in a virtual folder for every attachment that exists in a mailbox.
It is used by OX App Suite if the virtual attachment view has been activated in the software.
Configuration
dovecot.conf
First, you'll have to load the plugin which also requires the virtual plugin to be loaded:
doveconf
mail_plugins {
virtual = yes
virtual_attachments = yes
}IMAP Capabilities
For OX App Suite to use the virtual folders fully, you need to enable two IMAP capabilities:
- XDOVECOT: Enable FETCHing X-MAILBOX and X-REAL-UID.
- SEARCH=X-MIMEPART: Enable SEARCHing attachments by filename.
doveconf
imap_capability {
"SEARCH=X-MIMEPART" = yes
XDOVECOT = yes
}Namespace
Then, you'll have to create a Namespaces for the virtual-attachments.
doveconf
namespace virtual {
prefix = virtual/
separator = /
mail_driver = virtual
mail_path = /etc/dovecot/virtual
mail_index_path = ~/virtual
}
namespace virtual-attachments {
prefix = virtual-attachments/
separator = /
mail_driver = attachments
mail_path = ~/virtual-attachments
mailbox virtual/All {
auto = create
}
}For each folder that you want an attachments folder for, you need to create a corresponding folder in the Virtual Attachments namespace. The mailbox names need to match existing real or virtual mailboxes. Those mailboxes will be mirrored below the virtual-attachments namespace. Each of the mirrored mailboxes will contain one mail per attachment found in the referenced mailbox. The virtual-attachments mailboxes can be mailbox_auto = auto-created.
For example:
- Attachments in
INBOXare invirtual-attachments/INBOX - Attachments in
virtual/Allare invirtual-attachments/virtual/All
Storage Location With Obox
When using the virtual-attachments plugin with obox, the virtual index files must be in a directory named virtual-attachments in the user home directory.
This way the virtual-attachments indexes are added to the obox root index bundles and will be preserved when user moves between backends or when metacache is cleaned.
doveconf
mail_driver = attachments
mail_path = ~/virtual-attachmentsThe virtual-attachments indexes & cache will be stored in the user root bundle.
It is possible to disable storing virtual indexes in the user root bundle using metacache_disable_secondary_indexes.