- Add functionality to query online sources (Keyservers, etc) for certificates. - Use introducers to determine which UserIDs should be fetched from online soources. Check certifications before importing certifiactes into the local cert store. - start docker image for local end-to-end testing.
50 lines
1.0 KiB
Bash
50 lines
1.0 KiB
Bash
#!/usr/bin/bash
|
|
|
|
echo "test message" | sendmail -t root@example.com
|
|
sleep 1
|
|
|
|
## simple test if mail passes
|
|
if [ -f /var/mail/root ] ; then
|
|
echo "success"
|
|
rm /var/mail/root
|
|
else
|
|
echo "failure"
|
|
exit 1
|
|
fi
|
|
|
|
## test encryption
|
|
## bob@example.com has an authenticated certificate in
|
|
## the cert store
|
|
echo "test message" | sendmail -t bob@example.com
|
|
sleep 1
|
|
if [ -f /var/mail/bob ] ; then
|
|
if grep -q "BEGIN PGP MESSAGE" /var/mail/bob ; then
|
|
echo "encryption test: success"
|
|
else
|
|
echo "encryption test: failure"
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "failure: mail didn't pass"
|
|
exit 1
|
|
fi
|
|
|
|
## test encryption 2
|
|
## alice@example.com has a certificate in the cert store, but
|
|
## it is not authenticated -> this should fail
|
|
echo "test message" | sendmail -t alice@example.com
|
|
sleep 1
|
|
if [ -f /var/mail/alice ] ; then
|
|
if grep -q "BEGIN PGP MESSAGE" /var/mail/alice ; then
|
|
echo "encryption test 2: failure"
|
|
exit 1
|
|
else
|
|
echo "encryption test 2: success"
|
|
fi
|
|
else
|
|
echo "failure: mail didn't pass"
|
|
exit 1
|
|
fi
|
|
|
|
|