Skip to content

IMAP Idle Timeout #176

@PeteSL

Description

@PeteSL

Is your feature request related to a problem? Please describe.
Some IMAP servers (Exchange Online/Office 365/Microsoft 365 definitely) quit pushing notifications after a period of time. The RFC for IMAP Idle states "clients using IDLE are advised to terminate IDLE and reissue it at least every 29 minutes to avoid being logged off." It has been recommended elsewhere that this should be adjustable down to every 10 minutes if so desired (and O365 seems like it needs it that rapidly).

Describe the solution you'd like
Currently, handleIdle ignores a socket receive timeout and simply goes back to listening. Instead, it should abort and reissue the IDLE command. If there are errors, they can be handled by the application.

Describe alternatives you've considered
Add mail.imap.idletimeout which will set an underlying timer to interrupt the readResponse to get it to reissue the IDLE command.

Additional context
Preference is to simply reissue the IDLE command (after aborting it) upon a socket receive timeout since that does not involve any extra threads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions