From: Andrew B. <an...@cs...> - 2006-12-12 23:29:14
|
Hi, I'm trying to use fetchmail 6.3.5 to grab mail off a Dovecot IMAP server, and I want it to use IDLE. This works fine if I keep receiving the occasional email, however after 30 minutes of idling with no activity dovecot closes the connection and exits. According to the IDLE RFC, this is correct: > The server MAY consider a client inactive if it has an IDLE command > running, and if such a server has an inactivity timeout it MAY log > the client off implicitly at the end of its timeout period. Because > of that, clients using IDLE are advised to terminate the IDLE and > re-issue it at least every 29 minutes to avoid being logged off. > This still allows a client to receive immediate mailbox updates even > though it need only "poll" at half hour intervals. I've had a quick look in the fetchmail source, and there is some code there that claims to do something after 28 minutes, but it doesn't appear to be working. Here is the syslog output of fetchmail running, that shows the socket being closed 30 minutes after fetchmail last said anything: Dec 10 16:24:30 zarquon fetchmail[28439]: IMAP> A0013 IDLE Dec 10 16:24:31 zarquon fetchmail[28439]: IMAP< + idling Dec 10 16:26:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:28:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:30:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:32:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:34:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:36:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:38:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:40:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:42:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:44:31 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:46:32 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:48:32 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:50:32 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:52:32 zarquon fetchmail[28439]: IMAP< * OK Still here Dec 10 16:54:32 zarquon fetchmail[28439]: re-poll failed Dec 10 16:54:32 zarquon fetchmail[28439]: socket error while fetching from an...@im... The contents of my .fetchmailrc are (I am using an SSH tunnel): > set no bouncemail > set syslog > set no showdots > > poll imap.cse.unsw.edu.au > protocol imap > preauth ssh > plugin "ssh -T cse-imap" > idle > no rewrite > fetchall The other info asked for in the FAQ about reporting bugs follows: > Your operating system. Linux-2.6.18-1.2849.fc6 > Your compiler version, if you built from source gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30) > A copy of your POP or IMAP server's greeting line. * PREAUTH [CAPABILITY IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as andrewb > The name and version of the SMTP listener or MDA you are forwarding to. sendmail 8.13.8-2 (I don't think this is relevant) > Any command-line options you used. In the example, -Nvvv, but I normally run with -d 900, and it also happens then. > The output of fetchmail -V called with whatever other command-line options you used. See attached. Regards, Andrew |