| 1 |
*** Settings *** |
| 2 |
Suite Setup DKIM Signing Setup |
| 3 |
Suite Teardown Rspamd Redis Teardown |
| 4 |
Library ${RSPAMD_TESTDIR}/lib/rspamd.py |
| 5 |
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot |
| 6 |
Variables ${RSPAMD_TESTDIR}/lib/vars.py |
| 7 |
|
| 8 |
*** Variables *** |
| 9 |
${CONFIG} ${RSPAMD_TESTDIR}/configs/dkim_signing/redis.conf |
| 10 |
${MESSAGE} ${RSPAMD_TESTDIR}/messages/dmarc/fail_none.eml |
| 11 |
${REDIS_SCOPE} Suite |
| 12 |
${RSPAMD_SCOPE} Suite |
| 13 |
${RSPAMD_URL_TLD} ${RSPAMD_TESTDIR}/../lua/unit/test_tld.dat |
| 14 |
|
| 15 |
*** Test Cases *** |
| 16 |
TEST SIGNED |
| 17 |
${result} = Scan Message With Rspamc ${MESSAGE} -u [email protected] |
| 18 |
Check Rspamc ${result} DKIM-Signature: |
| 19 |
Should Contain ${result.stdout} DKIM_SIGNED |
| 20 |
|
| 21 |
TEST NOT SIGNED - USERNAME WRONG DOMAIN |
| 22 |
${result} = Scan Message With Rspamc ${MESSAGE} -u [email protected] |
| 23 |
Check Rspamc ${result} DKIM-Signature: inverse=1 |
| 24 |
Should Not Contain ${result.stdout} DKIM_SIGNED |
| 25 |
|
| 26 |
*** Keywords *** |
| 27 |
DKIM Signing Setup |
| 28 |
Rspamd Redis Setup |
| 29 |
Redis HSET TEST_DKIM_SELECTORS cacophony.za.org dkim |
| 30 |
${key} = Get File ${RSPAMD_TESTDIR}/configs/dkim.key |
| 31 |
Redis HSET TEST_DKIM_KEYS dkim.cacophony.za.org ${key} |