Files
husk-milter/e2e-tests/tests/70_mail_split.sh
T
Malte Meiboom 8b2f284916 Improve e2e tests
- Add a test for mail splitting.
- Cleanup the code, move common functionality into `common.sh`.
- Reduce noise in the test output.
2026-07-09 12:55:10 +02:00

25 lines
433 B
Bash

#!/usr/bin/bash
# source some functions
. common.sh
test_header "Mail split"
create_unix_user karl
KARL_FPR=$(gen_cert karl@example.com)
authenticate $KARL_FPR
create_unix_user laura
echo -e "To: karl@example.com, Laura <laura@example.com>\nSubject: Testmail\n\nTestmail." | sendmail -t
sleep 1
R=1
if [ $(expect_mail karl encrypted) == 0 ] ; then
if [ $(expect_mail laura unencrypted) == 0 ] ; then
R=0
fi
fi
exit $R