Distributed James Server — imapserver.xml

Consult this example to get some examples and hints.

The IMAP4 service is controlled by a configuration block in the imap4server.xml. The imap4server tag defines the boundaries of the configuration block. It encloses all the relevant configuration for the IMAP4 server. The behavior of the IMAP4 service is controlled by the attributes and children of this tag.

This tag has an optional boolean attribute - enabled - that defines whether the service is active or not. The value defaults to "true" if not present.

The standard children of the imapserver tag are:

Table 1. imapserver.xml content
Property name explanation

bind

Configure this to bind to a specific inetaddress. This is an optional integer value. This value is the port on which this IMAP4 server is configured to listen. If the tag or value is absent then the service will bind to all network interfaces for the machine If the tag or value is omitted, the value will default to the standard IMAP4 port port 143 is the well-known/IANA registered port for IMAP port 993 is the well-known/IANA registered port for IMAPS ie over SSL/TLS

connectionBacklog

Number of connection backlog of the server (maximum number of queued connection requests)

compress

true or false - Use or don’t use COMPRESS extension. Defaults to false.

maxLineLength

Maximal allowed line-length before a BAD response will get returned to the client This should be set with caution as a to high value can make the server a target for DOS (Denial of Service)!

inMemorySizeLimit

10MB size limit before we will start to stream to a temporary file

plainAuthDisallowed

Whether or not to enable Authentication PLAIN if the connection is not encrypted via SSL or STARTTLS

timeout

Default to 30 minutes. After this time, inactive channels that have not performed read, write, or both operation for a while will be closed. Negative value disable this behaviour.

enableIdle

Default to true. If enabled IDLE commands will generate a server heartbeat on a regular period.

idleTimeInterval

Defaults to 120. Needs to be a strictly positive integer.

idleTimeIntervalUnit

Default to SECONDS. Needs to be a parseable TimeUnit.

disabledCaps

Implemented server capabilities NOT to advertise to the client. Coma separated list. Defaults to no disabled capabilities.

jmxName

The name given to the configuration

tls

Set to true to support STARTTLS or SSL for the Socket. To use this you need to copy sunjce_provider.jar to /path/james/lib directory. To create a new keystore execute: keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore. Please note that each IMAP server exposed on different port can specify its own keystore, independently from any other TLS based protocols.

handler.helloName

This is the name used by the server to identify itself in the IMAP4 protocol. If autodetect is TRUE, the server will discover its own host name and use that in the protocol. If discovery fails, the value of 'localhost' is used. If autodetect is FALSE, James will use the specified value.

connectiontimeout

Connection timeout in seconds

connectionLimit

Set the maximum simultaneous incoming connections for this service

connectionLimitPerIP

Set the maximum simultaneous incoming connections per IP for this service