about summary refs log tree commit homepage
diff options
context:
space:
mode:
-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";