What is the Apache James MTP?

Apache James Mail Protocol Tester (MTP) is a library providing a framework for the scritable functional testing of ASCII based line protocols.

This contains a lightweight scripting framework suitable for the functional testing of the ASCII line based protocols common in mail. A script contains a list of client requests and templated server responses. The framework runs the client lines against a host system and then compares the server lines received in response against the template responses.

Development Interface

This module contains an executable interface useful when developing scripts. The application ships as a self-contained executable jar. To run:

java -jar apache-james-mtp-app-version.jar


 -f,--file <file>         run this script
 -h,--host <host>         runs against this host (defaults to localhost)
 -p,--port <port>         runs against this port
 -s,--shabang <shabang>   sets shabang (defaults to empty)
 -v,--verbose             prints lots of logging


Run Single Script

Executes a single script from a file against a given port and host. The host default to localhost. For example, to run the script in file <file> against localhost port <port>:

java -jar apache-james-mtp-app-version.jar -f <file> -p <port>