[imapfilter-devel] IDLE

Lefteris Chatzimparmpas lefcha at hellug.gr
Sat Mar 6 13:35:42 EET 2010


Hello,

It seems that this server is yet another case of non compliance to the
IMAP specification; where continuation requests are a plus character
'+', a space character ' ' and then a string followed by CRLF... This
just sends a '+' followed by CRLF...

I'll try to be less strict and hopefully this won't break anything
else...

L.


On Tue, Mar 02, 2010 at 02:03:38PM -0800, Ivan Bajdarvanov wrote:
> Thanks! This was very fast! The new version works!
> 
> 
> 
> On Tue, Mar 2, 2010 at 12:44 PM, Lefteris Chatzimparmpas
> <lefcha at hellug.gr> wrote:
> > Hello,
> >
> > I think I know what's wrong.  Can you apply the attached patch,
> > recompile and try again? No need to reinstall, the following should
> > work (if you have the necessary libraries installed):
> >
> >  $ tar zxf imapfilter-2.2.2.tar.gz
> >  $ cd imapfilter-2.2.2
> >  $ patch < ~/patch-2.2.2-1.diff
> >  $ make SHAREDIR=.
> >  $ ./imapfilter
> >
> > Thanks
> >
> > L.
> >
> >
> > On Tue, Mar 02, 2010 at 10:54:14AM -0800, Ivan Bajdarvanov wrote:
> >> I am unable to make IDLE work. My code is bellow and also the debug
> >> file shows that the IDLE works. It does receive a response but my Lua
> >> code never executes the lines after
> >>
> >> update = account1.Inbox:enter_idle()
> >>
> >> Eventually it will time out with:
> >>
> >> timeout period expired while waiting to read data
> >>
> >> and only then will proceed with the remaining lines of Lua code. It
> >> prints nul for the print(update).
> >>
> >> I have also tested the IDLE using telnet to the same server/account
> >> from the same machine running imapfilter. The telnet works fine.
> >>
> >> Can you tell me what I am doing wrong?
> >>
> >> Telnet session
> >> ====================
> >>
> >> 3 select INBOX
> >> * 725 EXISTS
> >> * 33 RECENT
> >> * OK [UNSEEN 112] Message 112 is first unseen
> >> * OK [UIDVALIDITY 0] UIDs valid
> >> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
> >> * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
> >> 3 OK [READ-WRITE] SELECT completed
> >> 5 IDLE
> >> +
> >> * 726 EXISTS
> >> * 34 RECENT
> >> * 727 EXISTS
> >> * 34 RECENT
> >> * 728 EXISTS
> >> * 34 RECENT
> >> * 729 EXISTS
> >> * 34 RECENT
> >> * Session timeout, Server signing off
> >>
> >>
> >> Connection to host lost.
> >> ======End Telnet=====================================
> >>
> >>
> >>
> >>
> >> My code
> >> ===================
> >> exist, unread, unseen = account1['Inbox']:check_status()
> >> print ("exist: " ..exist)
> >> print ("unread: " .. unread)
> >> print ("unseen: " .. unseen)
> >> update = account1.Inbox:enter_idle()
> >> print(update)
> >> all = account1['Inbox']:is_new()      ....
> >>
> >> =====END CODE===========
> >>
> >> The debug log shows this:
> >> ==============
> >> log file: 'log'
> >> getting response (5):
> >>
> >> * OK IMAP4rev1 SmarterMail
> >>
> >> sending command (5):
> >>
> >> 1000 NOOP
> >>
> >> getting response (5):
> >>
> >> 1000 OK NOOP completed
> >>
> >> sending command (5):
> >>
> >> 1001 CAPABILITY
> >>
> >> getting response (5):
> >>
> >> * CAPABILITY IMAP4 IDLE IMAP4rev1
> >>
> >> getting response (5):
> >>
> >> 1001 OK CAPABILITY completed
> >>
> >> sending command (5):
> >>
> >> 1002 LOGIN "ivanb at irove.net" *
> >>
> >> getting response (5):
> >>
> >> 1002 OK LOGIN completed
> >>
> >> sending command (5):
> >>
> >> 1003 STATUS "Inbox" (MESSAGES RECENT UNSEEN)
> >>
> >> getting response (5):
> >>
> >> * STATUS Inbox (MESSAGES 728 RECENT 33 UNSEEN 110)
> >>
> >> getting response (5):
> >>
> >> 1003 OK STATUS completed
> >>
> >> sending command (5):
> >>
> >> 1004 SELECT "Inbox"
> >>
> >> getting response (5):
> >>
> >> * 728 EXISTS
> >>
> >> getting response (5):
> >>
> >> * 33 RECENT
> >> * OK [UNSEEN 112] Message 112 is first unseen
> >> * OK [UIDVALIDITY 0] UIDs valid
> >> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
> >> * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)]
> >> 1004 OK [READ-WRITE] SELECT completed
> >>
> >> sending command (5):
> >>
> >> 1005 IDLE
> >>
> >> getting response (5):
> >>
> >> +
> >>
> >> getting response (5):
> >>
> >> * 729 EXISTS
> >>
> >> getting response (5):
> >>
> >> * 34 RECENT
> >> _______________________________________________
> >> Imapfilter-devel mailing list
> >> Imapfilter-devel at lists.hellug.gr
> >> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel
> >


More information about the Imapfilter-devel mailing list