Sun Java System Messaging Server 6.3 Administration Guide

ProcedureTo Configure IMAP IDLE

  1. Configure the enpd server to accept connections only from the hosts running the message stores.

    To restrict connections to message-store hosts, set the ENS_ACCESS environment variable. The environment variable sets a list of permissions allowing access to enpd. The syntax is as follows:


    setenv ENS_ACCESS 'allowdeny ipaddress|mask;
    allowdeny ipaddress|mask; ...' 

    where

    allowdeny

    Can be either + (to specify allow) or — (to specify deny)

    ipaddress

    Specifies a dotted-decimal IP address

    mask

    Specifies a dotted-decimal IP address mask

    Examples:

    The following example allows access to the local host only:


    setenv ENS_ACCESS '+127.0.0.1|255.255.255.255'

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


    setenv ENS_ACCESS '+192.168.0.1|255.255.255.0;+127.0.0.1|255.255.255.255; \
    -192.168.0.17;255.255.255.255'
  2. Run the configutil utility to specify the name of the host where the ENS server is running.


    cd msg-svr-base
    ./configutil -o local.store.notifyplugin.enshost -v "ipaddress"

    where ipaddress specifies a dotted-decimal IP address of the ENS host machine.

    Example:


    cd msg-svr-base
    ./configutil -o local.store.notifyplugin.enshost -v "127.0.0.1"
  3. Specify the event key to use for notifications.

    If the ENS event key (ensEventKey) is set to its default value, IMAP IDLE does not operate.

    You must configure the ensEventKey value to end with %M. The string %M is a substitution code that is replaced by the name of the mailbox in which the event occurred.

    Run the following configutil command:


    ./configutil -o local.store.notifyplugin.enseventkey -v "eventkey"

    where eventkey is a unique identifier used by ENS. Its default value is enp://127.0.0.1/store. The host-name portion of the event key is not used to determine the host where ENS is running; it is simply part of the identifier.

    Example:


    ./configutil -o local.store.notifyplugin.enseventkey -v "enp://127.0.0.1/store/%M"
  4. Load the libibiff notification plug-in file, which enables the ENS publisher for Messaging Server.

    Run the following configutil command:


    ./configutil -o local.store.notifyplugin -v "msg-svr-base/lib/libibiff"
  5. Enable notifications to be sent from all user mailboxes, not only the inbox.

    By default, notifications are generated only by events that occur in the inbox. However, the IMAP IDLE RFC (2177) specifies that IDLE must notify clients whenever an event occurs in any mailbox.

    To comply with the RFC, the IMAP IDLE feature requires that notifications be enabled for all mailboxes. If they are not, the IMAP server will not advertise the IDLE capability.

    To configure notifications for all mailboxes, set the configutil command, noneinbox, to a value of 1:


    ./configutil -o local.store.notifyplugin.noneinbox.enable -v 1

    where -v 1 enables notifications from all mailboxes.

  6. Stop, then restart Messaging Server.


    cd msg-svr-base/sbin
    
    ./stop-msg
    
    ./start-msg
  7. 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.siroe.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.siroe.com IMAP4 service (Sun Java(tm) System 
    Messaging Server 6.3-0.05 (built Feb 7 2006))