Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > IMAP4 SEARCH question

Reply
Thread Tools

IMAP4 SEARCH question

 
 
Laszlo Nagy
Guest
Posts: n/a
 
      12-08-2006
Hi,

I'm using imaplib to access an IMAP4 server. I'm reading the IMAP4
specification, and I found something odd. The search command can be
used in conjuction with date values. For example, I would like to search
for messages that are older than 30 days. However, the IMAP4 specs does
not define date/time type(s). Here is a link:

http://tools.ietf.org/html/rfc3501#page-16

As you can see, there are some types: NIL, Number, String and
Parenthesized List. So how do I specify a date? If it is encapsulated in
a string, then what format should I use? The the RFC contains an example:

http://tools.ietf.org/html/rfc3501#page-49

BEFORE <date>
Messages whose internal date (disregarding time and timezone)
is earlier than the specified date.

Example: C: A282 SEARCH FLAGGED SINCE 1-Feb-1994 NOT FROM "Smith"
S: * SEARCH 2 84 882


But of course I cannot tell what is the date format. I would like to use
ISO8601 if possible. It is easy (at least from python) and it is well
standardized. But will the IMAP4 server understand it? Okay, I know that
I can try this with my IMAP server. But how strange it is that the RFC
does not define the accepted date formats? Will my program work with any
IMAP server? If any of you have experience with this, please respond.

(I'm sorry, I know it is not strictly related to Python, it is more
likely an RFC/IMAP question.)

Best,

Laszlo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: IMAP4 SEARCH question Laszlo Nagy Python 0 12-08-2006 04:27 PM
IMAP4 search with special characters Luis Corrales Python 0 07-21-2006 07:51 AM
RE: IMAP4.search by message-id ? Tony Meyer Python 1 03-31-2005 08:56 PM
IMAP4.search by message-id ? Max M Python 2 03-30-2005 08:08 AM
Free pop3 or IMAP4 control? John Dalberg ASP .Net 2 09-01-2004 06:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57