The file system layout in Qmail is no longer based on the mailbox address as of POA 5.0. It is now looks like
In POA 5.0, support for multiple mailbox aliases has been implemented, with an option to change the primary mail address.
The file system layout has been changed:
- For mailboxes, it is based on mailname_id, not on hosting_id, in order to eliminate dependency on the primary email address.
- For maillists, it is still based on domain_namehash (old behavior).
- For <all domain> entries, it is based on hosting_id (old behavior). Note that no file content is moved during the upgrade to version 5.0:
- New mailboxes will be created in the new layout.
- Existing mailboxes will stay in the old layout.
For active mailboxes:
In order to help locate mailboxes on FS, the new utility
mailbox_diris now placed in the Qmail bin/ folder.
The utility requires a special environment, as it gets information from the LDAP server. The environment can be set in the shell as follows:
Thus, the full command for locating the mailbox looks like this:
. /usr/local/qmail/shared/control/ldap_settings && /usr/local/qmail/bin/mailbox_dir <mailbox@address>
This command will output the path to the maildir.
For deleted mailboxes, e.g. in case something needs to be restored from backup:
# /usr/local/qmail/bin/domainhash <domain.tld>
It will output the directory that the files like SHARED-INDEX are located, which are the symlinks to needed files, and using such symloinks provider may try to locate the needed files in backup