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

Search criteria problem #22

Open
peterSva opened this issue Jun 17, 2014 · 1 comment
Open

Search criteria problem #22

peterSva opened this issue Jun 17, 2014 · 1 comment

Comments

@peterSva
Copy link

I try "FROM foo" och "KEYWORD bar" but gets UID errors. Not implemented more-than-one-word search criterias?

(Tried all (?) kinds of quoting to get the second word in, with no success.)

/Peter Svanberg, Sweden

@rtucker
Copy link
Owner

rtucker commented Jul 6, 2014

Hmm, seems to work OK for me, at least directly using simpleimap. Here's a quick test program:

import simpleimap
s = simpleimap.Server(hostname='a', username='b', password='c', port=d)

imap = s.Get()

f = imap.Folder(folder="INBOX.System Mail.Pkg Updates")

count = 0

# pick one
#search = '(to "root@hennepin.rochnyav.sodtech.net")'
search = '(since "05-Jul-2014")'
#search = 'ALL'

print "searching:", search
for uid in f.Uids(search=search):
    print count, uid
    count += 1

This returns, as expected:

$ python repro.py 
searching: (since "05-Jul-2014")
0 1827
1 1828

It's entirely possible that something is eating that along the line, though, since parentheses and quotation marks are terrible from the command line. What's the exact command/configuration you're using (sans passwords, of course)? I can give it a shot here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants