Configure Apache James Server

All configuration files resides in the ./conf and ./conf/META-INF folder.

With default Spring wiring, we ship with default configuration. It gets automatically deployed in the conf folder while unzipping. Of course, you can change the files *.xml the settings to match your needs.

For Guice based wiring, you are encouraged to take a look at default configuration of the James docker images.

Please note that the configuration is dependent of the wiring you have chosen. Some configuration files are specific to some back-ends, to some protocols. Please also note that some configuration files are not required for Guice. In this case, it will be specified.

In every configuration files, you can use the following notation to use an environment variable: ${env:MY_VAR}. If MY_VAR exists, it will be replaced by the matching environment variable. If it does not, ${env:MY_VAR} will be kept as is. If you want to configure a fallback value for the environment variable, you can use ${env:MY_VAR:-fallbackValue}.

You can/must configure James for the following:

Config File Sample Config Area Config Comment
dnsservice.xml DNS Service Configuration
domainlist.xml Domain List Configuration
events.xml Event system Configuration (Spring only)
fetchmail.xml FetchMail Configuration (Spring only)
imapserver.xml IMAP4 Configuration JMAP Configuration (Guice only)
lmtpserver.xml LMTP Configuration
mailrepositorystore.xml Mail Repository Stores Configuration
mailbox.xml Mailbox Configuration (Spring only)
mailetcontainer.xml Mailet Container Configuration
pop3server.xml POP3 Configuration
mailbox.xml Quota Configuration (Spring only)
recipientrewritetable.xml Recipient Rewrite Table Configuration
smtpserver.xml SMTP Configuration
usersrepository.xml Users Configuration WebAdmin Configuration

For most advanced system configuration, you can configure James for the following:

System Config File Sample System Config Area System Config Comment
spring-server.xml System Configuration System Configuration
META-INF/persistence.xml System Configuration
System Configuration See monitoring with log4j section.
sqlResources.xml System Configuration Deprecated

See also more specific configurations related to TLS, Sieve and Antispam.