Sunday, January 27, 2013

Installing James 2.3.2


Installing James 2.3.2


useful link:
http://wiki.apache.org/james/JamesQuickstart
http://jmodalwindow.java.net/manual/dpl/html/mail.server.html#mail.james.postmaster
http://www.ibm.com/developerworks/java/library/j-james1/index.html
http://www.ibm.com/developerworks/java/library/j-james2/index.html


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.
  1. 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
  2. Once logged in, you should see:
    Welcome root. HELP for a list of commands



  1. Add the following users mailboxes, type:

    adduser johndoe johnsecret
    adduser joesmoe joesecret
    adduser bugzilla bugzillasecret
  2. Close the telnet connection, type:

    quit
  3. To setup James as a windows service:
    C:\Tools\james-2.2.0\bin&gt;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&gt;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&gt;wrapper
  4. To stop James, press CTRL+C.