Timeout for IMAP idle

Carlos Velasco carlos.velasco at nimastelecom.com
Thu Jul 28 11:16:03 EDT 2016


El 28/07/2016 a las 17:05, Thomas Jarosch via Cyrus-devel escribió:
> On Thursday, 28. July 2016 16:48:51 Sebastian Hagedorn wrote:
>> According to the RFC, clients need to "renew" the IDLE state at least
>> every 30 minutes. I would assume that the clients you see are doing that.
>> If not, you might see a different issue.
>
> I tested it a few days ago: Connected to imapd on a unix socket
> and started the IDLE command.
>
> -> the session was still running today :)
>
> There is no server side timeout in cyrus imapd.

AFAIK there are 2 different idle implementations in cyrus imapd.
An "internal" one ("idle polling") and a "daemon" one (idled).
I don't know really what are the differences between them.

I use "idled" daemon, enabled in cyrus.conf

Looking into idled.c from v2.5.8 there is a timeout:

     /* Set inactivity timer (convert from minutes to seconds) */
     idle_timeout = config_getint(IMAPOPT_TIMEOUT);
     if (idle_timeout < 30) idle_timeout = 30;
     idle_timeout *= 60;
...
     case IDLE_MSG_NOTIFY:
...
         /* send a message to all clients idling on mboxname */
         t = (struct ientry *) hash_lookup(msg->mboxname, &itable);
         for ( ; t ; t = n) {
             n = t->next;
             if ((t->itime + idle_timeout) < time(NULL)) {
                 /* This process has been idling for longer than the timeout
                  * period, so it probably died.  Remove it from the list.
                  */
                 if (verbose || debugmode)
                     syslog(LOG_DEBUG, "    TIMEOUT %s\n", idle_id_from_addr(&t->remote));

                 remove_ientry(msg->mboxname, &t->remote);
             }
             else { /* signal process to update */


Regards,
Carlos Velasco



More information about the Cyrus-devel mailing list