Imap restrictions?

0 votes
asked Aug 22, 2011 by SanjayN (280 points)
edited Aug 24, 2011

**Lukas, one observation: I am fetching emails from yahoo account and when i debug this scode line:

// search for messages, receive only Unique ids
ImapMessageCollection ids = imap.Search(ImapListFields.UniqueId, imapSearchParameter);

then I found that even though my imapSearchParameter is matching with more no. of emails (I verified it manually), above code line returns only 160 no. of emails. Is there any restriction that yahoo account returns only 160 emails? Please suggest. My imapSearchParameter is for subjects.

The value set is "{OR (OR (OR (SUBJECT Order) (SUBJECT Invoice)) (OR (SUBJECT Receipts) (SUBJECT Receipt))) (OR (OR (SUBJECT Ship) (SUBJECT "Direct Confirmation")) (OR (SUBJECT Tracking) (OR (SUBJECT ordering) (SUBJECT Shipping)))) SINCE 22-Feb-2010 BEFORE 23-Aug-2011 NOT DELETED}".**

Applies to: Rebex Secure Mail
commented Aug 22, 2011 by SanjayN (280 points)
edited Aug 22, 2011

Any updateS?

commented Aug 22, 2011 by Lukas Matyska (55,470 points)
edited Aug 22, 2011

Please note what RFC says about the SUBJECT search:

SUBJECT <string>
Messages that contain the specified string in the envelope structure's SUBJECT field.

In your case, removing condition "Shipping" and "Receipts" can lead to better performance.

But be careful. I tried following search with Gmail, Yahoo! and MS Exchange: I have a mail with subject "Testing mail".

If I was searching "Testing" all servers found the mail.
If I was searching "Test" Gmail didn't find the mail.
If I was searching "sting" only MS Exchange found the mail.

1 Answer

+1 vote
answered Aug 22, 2011 by Lukas Matyska (55,470 points)
edited Aug 24, 2011
 
Best answer

It seems the Yahoo! limits the number of returned IDs to 160 in any text search (SUBJECT, FROM, TO, ...) indeed. I have sent a question to Yahoo! support. I will inform you about their reply here.

commented Aug 22, 2011 by SanjayN (280 points)
edited Aug 22, 2011

It seems that SUBJECT based search is going to give inconsistent results with different mail accounts. I think its better to apply SUBJECT based search criteria manually. Your thoughts.

commented Aug 22, 2011 by Lukas Matyska (55,470 points)
edited Aug 22, 2011

If you can afford to download all mails without applying the SUBJECT criteria it is probably the best solution. But unfortunately this is not possible in all cases.

commented Aug 24, 2011 by SanjayN (280 points)
edited Aug 24, 2011

Any updates from yahoo?

commented Aug 24, 2011 by Lukas Matyska (55,470 points)
edited Aug 24, 2011

No, we received a mail with information that the question was routed to Technical support, but still no response.

commented Aug 24, 2011 by SanjayN (280 points)
edited Aug 24, 2011

ok thanks .

...