James

 
 
The Java Apache Mail Enterprise Server (a.k.a. James) is a 100% pure Java SMTP and POP3 Mail server and NNTP News server designed to be a complete and portable enterprise mail engine solution. James is based on currently available open protocols.

Apache James is released under the Apache Software License, Version 1.1.

More information about Apache James can be found at: http://james.apache.org/

The latest Apache James version can be downloaded from: http://james.apache.org/download.cgi







Installing James 2.2.0



Information
none

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Java 2 Standard Edition (J2SE) SDK, version 1.3 or higher.

Note: If J2SE SDK 1.4.x is installed, please remove xerces.jar from Phoenix's lib dir. This is because J2SE SDK 1.4.x comes with xerces, and Phoenix may object to two versions in the classpath.

Procedure
  1. Download and unzip james-2.2.0.zip
    e.g.: C:\Tools\james-2.2.0

  2. Start James, enter command:

    C:\Tools\james-2.2.0\bin\run.bat

    You should see:

    Using PHOENIX_HOME: C:\Tools\james-2.2.0
    Using PHOENIX_TMPDIR: C:\Tools\james-2.2.0\temp
    Using JAVA_HOME: C:\Tools\java\j2sdk1.4.2_01

    Phoenix 4.0.1

    James 2.2.0
    Remote Manager Service started plain:4555
    POP3 Service started plain:110
    SMTP Service started plain:25
    NNTP Service started plain:119
    Fetch POP Disabled
    FetchMail Disabled


  3. If James is started for the very first time, it unpacks the contents of the C:\Tools\james-2.2.0\apps\james.sar file and creates directory C:\Tools\james-2.2.0\apps\james

  4. Make the following changes in the C:\Tools\james-2.2.0\apps\james\SAR-INF\config.xml file:

    • Change the Remote Manager Service administrator account.

      The default login/password for the Remote Manager Service is root/root.
      For security reasons change this:

      <administrator_accounts>
         <account login="jamesroot" password="jamesmysecret"/>
      <administrator_accounts>

    • Set email services for a particular domain.

      If you want James to provide email services for a particular domain, for example mobilefish.com, add the following:

      <servernames autodetect="true" autodetectIP="true">
         <servername>localhost</servername>
         <servername>mobilefish.com</servername>
      </servernames>


    • Enter the ip address of your DNS server.

      <dnsserver>
         <servers>
            <server>192.168.1.254</server>
         </servers>
         <autodiscover>false</autodiscover>
         <authoritative>false</authoritative>
      </dnsserver>


      To find the DNS server, type:
      ipconfig /all

      you should see:
      DNS-servers . . . . . . . . . . . : 192.168.1.254

      Note:
      If you have installed James on an development environment and you have not setup your own DNS server you can do the following:

      • Open your hosts file: C:\WINDOWS\system32\drivers\etc\hosts

      • Add the following lines:

        127.0.0.1 smtp.mobilefish.com
        127.0.0.1 pop.mobilefish.com

      Now you can still send out email to any address.
      However you can only receive email if it is send and received from within the mobilefish.com domain.
      See guide Setup mail client to communicate with James SMTP server.

  5. Access the Remote Administration Tool: telnet to port 4555:

    telnet 127.0.0.1 4555

    You should see:
    JAMES Remote Administration Tool 2.2.0
    Please enter your login and password
    Login id:
    jamesroot
    Password:
    jamesmysecret

  6. Once logged in, you should see:
    Welcome root. HELP for a list of commands

    Note: If you type help, you will get the following list of commands:

    command Description
    help Display this help.
    listusers Display existing accounts
    countusers Display the number of existing accounts.
    adduser [username] [password] Add a new user.
    verify [username] Verify if specified user exist.
    deluser [username] Delete existing user.
    setpassword [username] [password] Sets a user's password.
    setalias [user] [alias] Locally forwards all email for 'user' to 'alias'
    showalias [username] Shows a user's current email alias
    unsetalias [user] Unsets an alias for 'user'.
    setforwarding [username] [emailaddress] Forwards a user's email to another email address.
    showforwarding [username] Shows a user's current email forwarding.
    unsetforwarding [username] Removes a forward.
    user [repositoryname] Change to another user repository.
    shutdown Kills the current JVM (convenient when James is run as a daemon).
    quit Close connection.




  7. Add the following users mailboxes, type:

    adduser johndoe johnsecret
    adduser joesmoe joesecret
    adduser bugzilla bugzillasecret

  8. Close the telnet connection, type:

    quit

  9. To setup James as a windows service:
    C:\Tools\james-2.2.0\bin>wrapper -i ..\conf\wrapper.conf

    you should see:
    wrapper | James Mail Server 2.1 installed.

    To remove James as a windows service:
    C:\Tools\james-2.2.0\bin>wrapper -r ..\conf\wrapper.conf

    you should see:
    wrapper | James Mail Server 2.1 removed.

    Note: To get more information about the wrapper command, type: C:\Tools\james-2.2.0\bin>wrapper

  10. To stop James, press CTRL+C.