Listescape plugin
- Comes with v1.2.alpha3+
Also available for v1.0.6+ and v1.1.
- These versions support only escaping '.' with virtual '/' separators, although you can play with the #defines
Listescape plugin allows users to use characters in mailboxes names that would otherwise be illegal, for example:
- Maildir++ layout disallows using '.' character since it's used internally as the hierarchy separator.
- '~' character at the beginning of the mailbox name is disallowed, because of the possibility that it gets expanded to user's home directory.
- '/' character is disallowed with all layouts (if it's not the hierarchy separator).
Listescape plugin allows you to use all of these characters, as long as the virtual separator is changed to something else. The characters are escaped to the mailbox name as \NN hex codes.
Note that all protocols that care about mailbox names should load the listescape plugin (e.g. the lda protocol when using sieve or when using '-m' with some otherwise illegal mailbox name).
Examples
Allow '.' characters with Maildir++ layout when virtual hierarchy separator is changed to '/':
protocol lda { mail_plugins = listescape } protocol imap { mail_plugins = listescape } namespace private { separator = / inbox = yes } plugin { # The default escape character is '\', but you can change it (v1.2 only) # Note that even here the expansion of % takes place, thus you need to # use "%%" if you want to have the % sign as the escape character. #listescape_char = "\\" }
Allow both '.' and '/' characters when virtual hierarchy separator is changed to '^':
protocol lda { mail_plugins = listescape } protocol imap { mail_plugins = listescape } namespace private { separator = ^ inbox = yes }