21 Configuring IMAP IDLE

Topics:

Benefits of Using IMAP IDLE

The IMAP IDLE extension to the IMAP specification, defined in RFC 2177, allows an IMAP server to notify the mail client when new messages arrive and other updates take place in a user's mailbox. The IMAP IDLE feature has the following benefits:

  • Mail clients do not have to poll the IMAP server for incoming messages. Eliminating client polling reduces the workload on the IMAP server and enhances the server's performance. Client polling is most wasteful when a user receives few or no messages; the client continues to poll at the configured interval, typically every 5 or 10 minutes.

  • A mail client displays a new message to the user much closer to the actual time it arrives in the user's mailbox. A change in message status is also displayed in near-realtime. The IMAP server does not have to wait for the next IMAP polling message before it can notify the client of a new or updated mail message. Instead, the IMAP server receives a notification as soon as a new message arrives or a message changes status. The server then notifies the client through the IMAP protocol.

Configuring IMAP IDLE with ENS in Unified Configuration

IMAP IDLE with ENS has the following default behavior:

  • ENS is enabled by default. The initial configuration sets the ens.enable option to 1.

  • Every message store has its own enpd server.

  • The imapd process, store delivery channels, and store utilities report changes to the enpd server on the local store.

  • Some additional configuration is helpful for improved security, HA, and flag updates, as explained in "To Configure IMAP IDLE with ENS."

  • IMAP IDLE does not require that events be aggregated to a single enpd server and the IDLE event distribution is more efficient if each store uses its own enpd server.

Prerequisites for Configuring IMAP IDLE with ENS

Make sure ENS is enabled by setting the ens.enable option to 1:

msconfig set ens.enable 1

To Configure IMAP IDLE with ENS

  1. Configure the enpd server to allow (or restrict) connections only from the hosts running the message stores by configuring the ens.domainallowed and ens.domainnotallowed options as necessary. For example, the following command allows access to the local host only:

    msconfig set ens.domainallowed enpd:127.0.0.1
    

    The following command allows access to the local host and all IP addresses 192.168.0.* except 192.168.0.17:

    msconfig set ens.domainallowed '"enpd:192.168.0.0/255.255.255.0,127.0.0.1 EXCEPT 192.168.0.17"'
    

    These options work the same way as the equivalent options for POP, IMAP, and HTTP. These options replace the functionality of the ENS_ACCESS environment variable that was included in the legacy ENS server.

  2. Stop, then restart Oracle Communications Messaging Server.

    cd /opt/sun/comms/messaging/bin
    stop-msg
    start-msg
    
  3. Verify that the IMAP services now include the IDLE feature. Use telnet to connect to the IMAP host and port.

    telnet <IMAP_hostname> <port>
    

    Example:

    telnet myhost imap
    trying 192.18.01.44 ...
    connected to myhost.example.com
    * OK [CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS
    CHILDREN BINARY UNSELECT SORT LANGUAGE STARTTLS IDLE XSENDER X-NETSCAPE
    XSERVERINFO X-SUN-SORT X-SUN-IMAP X-ANNOTATEMORE AUTH=PLAIN]
    myhost.example.com IMAP4 service (Oracle Communications Messaging Server 7u5-4.07 64bit (built Mar 21 2012)
    

To Disable IMAP IDLE

  • To disable IMAP IDLE, set the ens.enable option to 0 (default is 1). For example:

    msconfig set ens.enable 0