In order to get James to do something useful, you need to edit the configuration file. This file is $JAMES_HOME/apps/james/SAR-INF/config.xml. You can view the default James configuration file here. To edit this file I used NetBeans, since it has good XML editing features. It has drop-down menus which make it easy to find sub-tags in XML. In this post I use notation for XML tags like this: root/tag/sub-tag/sub-sub-tag.
First, you need to put in the IP address of your DNS servers. On a Unix or Linux machine, you can get this information by looking at /etc/resolf.conf. Put the IP addresses in the config/dnsserver/servers tag, with a “server” tag for each IP address. This will be at lines 758-765 in the default config.xml file.
Next, type the domain names you want James to handle. As far as I know, even if you type in two different domains, like “daydomain.com” and “nightdomain.com”, then any user accounts you put into James will be for both domains. So firstname.lastname@example.org will be the same user as email@example.com. Put the domains in the config/James/servernames section, with a servername for each domain. This will be lines 54-57 in the default config file.
It is also a good idea to change the password (and maybe the username as well) for the Remote Manager. This is a utility that James uses to manage users. User information can be stored in the database, but so far the documentation for that is not very good. To use Remote Manager, you must log into the server upon which James is running, and telnet to the port specified at config/remotemanager/port, which is line 778 in the default config file. The username and password information is at config/remotemanager/handler/administrator_accounts section, which is at lines 795-799 in the default config file. You may also want to change the server name in the config/remotemanager/handler/helloName section to match what you entered in the config/James/servernames/servername section, but I do not think this is necessary.
It is also good to change the postmaster address, which is line 35 in the default config file, at config/James/postmaster.
Upload the file, restart James, add some users, and you are ready to go.
2009-02-16 00:24:07 Monday CST -0600
Image from The Codex of Fernando I and Doña Sancha, aka Beatus of Liébana, an 11th century manuscript manuscript of ‘Commentary on the Apocalypse‘, written in the 8th century by Beatus of Liébana; manuscript created at monastery of Santo Toribio de Liébana (Wikipedia page here), currently housed at the National Library of Spain; manuscript information here. Image from World Document Library, licensed under CC BY-NC-SA 4.0.