diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2015-07-27 23:45:09 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2015-07-27 23:49:59 +0200 |
commit | 36b7d017145bac2f883cca12289e66b6b369a5e3 (patch) | |
tree | 068ff5c50d55f21dd376acc38da37b9f8b6b8b1a /lib | |
parent | 67b2781d691d107f92409ac6fd9aeef97593ffa1 (diff) |
Enable fine-grained control on the mailboxes to consider.
Add 3 options:
- list-mailbox
- list-select-opts
- ignore-mailbox
The first two control the initial LIST command, while the last one is a
regular expression to filter out mailboxes to exclude from the LIST
response.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/IMAP/Sync.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Net/IMAP/Sync.pm b/lib/Net/IMAP/Sync.pm index 3faab63..48f61c1 100644 --- a/lib/Net/IMAP/Sync.pm +++ b/lib/Net/IMAP/Sync.pm @@ -78,10 +78,11 @@ sub read_config($$%) { foreach my $section (@$sections) { my $conf = defined $h->{_} ? { %{$h->{_}} } : {}; # default section $configs{$section} = $conf; - next unless defined $section and $section ne '_'; - die "No such section $section\n" unless defined $h->{$section}; - $conf->{$_} = $h->{$section}->{$_} foreach keys %{$h->{$section}}; + if ($section ne '_') { + die "No such section $section\n" unless defined $h->{$section}; + $conf->{$_} = $h->{$section}->{$_} foreach keys %{$h->{$section}}; + } # default values $conf->{type} //= 'imaps'; |