You could go through following steps to install and configure JAMES mail server.
1. Download Apache JAMES from http://james.apache.org/download.cgi.
2. Unzip the downloaded directory and go to bin folder and execute the run.sh (When using Linux/mac)
3. Remember to execute the script from the root as below, else you might run into permission denied exceptions.
sudo -E ./run.sh
Note: -E (preserve environment) option will preserve JAVA_HOME variable. (Else you might end up with JAVA_HOME not set error)
4. Once the script is executed, you will be provided with following .
Uncomment below line.
(Note: If you need to set up a different domain, you need to set domain name at <servername></servername> , and add the relevant DNS servers at above)
6. Open another tab in command prompt and type below command.
telnet localhost 4555
Note: You need to run the script run.sh before this step and do not close it.
7. Now you will be provided with following interface.
Log in with root/root credentials, and you can use adduser command(adduser username password) to add a new user under localhost.
8. Now you can create an email address as emma@localhost(to receive mails on port 25) and test you email functionalities. Once you send an email, following path will contain the mail object JAMES dir/apps/james/var/mail/inbox/emma . To view the email been sent, setup an email client such as mozilla thunderbird. You could refer to http://kb.site5.com/email/email-software/mozilla-thunderbird/thunderbird-how-to-save-or-remove-emails-from-the-server/