aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap7
1 files changed, 5 insertions, 2 deletions
diff --git a/interimap b/interimap
index 87c3a64..f170ded 100755
--- a/interimap
+++ b/interimap
@@ -636,6 +636,10 @@ sub sync_mailbox_list() {
state $sth_subscribe = $DBH->prepare(q{
UPDATE mailboxes SET subscribed = ? WHERE idx = ?
});
+ state $ignore_mailbox = do {
+ my $re = $CONF->{_}->{"ignore-mailbox"};
+ defined $re ? qr/$re/ : undef
+ };
foreach my $name (qw/local remote/) {
foreach my $mbx (keys %{$IMAP->{$name}->{mailboxes}}) {
@@ -645,8 +649,7 @@ sub sync_mailbox_list() {
# exclude ignored mailboxes (taken from the default config as it doesn't
# make sense to ignore mailboxes from one side but not the other
- next if !@ARGV and defined $CONF->{_}->{"ignore-mailbox"}
- and $mbx =~ /$CONF->{_}->{"ignore-mailbox"}/o;
+ next if !@ARGV and defined $ignore_mailbox and $mbx =~ $ignore_mailbox;
$mailboxes{$mbx} = 1;
}
}