aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/cases/410_replies.robot
blob: b6710149cd9cdf1971e19398058b4bec9744ad43 (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
45
46
47
48
49
50
*** Settings ***
Suite Setup     Rspamd Redis Setup
Suite Teardown  Rspamd Redis Teardown
Library         ${RSPAMD_TESTDIR}/lib/rspamd.py
Resource        ${RSPAMD_TESTDIR}/lib/rspamd.robot
Variables       ${RSPAMD_TESTDIR}/lib/vars.py

*** Variables ***
${CONFIG}              ${RSPAMD_TESTDIR}/configs/replies.conf
${SETTINGS_REPLIES}    {symbols_enabled = [REPLIES_CHECK, REPLIES_SET, REPLY]}
${SYMBOL}              REPLY
${REDIS_SCOPE}         Suite
${RSPAMD_SCOPE}        Suite

*** Test Cases ***
Reply to 1 sender 1 recipients
  Scan File  ${RSPAMD_TESTDIR}/messages/set_replyto_1_1.eml
  ...  IP=8.8.8.8
  ...  User=xxx@abrakadabra.com
  ...  From=xxx@abrakadabra.com
  ...  Settings=${SETTINGS_REPLIES}
  ...  Rcpt=user@emailbl.com
  Scan File  ${RSPAMD_TESTDIR}/messages/replyto_1_1.eml
  ...  IP=8.8.8.8
  ...  Rcpt=xxx@abrakadabra.com
  ...  Settings=${SETTINGS_REPLIES}
  ...  From=user@emailbl.com
  Expect Symbol  ${SYMBOL}

Reply to 1 sender 2 recipients but SMTP recipient matches
  Scan File  ${RSPAMD_TESTDIR}/messages/set_replyto_1_2_first.eml
  ...  IP=8.8.8.8
  ...  User=xxxx@emailbl.com
  ...  Settings=${SETTINGS_REPLIES}
  Scan File  ${RSPAMD_TESTDIR}/messages/replyto_1_2.eml
  ...  IP=8.8.8.8
  ...  Rcpt=xxxx@emailbl.com
  ...  Settings=${SETTINGS_REPLIES}
  Expect Symbol  ${SYMBOL}

Reply to 1 sender 2 recipients but SMTP recipient NOT matches
  Scan File  ${RSPAMD_TESTDIR}/messages/set_replyto_1_2_first.eml
  ...  IP=8.8.8.8
  ...  User=user@emailbl.com
  ...  Settings=${SETTINGS_REPLIES}
  Scan File  ${RSPAMD_TESTDIR}/messages/replyto_1_2.eml
  ...  IP=8.8.8.8  User=user@emailbl.com
  ...  Rcpt=another@emailbl.com
  ...  Settings=${SETTINGS_REPLIES}
  Do Not Expect Symbol  ${SYMBOL}