A suite of mailserver tests based on Swaks - Swiss Army Knife for SMTP.
With this project, testing a new mailserver configuration should be made easier. The repository contains a number of tests that can be configured to connect to the mailserver to test and attempt a series of test cases. Some of them are intended to be rejected by the mail server, others are expected to be received and delivered.
If you are running on Arch Linux, you can install the required tools with:
sudo pacman -S swaks gettextThen follow these steps:
- Enter the
smtp-testsdirectory:cd smtp-tests - Copy the example configuration:
cp vars.example.conf vars.conf
- Edit
vars.confand fill in your mailserver details and credentials. - Run the tests:
bash run.sh
This repository includes a GitHub Action workflow to automate these tests. To make this work, you need to configure your environment in GitHub (Settings > Secrets and variables > Actions):
Add these under the Variables tab for non-sensitive configuration:
MAILSERVER_NAMESENDER_AUTH_USERSENDER_ADDRESS_MAINSENDER_ADDRESS_ALIASSENDER_ADDRESS_MAIN_TAGSENDER_ADDRESS_ALIAS_TAGSENDER_ADDRESS_DENIEDSENDER_ADDRESS_FORGEDSENDER_ADDRESS_FORGED2RECIPIENT_ADDRESS
Add these under the Secrets tab for sensitive data:
SENDER_AUTH_PASSWORD
The list of test cases can be found in the Testcases documentation.