DRAFT
Apache James V3 Configuration Tutorial
This was created on November 21, 2010 and is still being confirmed by new users. If this doesn't work for you, please let us know at server-user@james.apache.org .
Requirements
- JRE 1.5+
- root (linux/unix) or Administrator (Windows)
- libc6 (linux)
- 512MB RAM
This page was written to help new users get started using Apache James 3.0-M2 as quickly as possible, using a setup of James with MySQL as a database server.
Download the Apache James 3.0-M2 or a newer release from http://james.apache.org/download.cgi#Apache_James_Server
- Extract the gz or zip file to a local directory (probably the root of your c drive in windows, or /opt/ on linux).
Start bin/run.sh (unix) or bin\run.bat (windows) You will see something like the following:
Basic configuration
- Basic mailserver setting in ./conf/mailserver.xml
- Set the postmaster email address, enable virtual hosting if needed, and set the default domain to your server's domain name.
<mailserver> <postmaster>Postmaster@mydomain.com</postmaster> <enableVirtualHosting> true </enableVirtualHosting> <defaultDomain> mydomain.com </defaultDomain> <helloName autodetect="true">myMailServer</helloName> </mailserver>
Configure DNS server in ./conf/dnsservice.xml (add one <server> entry for each IP). Set autodiscover to false if you want to set the servers this way:
<dnsservice>
<servers>
<server>192.168.178.1</server>
</servers>
<autodiscover>false</autodiscover>
<authoritative>false</authoritative>
<maxcachesize>50000</maxcachesize>
</dnsservice>
Using MySQL instead of Derby
Download the MySQL driver JAR from http://dev.mysql.com/downloads/connector/j/3.1.html, and put the JAR file into your ./conf/lib folder. Change the database settings in ./conf/database.properties to the following values:
# MySQL JDBC database properties database.driverClassName=com.mysql.jdbc.Driver database.url=jdbc:mysql://localhost/james database.username=jamesuser database.password=password_for_jamesuser vendorAdapter.database=MYSQL openjpa.streaming=false
To add the JAR to the classpath, edit ./bin/setenv.sh as shown here:
# Add every needed extra jar to this CLASSPATH_PREFIX=../conf/lib/mysql-connector-java-5.1.13-bin.jar