From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 0AEC82096C for ; Tue, 4 Apr 2017 18:34:02 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] watchmaildir: do not reject lowercase flags on Maildir files Date: Tue, 4 Apr 2017 18:34:02 +0000 Message-Id: <20170404183402.2729-1-e@80x24.org> List-Id: 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 1823c24..985f919 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 { -- EW