imap2maildir icon indicating copy to clipboard operation
imap2maildir copied to clipboard

Search criteria problem

Open peterSva opened this issue 10 years ago • 1 comments

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

peterSva avatar Jun 17 '14 17:06 peterSva

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 "[email protected]")'
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.

rtucker avatar Jul 06 '14 20:07 rtucker