IMAP4 IDLE does not work. imapd_index == NULL ?
Bron Gondwana
brong at fastmail.fm
Wed Feb 4 06:10:27 EST 2015
Sure, you have to select a mailbox if you want to IDLE on it. If you have selected a mailbox, then imapd_index is that mailbox.
Bron.
On Tue, Feb 3, 2015, at 06:36 PM, Bernhard T wrote:
> Hi,
>
> I've some very annoying bit of a problem with the cyrus imapd server and
> hope that someone here has a good grasp on it's internals and can tell
> me what's going on, confirm it's a bug, a matter lacking documentation
> or something else entirely. I'm currently out of ideas (and freedom to
> spend more time on this).
>
> Thanks!
>
>
> Problem:
> The IMAP4 IDLE Command does not work as expected.
> I.e.
> - The cyrus imapd server advertised the IDLE CAPABILITY
> - after sending IDLE it responds with "idling"
> - when I send an e-mail to myself I see the e-mail arrive and being
> filed in /var/log/mail.log
> - but imapd does not ever notify me about the new e-mail. (rather my
> client times out and recheck after >10 minutes)
>
> Version: Cyrus IMAP v2.4.16-Debian-2.4.16-4+deb7u2
> (which is the currently latest stable Debian Package)
>
> I spent quite a few hours debugging this problem and learned the following:
>
> 1. I tried disabling idled and rely on just imapd's polling setting.
> - I disabled idle in cyrus.conf
> - i deleted the stale/remaining socket file idlesocket:
> /var/run/cyrus/socket/idle
> - I set imapidlepoll: 30
>
> Still nothing happened, imapd never did notify me about my incoming test
> messages.
>
> 2. I re-enabled idled and set CYRUS_VERBOSE=1
> - verified that idled was working, socket was reachable, permissions ok
>
>
> On connection to the imapd and start of any IDLE session, mail.log would
> contain:
>
> <logdate> mail cyrus/idled[1477]: imapd[1524]: IDLE_INIT '.'
>
>
> On receipt of a new e-mail, mail.log would contain:
>
> <logdate> mail cyrus/idled[1477]: IDLE_NOTIFY 'user.xyz'
> <logdate> mail cyrus/idled[1477]: IDLE_NOTIFY 'user.uvw'
>
>
> After playing around with strace, I discovered that idled was being
> correctly notified about mailbox updates,
> but DID NOT send signals to the idling imapd instances.
>
>
> 3. I had a look at idled.c and imapd.c from the latest stable sources.
>
> After glancing over the code, it seems obvious that idled will only
> notify those instances of imapd
> about a mailbox update that have registered themselves for that very
> mailbox.
> i.e. the logmessage
> IDLE_INIT '.'
> should have read
> IDLE_INIT 'user.xyz'
>
> Since it did not, idled does not feel any imapd has registered for
> updates to that mailbox thus we do not the signals.
>
> Why is that ?
>
> It seems that imapd purposefully DOES NOT send its mailbox name to
> idled, if the test "if(imapd_index)" fails.
>
> This is where I stopped browsing the code and tried to rebuild / recover
> the index in case it became corrupted by the recent debian distribution
> upgrade.
> I tried running squatter and recover -r user.xyz serveral times as well
> as restarted cyrus, but to no avail.
>
>
> 4. Looking to the Maillinglist for Help
>
> .. any ideas or help is appreciated. :-)
>
> config files attached.
>
>
>
>
>
>
> Email had 2 attachments:
> + imapd.conf
> 13k (text/plain)
> + cyrus.conf
> 5k (text/plain)
--
Bron Gondwana
brong at fastmail.fm
More information about the Cyrus-devel
mailing list