about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-07-01 02:18:48 +0000
committerEric Wong <e@80x24.org>2019-07-06 04:30:31 +0000
commit6d3644f5dd7c54fbee33be728f6735e4419cdc0d (patch)
treeb4476d98bf8341b5dc508fa1bcde73869f2838ce
parent3fb7ecc37bdc1c43401fffe51086e411ea35298b (diff)
downloadpublic-inbox-6d3644f5dd7c54fbee33be728f6735e4419cdc0d.tar.gz
Given most folks have multiple mail accounts, there's no reason
we can't support multiple Maildirs.
-rw-r--r--lib/PublicInbox/WatchMaildir.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm
index 4be0b397..e49fb6c7 100644
--- a/lib/PublicInbox/WatchMaildir.pm
+++ b/lib/PublicInbox/WatchMaildir.pm
@@ -24,7 +24,9 @@ sub new {
         # indefinitely...
         foreach my $pfx (qw(publicinboxwatch publicinboxlearn)) {
                 my $k = "$pfx.watchspam";
-                if (my $dir = $config->{$k}) {
+                defined(my $dirs = $config->{$k}) or next;
+                $dirs = [ $dirs ] if !ref($dirs);
+                for my $dir (@$dirs) {
                         if (is_maildir($dir)) {
                                 # skip "new", no MUA has seen it, yet.
                                 my $cur = "$dir/cur";