Closed Bug 1529929 Opened 3 years ago Closed 6 months ago

Manually Applying filters on a folder doesn't work (maildir)

Categories

(Thunderbird :: Filters, defect)

defect
Not set
normal

Tracking

(thunderbird_esr78 wontfix, thunderbird89 wontfix)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- wontfix
thunderbird89 --- wontfix

People

(Reporter: a.vankaam, Assigned: benc)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

have a lot of filters
converted from mbox to maildir
got new mail in inbox, read it, ran "run filters on folder"

note: run filters on message works

Actual results:

nothing happened

Expected results:

mail should be moved.

Just wondering what the status is on this. I'm seeing the same issue under 68.4.2 on OS X.

Does filtering in general do not work with maildir?

Duplicate of this bug: 1619255
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Summary: filters on folders with maildir → Manually Applying filters on a folder doesn't works (maildir)

The problem still exists in TB 78.x - converting to maildir stopps manually triggered filters working on folders.

Filter on mail or selection of mails works

Previously installed automatic filters on mail download may work - or not.

Bug seen on existing profiles as well as on a brand new test profile without any add ons.

Re - converting to Mbox solves the problem

Similar problem here with 78.x
With mbox automatic filtering works and can be seen in the log
With maildir automatic filtering works sometimes but nothing to see in the log

Looks like it's a result of Bug 1694942 - the mbox->maildir conversion doesn't realise that filterlog.html is a special file (sigh) and just treats it as an mbox and converts it into a maildir.

Then later, when filters are run upon a folder in that converted account, it tries to write to the filter log. This fails and the filters are stopped dead.
(nsMsgFilterList::EnsureLogFile() is one culprit. I think there might be a couple of others, maybe one in junk filtering?)

First part of the fix is simple enough: modify the filter running procedure so it can keep going even without logging.

Secondly: Fix Bug 1694942 so that filterlog.html is never converted into a maildir in the first place.

Thirdly: we need to deal with existing filterlog.html directories out in the wild. A bunch of intrepid users have already switched to maildir and we should make the experience as smooth as we can for them. Easiest thing is to just delete such directories when we see them, either as part of a migration phase on startup, or on-the-fly.

I've started on these fixes (with a few false starts!). In the meantime, the easiest workaround is to check for filterlog.html directories and manually delete them!

(In reply to misolau from comment #5)

With maildir automatic filtering works sometimes but nothing to see in the log

Is there actually a log file there in the maildir-converted directory? With this bug, I'd expect a filterlog.html directory (with new and cur subdirs). But if it's an actual logfile, there's something else going on :-(

Flags: needinfo?(misolau)

(In reply to Ben Campbell from comment #7)

(In reply to misolau from comment #5)

With maildir automatic filtering works sometimes but nothing to see in the log

Is there actually a log file there in the maildir-converted directory? With this bug, I'd expect a filterlog.html directory (with new and cur subdirs). But if it's an actual logfile, there's something else going on :-(

The filterlog.html with subdirs is there and in the cur-dir is an .eml file.

Flags: needinfo?(misolau)
Assignee: nobody → benc
Status: NEW → ASSIGNED

(In reply to misolau from comment #8)

The filterlog.html with subdirs is there and in the cur-dir is an .eml file.

Great, thanks! It's the same issue I'm seeing. I was worried there for a moment!

Quick workaround for now - delete the whole filterlog.html directory and it should be fine again.

This makes the filter run a little more fault-tolerant. Previously, if
filterlog.html couldn't be written, the whole filter run would fail.
This changeset also takes the opportunity to tidy up a few of the rough
edges around the filter logging (eg closing the log file when the logging
is disabled).

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/c0681bca3a96
Allow filters to run even if filter logging fails. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Summary: Manually Applying filters on a folder doesn't works (maildir) → Manually Applying filters on a folder doesn't work (maildir)
You need to log in before you can comment on or make changes to this bug.