71 Valid Message Store UIDs and Folder Names

This information describes valid constructions for message store UIDs and folder names. Note that folder and mailbox are used synonymously.

Topics:

Message Store User ID

The message store user ID is a mail user's unique identifier in the message store. In the default domain, this is the same as the user's LDAP uid attribute. In hosted domains, this is uid@domain where uid is the uid LDAP attribute and domain is the canonical domain name.

Message Store Mailbox Name for Commands

Some message store commands require that you specify a mailbox name. The required form of the name is user/userid/mailbox where userid is the message store user ID (see "Message Store User ID") and mailbox is a user's mailbox. Specifying INBOX sometimes implies all the user's mailboxes in the message store. For example, the following command removes the INBOX and all the folders of user joe.

mboxutil -d user/joe/INBOX

Note that in the context of message stores, folders and mailboxes are synonymous.

Valid UIDs

Valid and invalid UID characters are controlled separately by the MTA and message store mechanisms. That means UID character limitations are specified by the union of MTA and message store limitations. The following characters and strings are invalid as UIDs in the message store:

  • % ? * & / : \

  • ASCII values less than 20 or greater than 7E hexidecimal (see man ascii)

  • A leading '-' is prohibited because it is reserved for negative rights

  • A leading 'group=' is prohibited because it is reserved for group IDs

  • The following UIDs are reserved: 'anonymous' 'anybody' 'anyone' and 'anyone@domain'

  • The maximum supported length for a UID is 127 bytes

The following characters are invalid in UIDs in the MTA:

<space> $ ~ = # * + % ! @ , { } ( ) / \ < > ; : " ` [ ] & ?

The list of characters forbidden by the MTA can be modified by setting the ldap_uid_invalid_chars option with a string of the forbidden characters using decimal ASCII values, however, you are strongly advised not to change the default constraint. The default setting is as follows and reflect the characters listed above:

ldap_uid_invalid_chars=32,33,34,35,36,37,38,40,41,42,43,44,47,58,59,60,61,62,63,64,91,92,93,96,123,125,126

Valid mail folder names. The following characters are invalid as folder names:

% * ? and ASCII values less than 20 or greater than 7E hexidecimal (see man ascii).

In addition, folder names must be valid MUTF-7 sequences.