How to config and run Apache James Server 3.7.0 on Windows

1.1k Views Asked by At

How to set up and configure Apache James Server 3.7.0 on Windows

1

There are 1 best solutions below

0
cealex On

Step 1: Download

Download Apache James 3.7.0 , JPA James server

Binary (ZIP Format) for the JPA James server: james-server-jpa-guice.zip

https://www.apache.org/dyn/closer.lua/james/server/3.7.0/james-server-jpa-guice.zip

Step 2: Deploy

* Unzip james-server-jpa-guice.zip.
* You should have a folder with 

You should have a folder with

Step 3: Initial configurations

in command line create keystore: 

keytool -genkey -alias james -keyalg RSA -keystore conf/keystore

the password for the keystore should be "james72laBalle" 

you can configure in the conf dir files, between the tags <secret>james72laBalle</secret>
- imapserver.xml
- managesieveserver.xml
- pop3server.xml
- smtpserver.xml

step 4: run the server

java -javaagent:james-server-jpa-app.lib/openjpa-3.2.0.jar -Dworking.directory=.  -Djdk.tls.ephemeralDHKeySize=2048  -Dlogback.configurationFile=conf/logback.xml  -jar james-server-jpa-app.jar

step 5: create the james-cli command file , for adding domains, users ...

 create a command file with the following, note the last chars --> %*
 -------------------------------------------------------------
 @echo off

   java -cp ".;james-server-jpa-app.lib\*;james-server-cli-3.7.0.jar;commons-cli-1.5.0.jar;james-core-3.7.0.jar;slf4j-api-1.7.32.jar;guava-31.0.1-jre.jar;james-server-data-api-3.7.0.jar;james-server-mailbox-jmx-3.7.0.jar;apache-james-mailbox-api-3.7.0.jar;james-server-util-3.7.0.jar;logback-classic-1.2.10.jar;logback-core-1.2.10.jar" org.apache.james.cli.ServerCmd %*

 -------------------------------------------------------------

Add a domain:

 james-cli.cmd AddDomain stack.com

references:

https://james.apache.org/server/quick-start.html