ExOTA-Milter/tests
2021-07-09 09:58:01 +02:00
..
miltertest_conn_reuse_fail_pass.lua Do more cleanup due to connection reusing 2021-07-07 01:41:17 +02:00
miltertest_conn_reuse.lua Do more cleanup due to connection reusing 2021-07-07 01:41:17 +02:00
miltertest_fail.lua Bugfix (#31) + core logging-module + extended debug logging 2021-06-27 11:18:10 +02:00
miltertest_multiple_tenantid.lua https://github.com/chillout2k/ExOTA-Milter/issues/35 2021-07-09 09:58:01 +02:00
miltertest.lua LDAP policy backend 2021-02-21 22:26:16 +01:00
policy.json LDAP policy backend, take 1 2021-01-31 23:26:12 +01:00
README.md DKIM-alignment required per default globally 2021-01-08 17:23:18 +01:00

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

  1. python3 -m venv venv
  2. . venv/bin/activate
  3. pip3 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 the opendkim-tools package.
  • 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