Implement message filters for EWS
Categories
(MailNews Core :: Networking: Exchange, task, P2)
Tracking
(Not tracked)
People
(Reporter: babolivier, Assigned: benc)
References
(Depends on 3 open bugs, Blocks 1 open bug)
Details
(Keywords: leave-open)
Attachments
(7 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
We want to eventually support client-side message filters for EWS accounts. Currently, the state of message filters makes this fairly non-trivial, as every protocol pretty much maintains their own implementation. There might be some things we can reuse from nsMsgFilter.cpp but overall it sounds like we might need to reinvent a big chunk of the wheel.
This is probably a good opportunity to look into how we could write a protocol-agnostic implementation of message filters, first for use with EWS, but with the goal of using it for existing protocols in the future too. I think this is a good time to kick off the conversation around what this might look like.
| Assignee | ||
Comment 1•6 months ago
|
||
Just a first baby step, but seems to work.
You can set up filters and when a matching message arrives it'll print "BING!" on stdout.
I think the next thing to try is applying the filter after the message has been added to the database.
Once the message is in the db, applying actions is much simpler and more reliable.
POP3 and IMAP filter handling jumps through awful hoops to move incoming messages to other folders.
They implement their own bespoke message-move routines. Badly.
So it'd be nice to avoid that.
| Assignee | ||
Comment 2•6 months ago
|
||
Updated my patch. It now applies filters to newly-received messages at the end of a sync operation.
Seems to work OK...
Caveats:
- I'm just passing a null window to the filter system, so any error messages probably won't pop up.
- EWS doesn't download the full message during sync, so filters which match on the body won't work yet.
- Not quite about junk classification yet. More investigation required...
- For simplicity, we add the new messages to the folder, then applying filtering.
This means that for "move" filter actions, messages appear briefly in the folder GUI before being moved out...
| Assignee | ||
Comment 3•6 months ago
|
||
| Assignee | ||
Comment 4•6 months ago
|
||
| Assignee | ||
Comment 5•6 months ago
|
||
| Assignee | ||
Updated•6 months ago
|
Updated•6 months ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/71c3d475249c
Move some overly-verbose does-this-filter-need--the-message-body checks out of IMAP folder. r=darktrojan
https://hg.mozilla.org/comm-central/rev/c66c59dfb921
Disallow null filters in nsIMsgFilterList. r=darktrojan
https://hg.mozilla.org/comm-central/rev/825d6b9c0b19
Move filterlist needs-message-body code out of IMAP folder. r=darktrojan
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Updated•6 months ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ac8e5b5b460a
Apply filtering and spam classification to incoming messages on EWS. r=edicharry
Updated•6 months ago
|
| Assignee | ||
Comment 8•5 months ago
|
||
Comment 9•5 months ago
|
||
Since bug 1981208 blocks bug 1847846, there is no need to set both in "Blocks."
| Reporter | ||
Comment 10•5 months ago
|
||
(In reply to Takanori MATSUURA from comment #9)
Since bug 1981208 blocks bug 1847846, there is no need to set both in "Blocks."
There is, because bug 1847846 allows us to get a better grasp on the outstanding Exchange work needed as a whole (more easily than with the full dependency graph), whereas bug 1981208 gives us a filtered-down version of the current phase (and also mostly exists to help with integration into external tools).
| Assignee | ||
Updated•5 months ago
|
Comment 11•5 months ago
|
||
Pushed by heather@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/8af6c84c7272
Add a basic test for filtering incoming messages on EWS. r=babolivier
| Assignee | ||
Comment 12•5 months ago
|
||
If any filters require the message body, we need to download the message first, which is happening over in Bug 1986399.
Updated•4 months ago
|
| Assignee | ||
Comment 13•4 months ago
|
||
| Assignee | ||
Updated•4 months ago
|
Comment 14•4 months ago
|
||
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/e6cb1e4a67da
Apply full-body filters to EWS messages upon download. r=babolivier
| Assignee | ||
Comment 15•4 months ago
|
||
| Assignee | ||
Updated•4 months ago
|
Comment 16•4 months ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/e994959257d2
Remove unused param from IEwsFolder.handleDownloadedMessages(). r=mkmelin
Updated•3 months ago
|
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
Description
•