Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement search for arbitrary fields #20

Closed
camann9 opened this issue Oct 27, 2014 · 11 comments
Closed

Implement search for arbitrary fields #20

camann9 opened this issue Oct 27, 2014 · 11 comments
Assignees
Milestone

Comments

@camann9
Copy link
Contributor

camann9 commented Oct 27, 2014

Currently the search command only supports search on flags. We also want search on other header fields

@camann9 camann9 self-assigned this Oct 27, 2014
@camann9
Copy link
Contributor Author

camann9 commented Oct 27, 2014

SearchKey contains a list of unimplemented search keys. We have to add them to the SearchTermBuilder

@camann9 camann9 added this to the 1.5 milestone Oct 27, 2014
@buildscientist
Copy link
Member

This looks to be related to this http://sourceforge.net/p/greenmail/bugs/4/

@camann9
Copy link
Contributor Author

camann9 commented Nov 2, 2014

It actually is. At some point Marcel implemented search for flags and I recently added support for recipient and sender search. But some other fields can still not be searched. This is going to be included in 1.4.0 as soon as Marcel releases it.
There is also a unit test for this that can be extended as needed to cover additional cases.

@camann9
Copy link
Contributor Author

camann9 commented Nov 9, 2014

@buildmaster Do you want to take this one? Probably it's pretty straightforward except for the logical operations (and/or)

@buildmaster
Copy link

presume that wasn't meant to bring me into the discussion on a repo I know nothing about. @buildscientist I'm presuming that last one was for you.

@buildscientist
Copy link
Member

@buildmaster yes that's correct :)

@camann9 ok I'll see what I can do

@buildscientist
Copy link
Member

Looks like these are the search fields we currently do NOT support:

  • Before
  • Body
  • Larger
  • Not
  • On
  • Or
  • SentBefore
  • SentOn
  • SentSince
  • Since
  • Smaller
  • Subject
  • Text
  • Uid

These were pulled from the TODO comments in SearchKey. I'll cross-reference RFC3501 Section 6.4.4 to verify we're implementing all specified fields.

Most of the work is going to be in SearchTermBuilder and SearchKey (updating that enum). I might look into refactoring ImapSearchTest. Looks like all of the search field related tests are in ImapSearchTest.testSearch().

@camann9
Copy link
Contributor Author

camann9 commented Nov 10, 2014

Ok, Thanks :-) . Only do this if you feel like it, otherwise I'm gonna do it when I come back :-)

@buildscientist
Copy link
Member

Do the date specific search attributes belong in SearchTermBuilder? It's not quite clear to me how we would implement date specific search attributes.

It's not clear to me why anyone would want to do a server side search of email attributes. I'm guessing IMAP is implemented as such because before broadband - downloading headers for all messages in a mailbox was fairly time consuming.

I'll leave this to @camann9 to implement as I'm somewhat confused about how to implement some of these search attributes.

@camann9
Copy link
Contributor Author

camann9 commented Nov 10, 2014

Ok

@marcelmay marcelmay assigned marcelmay and unassigned camann9 Nov 25, 2014
marcelmay added a commit that referenced this issue Aug 5, 2015
Note: Search support is still limited to simple terms - see issue #20
marcelmay added a commit to marcelmay/greenmail that referenced this issue Aug 21, 2015
Note: Search support is still limited to simple terms - see issue greenmail-mail-test#20
@marcelmay marcelmay modified the milestones: 1.6, 1.5 Feb 28, 2016
marcelmay added a commit that referenced this issue Jun 29, 2020
Updated TODOs to reflect currently supported search terms.
@marcelmay marcelmay modified the milestones: 1.6, 1.5.14 Jun 29, 2020
@marcelmay
Copy link
Member

All related issues closed => completed!

marcelmay added a commit that referenced this issue Jul 4, 2020
Updated TODOs to reflect currently supported search terms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants