blob: 6b955977688e1cc810c07f8e64d280241b2ff0ae [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<document>
<properties>
<title>Apache James Server 3 - DomainList Configuration</title>
</properties>
<body>
<section name="DomainList Configuration">
<p>Consult <a href="https://github.com/apache/james-project/tree/master/server/app/src/main/resources/domainlist.xml">domainlist.xml</a> in GIT to get some examples and hints.</p>
<p>This configuration block is defined by the <strong>domainlist</strong> tag.</p>
<p>Using Spring, you must specify the DomainList class as attribute of the domainlist tag (org.apache.james.domainlist.jpa.JPADomainList, or org.apache.james.domainlist.xml.XMLDomainList, or...). This have no effect when using Guice.</p>
<p>JAMES-Guice uses a bundled domain list and you don't need to specify class attribute in <strong>domainlist</strong> tag</p>
<dl>
<dt><strong>domainnames</strong></dt>
<dd>Domainnames identifies the DNS namespace served by this instance of James.
These domainnames are used for both matcher/mailet processing and SMTP auth
to determine when a mail is intended for local delivery - Only applicable for XMLDomainList. The entries mentionned here will be created upon start.</dd>
<dt><strong>autodetect</strong></dt>
<dd>true or false - If autodetect is true, James wil attempt to discover its own host name AND
use any explicitly specified servernames.
If autodetect is false, James will use only the specified domainnames. Defaults to false.</dd>
<dt><strong>autodetectIP</strong></dt>
<dd>true or false - If autodetectIP is not false, James will also allow add the IP address for each servername.
The automatic IP detection is to support RFC 2821, Sec 4.1.3, address literals. Defaults to false.</dd>
<dt><strong>read.cache.enable</strong></dt>
<dd>Experimental. Boolean, defaults to false.
Whether or not to cache domainlist.contains calls. Enable a faster execution however writes will take time
to propagate.</dd>
<dt><strong>read.cache.expiracy</strong></dt>
<dd>Experimental. String (duration), defaults to 10 seconds (10s). Supported units are ms, s, m, h, d, w, month, y.
Expiracy of the cache. Longer means less reads are performed to the backend but writes will take longer to propagate.
Low values (a few seconds) are advised.</dd>
<dt><strong>defaultDomain</strong></dt>
<dd>Set the default domain which will be used if an email is send to a recipient without a domain part.
If not defaultdomain is set the first domain of the DomainList get used. If the default is not yet contained by the Domain List, the domain will be created upon start.</dd>
</dl>
<p>Please note that you can expose the <b>DOMAIN</b> variable to create a domain upon start without requiring further configuration.</p>
<p>To override autodetected domainames names simply add explicit domainname elements.
In most cases this will be necessary. By default, the domainname 'localhost' is specified. This can be removed, if required.</p>
<p>Warning: If you are using fetchmail it is important to include the
fetched domains in the server name list to prevent looping.</p>
</section>
</body>
</document>