diff options
author | Andrew Lewis <nerf@judo.za.org> | 2020-09-07 15:14:22 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2020-09-07 15:14:22 +0200 |
commit | c07cb6a8c4f45d0cf35baacf539d5c78145fe1de (patch) | |
tree | b67b987e045203d927aa87c1982dc43ea6fda5e6 /test/functional/cases/117_spf.robot | |
parent | 27ad207da620685499aa04c8e9c7d4e4eafa11dc (diff) | |
download | rspamd-c07cb6a8c4f45d0cf35baacf539d5c78145fe1de.tar.gz rspamd-c07cb6a8c4f45d0cf35baacf539d5c78145fe1de.zip |
[Test] Use HTTP & simplified test style
Diffstat (limited to 'test/functional/cases/117_spf.robot')
-rw-r--r-- | test/functional/cases/117_spf.robot | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/test/functional/cases/117_spf.robot b/test/functional/cases/117_spf.robot index 08733471b..245c9c593 100644 --- a/test/functional/cases/117_spf.robot +++ b/test/functional/cases/117_spf.robot @@ -12,129 +12,129 @@ ${URL_TLD} ${TESTDIR}/../../contrib/publicsuffix/effective_tld_names.dat *** Test Cases *** SPF FAIL UNRESOLVEABLE INCLUDE - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 37.48.67.26 -F x@fail3.org.org.za - Check Rspamc ${result} R_SPF_FAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=37.48.67.26 From=x@fail3.org.org.za + Expect Symbol R_SPF_FAIL SPF DNSFAIL FAILED INCLUDE UNALIGNED - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail2.org.org.za - Check Rspamc ${result} R_SPF_DNSFAIL - Should Contain ${result.stdout} DMARC_POLICY_SOFTFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail2.org.org.za + Expect Symbol R_SPF_DNSFAIL + Expect Symbol DMARC_POLICY_SOFTFAIL SPF ALLOW UNRESOLVEABLE INCLUDE - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail3.org.org.za - Check Rspamc ${result} R_SPF_ALLOW + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail3.org.org.za + Expect Symbol R_SPF_ALLOW SPF ALLOW FAILED INCLUDE - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.4.4 -F x@fail2.org.org.za - Check Rspamc ${result} R_SPF_ALLOW + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.4.4 From=x@fail2.org.org.za + Expect Symbol R_SPF_ALLOW SPF NA NA - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@za - Check Rspamc ${result} R_SPF_NA + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@za + Expect Symbol R_SPF_NA SPF NA NOREC - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@co.za - Check Rspamc ${result} R_SPF_NA + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@co.za + Expect Symbol R_SPF_NA SPF NA NXDOMAIN - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@zzzzaaaa - Check Rspamc ${result} R_SPF_NA + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@zzzzaaaa + Expect Symbol R_SPF_NA SPF PERMFAIL UNRESOLVEABLE REDIRECT - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail4.org.org.za - Check Rspamc ${result} R_SPF_PERMFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail4.org.org.za + Expect Symbol R_SPF_PERMFAIL SPF REDIRECT NO USEABLE ELEMENTS - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail10.org.org.za - Check Rspamc ${result} R_SPF_PERMFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail10.org.org.za + Expect Symbol R_SPF_PERMFAIL SPF DNSFAIL FAILED REDIRECT - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail1.org.org.za - Check Rspamc ${result} R_SPF_DNSFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail1.org.org.za + Expect Symbol R_SPF_DNSFAIL SPF PERMFAIL NO USEABLE ELEMENTS - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail5.org.org.za - Check Rspamc ${result} R_SPF_PERMFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail5.org.org.za + Expect Symbol R_SPF_PERMFAIL SPF FAIL - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@example.net - Check Rspamc ${result} R_SPF_FAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@example.net + Expect Symbol R_SPF_FAIL SPF FAIL UNRESOLVEABLE MX - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 1.2.3.4 -F x@fail6.org.org.za - Check Rspamc ${result} R_SPF_FAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=1.2.3.4 From=x@fail6.org.org.za + Expect Symbol R_SPF_FAIL SPF FAIL UNRESOLVEABLE A - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 1.2.3.4 -F x@fail7.org.org.za - Check Rspamc ${result} R_SPF_FAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=1.2.3.4 From=x@fail7.org.org.za + Expect Symbol R_SPF_FAIL SPF DNSFAIL FAILED A - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 1.2.3.4 -F x@fail8.org.org.za - Check Rspamc ${result} R_SPF_DNSFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=1.2.3.4 From=x@fail8.org.org.za + Expect Symbol R_SPF_DNSFAIL SPF DNSFAIL FAILED MX - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 1.2.3.4 -F x@fail9.org.org.za - Check Rspamc ${result} R_SPF_DNSFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=1.2.3.4 From=x@fail9.org.org.za + Expect Symbol R_SPF_DNSFAIL SPF DNSFAIL FAILED RECORD - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 1.2.3.4 -F x@www.dnssec-failed.org - Check Rspamc ${result} R_SPF_DNSFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=1.2.3.4 From=x@www.dnssec-failed.org + Expect Symbol R_SPF_DNSFAIL SPF PASS INCLUDE - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@pass1.org.org.za - Check Rspamc ${result} R_SPF_ALLOW + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@pass1.org.org.za + Expect Symbol R_SPF_ALLOW SPF PTRS - ${result} = Scan Message With Rspamc /dev/null - ... -i 88.99.142.95 -F foo@crazyspf.cacophony.za.org - Check Rspamc ${result} R_SPF_ALLOW - ${result} = Scan Message With Rspamc /dev/null - ... -i 128.66.0.1 -F foo@crazyspf.cacophony.za.org - Check Rspamc ${result} R_SPF_FAIL - ${result} = Scan Message With Rspamc /dev/null - ... -i 209.85.216.182 -F foo@crazyspf.cacophony.za.org - Check Rspamc ${result} R_SPF_FAIL - #${result} = Scan Message With Rspamc /dev/null - #... -i 98.138.91.166 -F foo@crazyspf.cacophony.za.org - #Check Rspamc ${result} R_SPF_ALLOW - #${result} = Scan Message With Rspamc /dev/null - #... -i 98.138.91.167 -F foo@crazyspf.cacophony.za.org - #Check Rspamc ${result} R_SPF_ALLOW - #${result} = Scan Message With Rspamc /dev/null - #... -i 98.138.91.168 -F foo@crazyspf.cacophony.za.org - #Check Rspamc ${result} R_SPF_ALLOW + Scan File /dev/null + ... IP=88.99.142.95 From=foo@crazyspf.cacophony.za.org + Expect Symbol R_SPF_ALLOW + Scan File /dev/null + ... IP=128.66.0.1 From=foo@crazyspf.cacophony.za.org + Expect Symbol R_SPF_FAIL + Scan File /dev/null + ... IP=209.85.216.182 From=foo@crazyspf.cacophony.za.org + Expect Symbol R_SPF_FAIL + #Scan File /dev/null + #... IP=98.138.91.166 From=foo@crazyspf.cacophony.za.org + #Expect Symbol R_SPF_ALLOW + #Scan File /dev/null + #... IP=98.138.91.167 From=foo@crazyspf.cacophony.za.org + #Expect Symbol R_SPF_ALLOW + #Scan File /dev/null + #... IP=98.138.91.168 From=foo@crazyspf.cacophony.za.org + #Expect Symbol R_SPF_ALLOW SPF PERMFAIL REDIRECT WITHOUT SPF - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim4.eml - ... -i 192.0.2.1 -F a@fail1.org.org.za - Check Rspamc ${result} R_SPF_DNSFAIL + Scan File ${TESTDIR}/messages/dmarc/bad_dkim4.eml + ... IP=192.0.2.1 From=a@fail1.org.org.za + Expect Symbol R_SPF_DNSFAIL SPF EXTERNAL RELAY - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/external_relay.eml - Should contain ${result.stdout} R_SPF_ALLOW (1.00)[+ip4:37.48.67.26] + Scan File ${TESTDIR}/messages/external_relay.eml + Expect Symbol With Score And Exact Options R_SPF_ALLOW 1.0 +ip4:37.48.67.26 SPF UPPERCASE - ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml - ... -i 8.8.8.8 -F x@fail11.org.org.za - Check Rspamc ${result} R_SPF_ALLOW + Scan File ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... IP=8.8.8.8 From=x@fail11.org.org.za + Expect Symbol R_SPF_ALLOW *** Keywords *** SPF Setup |