Files
husk-milter/e2e-tests/tests/10_basic.sh
T
Malte Meiboom 5fda3924db Add end-to-end Test
- Add an infrastructur to run local e2e tests.
- Add some tests.
2026-01-23 13:56:05 +01:00

19 lines
304 B
Bash

#!/usr/bin/bash
echo "Basic: Test if MTA is working"
adduser --shell /bin/bash --disabled-password --gecos "" mtatest
echo "test mail" | sendmail mtatest@example.com
sleep 1
if [ -f /var/mail/mtatest ] ; then
RESULT_CODE=0
else
RESULT_CODE=1
fi
deluser --remove-home mtatest
exit $RESULT_CODE