Closed
Bug 16902
Opened 25 years ago
Closed 23 years ago
Filter/Search mail based on any header
Categories
(MailNews Core :: Backend, defect, P2)
MailNews Core
Backend
Tracking
(Not tracked)
VERIFIED
FIXED
Future
People
(Reporter: phil, Assigned: naving)
References
(Depends on 1 open bug)
Details
(Keywords: helpwanted)
Attachments
(8 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
image/jpeg
|
Details | |
(deleted),
image/jpeg
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
In 4.5 we added the ability to filter mail messages based on "arbitrary
headers". So you could filter on X-Mailer or Resent-From, etc.
We wanted this to work for news too, but I don't think it did. We should fix
that up in mozilla. We can file a separate bug on the news part if that seems
better.
I can't quite find a feature bug on customizable headers (for filtering,
compose, display) but I'll file one and make this bug dependent on it.
Earlier in the year, it was decided not to have arbitrary header filtering or
searching for news in 5.0. Are you changing that decision?
Reporter | ||
Comment 2•25 years ago
|
||
Uh oh. I don't remember that decision. Scott, Sol or David?
Comment 3•25 years ago
|
||
I remember arbitrary headers for news being one of the first cut items we had
back in january when we had those meetings =). I'm pretty sure Phil was there
too.
Reporter | ||
Updated•25 years ago
|
Summary: [FEATURE] Filter mail & news based on any header → [FEATURE] Filter mail based on any header
Reporter | ||
Comment 4•25 years ago
|
||
Ok, I guess I blocked it out. So let's narrow this bug to just mail. I filed
16913 for news.
Reporter | ||
Comment 5•25 years ago
|
||
Fix dependencies
Comment 6•25 years ago
|
||
I can't tell whether this works in 4.7 or not, because the window for entering
new headers on which to filter (Edit|Message Filters|New|Advanced) is not
explained anywhere including Windows Help. Please do not mark this "Fixed"
without documenting how to use the feature.
Reporter | ||
Comment 7•25 years ago
|
||
I'm all for improving the documentation (adding headers is mentioned only
briefly), but this bug is for writing the code, not improving the doc. Doc bugs
on this go to simone@netscape.com
Reporter | ||
Updated•25 years ago
|
Target Milestone: M16
Reporter | ||
Comment 8•25 years ago
|
||
M16
Comment 10•25 years ago
|
||
[FEATURE] bugs past M16 are OUT for this release. Marking M20. If you disagree
with this action, please help me explain it to the PDT.
Target Milestone: M17 → M20
Comment 12•25 years ago
|
||
Can we at least get the really common extra headers? I have about 100 filters
and probably half use Resent-From.
If this is not going to happen, what will happen on upgrading? I assume N6 will
be able to use or upgrade your previous N4 filters, so will the filters be
nuked, stop working, or what?
Comment 13•25 years ago
|
||
adding jglick and alecf to cc list.
Latest filter ui spec (and in the april issues meeting) custom headers for mail
filters is listed as a P2 item.
Is M20 your final answer? (what about custom headers for search -- I haven't
looked for a search bug yet...)
Comment 14•25 years ago
|
||
I think this belongs to alecf now (at least the UI part)...I'll let him make the
final call.
Assignee: mscott → alecf
Comment 15•25 years ago
|
||
yeah, I'm going to make m18 right now, bug hopefully I'll get in for beta2
Priority: P3 → P2
Target Milestone: M20 → M18
Reporter | ||
Comment 16•25 years ago
|
||
I don't think this work is on the exception list that selmer and kmurray gave to
PDT. Is it really a feature?
Comment 17•25 years ago
|
||
nope, it's just an extension to some work I've already done.
Status: NEW → ASSIGNED
Summary: [FEATURE] Filter mail based on any header → Filter mail based on any header
Target Milestone: M18 → M17
Comment 18•24 years ago
|
||
mass moving to M18 and adding nsbeta3 keyword
Keywords: nsbeta3
Target Milestone: M17 → M18
Comment 19•24 years ago
|
||
Are we using this bug for the search messages ui having custom header
capability, too, or do you want search logged separately?
Comment 20•24 years ago
|
||
nope, all the code is shared.
Summary: Filter mail based on any header → Filter/Search mail based on any header
Comment 23•24 years ago
|
||
*** Bug 57935 has been marked as a duplicate of this bug. ***
Comment 24•24 years ago
|
||
*** Bug 57936 has been marked as a duplicate of this bug. ***
Comment 25•24 years ago
|
||
Added mail3 keyword for 6.5 consideration since quite a few reports/comments
seem to be cropping up about custom headers
Keywords: mail3
Comment 26•24 years ago
|
||
adding nsbeta1- keyword. We want to work on some of the more commonly used
features of search and filters before doing this.
Keywords: nsbeta1-
Comment 27•24 years ago
|
||
*** Bug 65338 has been marked as a duplicate of this bug. ***
Updated•24 years ago
|
Keywords: nsbeta3 → mozilla1.0
Whiteboard: [nsbeta3-]
Comment 28•24 years ago
|
||
Think bug 16913 may be a dup
Comment 29•24 years ago
|
||
Gah, sorry. Disregard my last comment.
Comment 30•23 years ago
|
||
*** Bug 90420 has been marked as a duplicate of this bug. ***
Comment 31•23 years ago
|
||
*** Bug 87429 has been marked as a duplicate of this bug. ***
Comment 32•23 years ago
|
||
*** Bug 66779 has been marked as a duplicate of this bug. ***
Comment 33•23 years ago
|
||
*** Bug 94211 has been marked as a duplicate of this bug. ***
Comment 34•23 years ago
|
||
*** Bug 94598 has been marked as a duplicate of this bug. ***
Comment 35•23 years ago
|
||
bienvenu: what's the status here? Is this on any radars? Should it be?
Gerv
Comment 36•23 years ago
|
||
I'm not currently working on this and don't have any near term plans to do so.
I would like to do this at some point, however.
Comment 38•23 years ago
|
||
What would it take to support the filter part?
So imported filters or hand editing the rules
file works? The UI can wait, as long as there
is a way to support the filters in the file.
Most mailing lists use X-BeenThere or X-Loop,
and many use the List-* headers.
Filtering is almost useless without some way
to filter on any header. Most users will have
the filters from NS4 to migrate, of the skill
to edit the rules file, so only the filter engine
is "required", the UI could wait for a UI coder.
Comment 39•23 years ago
|
||
The backend isn't ported from 4.x, so there's both frontend and backend work to
do. The backend work involves both the filters/search code, and the imap/pop3
code. I agree that doing the backend work first makes sense.
Comment 40•23 years ago
|
||
*** Bug 100615 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 41•23 years ago
|
||
I am willing to work on this one if no one else has yet started on it.
Comment 42•23 years ago
|
||
*** Bug 100858 has been marked as a duplicate of this bug. ***
Comment 43•23 years ago
|
||
naving: no-one is working on it to my knowledge, and many people would love you
to work on it :-) There are a number of bugs in our filters UI; you may want to
review those before starting work, because it may well be easy to fix a lot of
them on the way through.
Gerv
Assignee | ||
Comment 45•23 years ago
|
||
We already have the back-end code in place. It was not working. I have
a one liner fix for the problem. I will work on the UI part next.
Status: NEW → ASSIGNED
Assignee | ||
Comment 46•23 years ago
|
||
Assignee | ||
Comment 47•23 years ago
|
||
The fix is to compare the correct part of each header line with the arbitrary
header. I have made it caseInsensitive, can change it if someone has a good
reason not to do so.
Assignee | ||
Comment 48•23 years ago
|
||
david, please review.
Assignee | ||
Comment 49•23 years ago
|
||
I think offset is going to matter when comparing, will attach a new patch.
Assignee | ||
Comment 50•23 years ago
|
||
Assignee | ||
Comment 51•23 years ago
|
||
This is how we parse other headers like To, CC etc, should work fine.
Comment 52•23 years ago
|
||
I think that part of the issue is that the IMAP envelope doesn't give you
anything beyond the standard header, so you need to specifically request it, no?
Assignee | ||
Comment 53•23 years ago
|
||
I did notice that, but didn't know that you will have to specifically
request it for imap. For pop3, it comes by default.
Assignee | ||
Comment 54•23 years ago
|
||
cc jglick, can you point to me the specs for this feature. I have started
with 4x as the base.
Comment 55•23 years ago
|
||
Navin, this what you are looking for?
http://www.mozilla.org/mailnews/specs/filters/#Headers
Would apply to Search as well.
Assignee | ||
Comment 56•23 years ago
|
||
4x is little bit different, it has an advanced button that takes you to the
dialog for adding customized headers. I believe, that is much easier and less
confusing to do because once you have added those headers, they will appear in
the dropDown. They will appear in the same place where we right now see
"Customize headers..." (from specs).
Comment 57•23 years ago
|
||
The new design works similarly, except instead of an "Advanced" button, which
gives the user no indication it is associated with adding headers, they select
"Customize" from the Header selection menu. This opens a dialog which allows
them to create additional Headers. Once created, the new headers will appear in
the Header list (same as 4.x).
Comment 58•23 years ago
|
||
The new UI design is excellent, apart from the fact that it seems to omit a
section for saying exactly what should happen to the message if it's caught by
the filter. On this point, I would add a request:
People often complain about 4.x filters that it's not possible to do (A OR B)
AND (C or D) or similar. The current UI permits only ALL OF/ANY OF (A, B, C). I
think the best way of making simple UI for the generic mechanism is merely to
say, when you are deciding what to do with the passed message, have an option to
pass to another filter, i.e.:
File in [Folder from folder list]
Delete
Mark Read
...
Route to [Filter from filter list]
i.e. permit cascading of filters. This would be a minimal UI increase (one
additional option) but a great increase in functionality.
Gerv
Comment 59•23 years ago
|
||
gerv: complex boolean logic in filters is a completely seperate feature, and
requires a lot of back end support... theres a bug around somewhere, I suggest
tracking it down and adding yourself to the CC.
Comment 60•23 years ago
|
||
I admit I'm not familiar with the internals of the code (perhaps because naving
hasn't written it yet) but I don't understand how this can be so hard.
function checkIfCaughtByFilter(filter) {
...
return (boolean) caught;
}
->
function checkIfCaughtByFilter(filter) {
...
if caught && (userhaschosentopasstoanotherfilter)
return checkIfPassedFilter(filter2)
else
return caught;
}
Gerv
Comment 61•23 years ago
|
||
Alec is suggesting, I believe, that implementing complex boolean filters is the
right way to go, though hard. He was not saying that your approach would be hard.
Comment 62•23 years ago
|
||
Complex boolean filters would be both hard, and hard to do UI for. My idea is
both simple in concept and (probably) execution, and has almost the same level
of power as complex boolean filters.
If no-one is stepping up to implement complex boolean filters, let's get the 95%
case by asking naving to add this while he's working in the code.
Gerv
Comment 63•23 years ago
|
||
I don't think Navin should do this - I don't believe we've agreed that this is a
good thing for the UI, among other things. Did I miss something? I personally
think this UI would be confusing and non-intuitive for users.
Comment 64•23 years ago
|
||
enough! gerv, take this up in a bug that's actually relevant - this bug is about
supporting any header, not complex boolean filters.
Assignee | ||
Comment 65•23 years ago
|
||
ya, this bug is not about complex boolean algebra. Please take it to another
bug.
Assignee | ||
Comment 66•23 years ago
|
||
ok, I have got imap and pop3 working for both search and filters. working
on news...
Assignee | ||
Comment 67•23 years ago
|
||
Assignee | ||
Comment 68•23 years ago
|
||
The fix includes fix for both backend/UI and for pop3 imap (online/offline) and
news offline.
The main thing here was to design the UI and hook-up and make changes to the
backend. The UI is as described in the specs and I will attach the screenshot.
The main part of the fix is to read the pref customheaders and then initialize
the table that contains all the attributes and their corresponding operators
with the custom headers. The XBL widget uses this table and prefs to build up
the searchTerms widget. It maintains a one to one relationship between value ids
and the label. This is needed for loading correct labels when passing
information either from search widget to back-end or vice-versa. Add a special
item "Customize.." to the table, when selected launches the custom headers
add/remove dialog. The "Replace" functionality seems redundant and also does not
work in 4x so I have left it for now.
The backend involves downloading headers in case of imap and we need to
download headers that are used in filters. I have made it so that we can cache
the headers until the user changes the filters and commits the changes. Moved
all the code from imapMiscellaneousSink to imapServerSink. Made changes so
that it work for news offline. Also removed code no longer used.
david and seth, please review.
Assignee | ||
Comment 69•23 years ago
|
||
Assignee | ||
Comment 70•23 years ago
|
||
Comment 71•23 years ago
|
||
These screenshots are of the Search UI - I take it this also applies to Filters,
right?
While you are in the Message Search box, could you take five seconds to clean up
some of its more serious problems? For example, the fact that, by default, the
Results section is only 2 and one half messages high, that it doesn't seem to
remember if you resize the dialog or reposition the splitter, and that the box
with the search criteria in should expand and contract as you click "More" and
"Fewer" rather than starting far too large, and scrolling when you click "More"
enough times? :-)
Gerv
Comment 72•23 years ago
|
||
+// return -1 if no more local lines, length of next line otherwise.*/
shouldn't put that '*/' at the end of this comment
+ if (m_passedHeaders)
+
m_numLocalLines--; // the line count is only for body lines
looks like you left a tab in here
This routine nsMsgFilterList::GetArbitraryHeaders assumes that the caller called
GetShouldDownloadArbitraryHeaders first. That seems like a dangerous assumption
to me. It would be better to combine those routines into one, if you can't
figure out a way of making it so that you have to call GetShould first (or
figure out a way of throwing an assert if the client doesn't do what you've
implicitly decided they will). Or make GetShouldDownloadArbitraryHeaders call
GetArbitraryHeaders itself, so that the result is pre-calculated.
Other than that, the C++ code looks ok. I can't speak for the js.
Comment 73•23 years ago
|
||
out of morbid curiosity, what do the AOL servers do when you ask for individual
header values?
Assignee | ||
Comment 74•23 years ago
|
||
for aol imap servers "search" command is not supported. But it does allow to
download the custom headers which is what we need for filtering. I have patch to
make this work.
Assignee | ||
Comment 75•23 years ago
|
||
Comment 76•23 years ago
|
||
gerv:
>While you are in the Message Search box, could you take five seconds to cleanup
>some of its more serious problems? For example, the fact that, by default, the
>Results section is only 2 and one half messages high, that it doesn't seem to
>remember if you resize the dialog or reposition the splitter
covered in another bug, and beyond the scope of this bug.
>and that the box
>with the search criteria in should expand and contract as you click "More" and
>"Fewer" rather than starting far too large, and scrolling when you click "More"
>enough times? :-)
gerv, is there a bug for this? if not, can you log it?
Comment 77•23 years ago
|
||
> covered in another bug, and beyond the scope of this bug.
I hope he finds five seconds to change the relative flex of the two halves of
the dialog. This alone would be a great improvement, and it's a two character
change.
> gerv, is there a bug for this? if not, can you log it?
Logged as bug 103742 in my alter ego as nobody@mozilla.org.
Gerv
Assignee | ||
Comment 78•23 years ago
|
||
Assignee | ||
Comment 79•23 years ago
|
||
the patch may have"no newline at end" in one or more places, i will fix that
before checking in.
Comment 80•23 years ago
|
||
r=sspitzer
naving gave me a demo, and this will be a big improvement.
and, since we used the same pref as 4.x, migration will work.
remember to remove the unneeded "xmlns:nc="http://home.netscape.com/NC-rdf#"
when you land this, make sure to log a bug with all the known UI issues so we
can get to them later, when we have more time.
Comment 81•23 years ago
|
||
if (headers && m_arbitraryHeaders)
should just be if (headers)
nsMsgSearchAttrib::CustomizeHeaders
should either be
nsMsgSearchAttrib::CustomizedHeaders
or nsMsgSearchAttrib::CustomHeaders
customize is a verb
string getArbitraryHeaders();
boolean getShouldDownloadArbitraryHeaders();
these should be readonly attribute string arbitraryHeaders
and readonly attribute shouldDownloadArbitraryHeaders
Why do we have nsMsgSearchAttrib::OtherHeader
and nsMsgSearchAttrib::CustomizeHeader? Aren't they the same?
Assignee | ||
Comment 82•23 years ago
|
||
Assignee | ||
Comment 83•23 years ago
|
||
May have some other unrelated files in there, will not checkin those.
Comment 84•23 years ago
|
||
Comment on attachment 52852 [details] [diff] [review]
proposed fix, v3
sr=bienvenu (for the changes associated with this bug)
Attachment #52852 -
Flags: superreview+
Comment 85•23 years ago
|
||
navin, can you log a bug with all the known issues?
Assignee | ||
Comment 86•23 years ago
|
||
fix checked in, I will log those issues now, before I forget.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 87•23 years ago
|
||
Feature basically in and functional.
Any specific issues with the custom header feature will be logged separately.
OK using oct29 commercial trunk build: win98, linux rh6.2, mac OS X
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•