From: Eric Wong Date: Tue, 4 Apr 2017 18:25:47 +0000 (+0000) Subject: watchmaildir: do not reject lowercase flags on Maildir files X-Git-Tag: v1.0.0~74 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=5d39caaf83799ba3a94b73463a3597c181816425 watchmaildir: do not reject lowercase flags on Maildir files 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 --- diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 1823c248..985f9192 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -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 {