MAP - DNSBL MISS
${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1
- Check Rspamc ${result} DNSBL_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} DNSBL_MAP inverse=1 rc_noinverse=1
MAP - IP HIT
${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1
MAP - IP MISS
${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.2
- Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1
MAP - IP MASK
${result} = Scan Message With Rspamc ${MESSAGE} -i 10.1.0.10
- Check Rspamc ${result} IP_MAP
+ Check Rspamc ${result} IP_MAP
MAP - IP MASK MISS
${result} = Scan Message With Rspamc ${MESSAGE} -i 11.1.0.10
- Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1
MAP - IP V6
${result} = Scan Message With Rspamc ${MESSAGE} -i ::1
- Check Rspamc ${result} IP_MAP
+ Check Rspamc ${result} IP_MAP
MAP - IP V6 MISS
${result} = Scan Message With Rspamc ${MESSAGE} -i fe80::1
- Check Rspamc ${result} IP_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} IP_MAP inverse=1 rc_noinverse=1
MAP - FROM
${result} = Scan Message With Rspamc ${MESSAGE} --from user@example.com
- Check Rspamc ${result} FROM_MAP
+ Check Rspamc ${result} FROM_MAP
MAP - FROM MISS
${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.com
- Check Rspamc ${result} FROM_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} FROM_MAP inverse=1 rc_noinverse=1
MAP - FROM REGEXP
${result} = Scan Message With Rspamc ${MESSAGE} --from user123@test.com
- Check Rspamc ${result} REGEXP_MAP
+ Check Rspamc ${result} REGEXP_MAP
${result} = Scan Message With Rspamc ${MESSAGE} --from somebody@exAmplE.com
- Check Rspamc ${result} REGEXP_MAP
+ Check Rspamc ${result} REGEXP_MAP
MAP - FROM REGEXP MISS
${result} = Scan Message With Rspamc ${MESSAGE} --from user@other.org
- Check Rspamc ${result} REGEXP_MAP inverse=1 rc_nocheck=1
+ Check Rspamc ${result} REGEXP_MAP inverse=1 rc_noinverse=1
MAP - DEPENDS HIT
${result} = Scan Message With Rspamc ${MESSAGE} -i 147.243.1.47 --from user123@microsoft.com
MAP - MULSYM SYMBOL + SCORE
${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user5@example.com
- Check Rspamc ${result} SYM1 (-10.0
\ No newline at end of file
+ Check Rspamc ${result} SYM1 (-10.0
*** Settings ***
-Test Teardown Generic Teardown
+Test Teardown Generic Teardown
Library ${TESTDIR}/lib/rspamd.py
Resource ${TESTDIR}/lib/rspamd.robot
Variables ${TESTDIR}/lib/vars.py
*** Variables ***
${CONFIG} ${TESTDIR}/configs/password.conf
${RSPAMD_SCOPE} Test
-${PBKDF_PASSWORD} "$1$nxnwqu5t6ruqfzb4h7bs47ogmdk9sb74$c8mbmcfyd6aic1sm48qzxuzkw4nhx6te6h7owgxz63bcd7fqu1dy"
+${PBKDF_PASSWORD} "$1$nxnwqu5t6ruqfzb4h7bs47ogmdk9sb74$c8mbmcfyd6aic1sm48qzxuzkw4nhx6te6h7owgxz63bcd7fqu1dy"
${CATENA_PASSWORD} "$2$9dydyukfndmi8zzp7rbdsu43y7a3iucg$1nketaa9pjqwwzzjxogcrniphw4y5fanixudpwzza85tcb56yzub"
*** Test Cases ***
PASSWORD - PBKDF
[Setup] Password Setup ${PBKDF_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat
- Should Contain ${result.stdout} Messages scanned:
+ Check Rspamc ${result} Messages scanned:
PASSWORD - PBKDF WRONG
[Setup] Password Setup ${PBKDF_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1q1 stat
- Should Contain ${result.stdout} Unauthorized rc_nocheck=1
+ Check Rspamc ${result} Unauthorized
PASSWORD - CATENA
[Setup] Password Setup ${CATENA_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat
- Should Contain ${result.stdout} Messages scanned:
-
+ Check Rspamc ${result} Messages scanned:
PASSWORD - CATENA WRONG
[Setup] Password Setup ${CATENA_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q stat
- Should Contain ${result.stdout} Unauthorized rc_nocheck=1
+ Check Rspamc ${result} Unauthorized
PASSWORD - ENABLE
[Setup] Password Setup ${CATENA_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q2 stat_reset
- Should Contain ${result.stdout} Messages scanned:
+ Check Rspamc ${result} Messages scanned:
PASSWORD - ENABLE WITH NORMAL
[Setup] Password Setup ${CATENA_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q1 stat_reset
- Should Contain ${result.stdout} Unauthorized rc_nocheck=1
+ Check Rspamc ${result} Unauthorized
PASSWORD - ENABLE INCORRECT
[Setup] Password Setup ${CATENA_PASSWORD}
${result} = Run Rspamc -h ${LOCAL_ADDR}:${PORT_CONTROLLER} -P q2q2 stat_reset
- Should Contain ${result.stdout} Unauthorized rc_nocheck=1
+ Check Rspamc ${result} Unauthorized
*** Keywords ***
Password Setup
[Arguments] ${PASSWORD} ${ENABLE_PASSWORD}=q2
Set Test Variable ${PASSWORD}
Set Test Variable ${ENABLE_PASSWORD}
- Generic Setup
\ No newline at end of file
+ Generic Setup
\ ... ELSE Check Rspamc Match String ${result.stdout} ${i} ${inverse}
Run Keyword If @{args} == @{EMPTY} Check Rspamc Match Default ${result.stdout} ${inverse}
${rc_nocheck} = Evaluate 'rc_nocheck' in $kwargs
+ ${rc_noinverse} = Evaluate 'rc_noinverse' in $kwargs
Run Keyword If ${rc_nocheck} == True Return From Keyword
+ ${inverse} = Set Variable If ${rc_noinverse} == True False ${inverse}
Run Keyword If ${inverse} == False Should Be Equal As Integers ${result.rc} ${rc}
... ELSE Should Not Be Equal As Integers ${result.rc} ${rc}