mirror of
https://github.com/chillout2k/ExOTA-Milter.git
synced 2025-12-11 01:10:18 +00:00
| .. | ||
| miltertest_conn_reuse_fail_pass.lua | ||
| miltertest_conn_reuse.lua | ||
| miltertest_fail.lua | ||
| miltertest_multiple_tenantid.lua | ||
| miltertest.lua | ||
| policy.json | ||
| README.md | ||
Prepare testing env
First of all, please configure a python virtual environment and install all necessary python packages listed under requirements.txt. Go to the root-directory of this repo and
python3 -m venv venv. venv/bin/activatepip3 install -r requirements.txt
It´s not realy neccessary to configure a fully functional milter-aware MTA to see ExOTA-Milter in action. All you need is
- a binary called
miltertest. Under debian based distros it´s located in theopendkim-toolspackage. - a lua-script for miltertest:
tests/miltertest.lua - an ExOTA-Milter policy JSON-file:
tests/policy.json
Except for the miltertest binary you´ll find all mandatory resources to run a test in this repo.
export LOG_LEVEL=debug
export MILTER_SOCKET=/tmp/exota-milter
export MILTER_POLICY_FILE=tests/policy.json
export MILTER_DKIM_ENABLED=yepp
export MILTER_DKIM_ALIGNMENT_REQUIRED=True
export MILTER_TRUSTED_AUTHSERVID=my-auth-serv-id
export MILTER_X509_ENABLED=yepp
export MILTER_X509_TRUSTED_CN=mail.protection.outlook.com
export MILTER_X509_IP_WHITELIST='127.0.0.1,::1'
export MILTER_ADD_HEADER=yepp
export MILTER_AUTHSERVID=my-auth-serv-id
Shell-1: start ExOTA-Milter
. venv/bin/activate
python3 app/exota-milter.py
Shell-2: execute miltertest
This must be done only once: export MILTER_SOCKET=/tmp/exota-milter
Execute miltertest pointing to the test script written in lua to feed the ExOTA-Milter:
miltertest -v -D socket="${MILTER_SOCKET}" -s tests/miltertest.lua