]> Sergey Matveev's repositories - public-inbox.git/commitdiff
watchmaildir: do not reject lowercase flags on Maildir files
authorEric Wong <e@80x24.org>
Tue, 4 Apr 2017 18:25:47 +0000 (18:25 +0000)
committerEric Wong <e@80x24.org>
Tue, 4 Apr 2017 18:25:47 +0000 (18:25 +0000)
Dovecot uses 'a'..'z' (lowercase) to designate keywords
in Maildir flags.  This was preventing certain messages
from being marked as spam.

https://wiki2.dovecot.org/MailboxFormat/Maildir

lib/PublicInbox/WatchMaildir.pm

index 1823c24862e6e6da36112ce86f123692f1b82e1d..985f9192078f3497de62e6da5691f706579ef90a 100644 (file)
@@ -97,7 +97,8 @@ sub _try_fsn_paths {
 
 sub _remove_spam {
        my ($self, $path) = @_;
-       $path =~ /:2,[A-R]*S[T-Z]*\z/i or return;
+       # path must be marked as (S)een
+       $path =~ /:2,[A-R]*S[T-Za-z]*\z/ or return;
        my $mime = _path_to_mime($path) or return;
        _force_mid($mime);
        $self->{config}->each_inbox(sub {