How to setup and run the mail server build the server: mvn install start the server: sudo java -jar target/jbcts-greenmail-1.0-SNAPSHOT-jar-with-dependencies.jar