blob: 425df34beb865e15d1df5c34a9bc74367a014737 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
*** Settings ***
Suite Setup Rspamd Setup
Suite Teardown Rspamd Teardown
Library ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables ${RSPAMD_TESTDIR}/lib/vars.py
*** Variables ***
${CONFIG} ${RSPAMD_TESTDIR}/configs/ratelimit.conf
${MESSAGE} ${RSPAMD_TESTDIR}/messages/ham.eml
${RSPAMD_SCOPE} Suite
${SETTINGS_REPLIES} {symbols_enabled = [RATELIMIT_CHECK, RATELIMIT_UPDATE]}
*** Keywords ***
Recipient Test
[Arguments] ${from} ${rcpt} ${howmany}
FOR ${index} IN RANGE ${howmany}
Scan File ${HAM_MESSAGE}
... From=${from}
... IP=1.1.1.1
... Settings=${SETTINGS_RATELIMIT}
... Rcpt=${rcpt}
Expect Action no action
END
Scan File ${HAM_MESSAGE}
... From=${from}
... IP=1.1.1.1
... Settings=${SETTINGS_RATELIMIT}
... Rcpt=${rcpt}
Expect Action soft reject
Sleep 1s
Scan File ${HAM_MESSAGE}
... From=${from}
... IP=1.1.1.1
... Settings=${SETTINGS_RATELIMIT}
... Rcpt=${rcpt}
Expect Action no action
*** Test Cases ***
CHECK BASIC
Recipient Test ${EMPTY} foobar@example.net 4
CHECK SELECTOR
Recipient Test foo@example.net special@example.net 2
|