From 550f778dbcb84a9aa67732b1fff0191b55bea24c Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 6 Jul 2019 19:50:06 +0200 Subject: interimap: clarify that 'ignore-mailbox' is matched against internal names. That is, without leading reference, and where the hierarchy delimiter is replaced with null characters. /!\ This changes breaks backward compatibility! --- Changelog | 8 ++++++++ doc/interimap.1.md | 5 ++++- interimap.sample | 9 +++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 4cc66ba..84a62b6 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,13 @@ interimap (0.5) upstream; + Breaking changes: + * interimap: when matching mailbox names against the 'ignore-mailbox' + pattern, the hierarchy delimiter is substituted with a null character + before hand. For instance one should now use '^virtual(?:\x00|$)' to + exclude the mailbox named 'virtual' as well as its descendants + (regardless of the hierarchy delimiter in use). + + Other changes: * interimap: the space-speparated list of names and/or patterns in 'list-mailbox' can now contain C-style escape sequences (backslash and hexadecimal escape). diff --git a/doc/interimap.1.md b/doc/interimap.1.md index 387850a..d7c3711 100644 --- a/doc/interimap.1.md +++ b/doc/interimap.1.md @@ -266,7 +266,10 @@ Valid options are: : An optional Perl Compatible Regular Expressions ([PCRE]) covering mailboxes to exclude: any ([UTF-7 encoded][RFC 2152] and unquoted) mailbox listed in the initial `LIST` responses is ignored if it - matches the given expression. + matches the given expression after trimming the reference names and + substituting the hiearchy delimiter with the null character. For + instance, specifying `^virtual(?:\x00|$)` excludes the mailbox named + “virtual” as well as its descendants. Note that the *MAILBOX*es given as command-line arguments bypass the check and are always considered for synchronization. This option is only available in the default section. diff --git a/interimap.sample b/interimap.sample index f771e54..2433563 100644 --- a/interimap.sample +++ b/interimap.sample @@ -1,7 +1,12 @@ #database = imap.example.org.db -#list-mailbox = "*" + +# only consider subscribed mailboxes list-select-opts = SUBSCRIBED -ignore-mailbox = ^virtual/ +#list-mailbox = "*" + +# ignore the mailbox named 'virtual' and its descendants +ignore-mailbox = ^virtual(?:\x00|$) + [local] type = tunnel -- cgit v1.2.3