aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/configs/composites.conf
blob: 71e453deff161b3663c9c301ef19810ff7d2f063 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
options = {
    pidfile = "${TMPDIR}/rspamd.pid"
}
logging = {
    type = "file",
    level = "debug"
    filename = "${TMPDIR}/rspamd.log"
}

worker {
    type = normal
    bind_socket = ${LOCAL_ADDR}:${PORT_NORMAL}
    count = 1
    task_timeout = 60s;
}
worker {
    type = controller
    bind_socket = ${LOCAL_ADDR}:${PORT_CONTROLLER}
    count = 1
    secure_ip = ["127.0.0.1", "::1"];
    stats_path = "${TMPDIR}/stats.ucl"
}
lua = "${TESTDIR}/lua/test_coverage.lua";
lua = ${LUA_SCRIPT};

composites {
    EXPRESSIONS {
        expression = "(EXPRESSIONS_A | ~EXPRESSIONS_B) & !EXPRESSIONS_C";
        score = 5.0;
    }

    POLICY_REMOVE_WEIGHT {
        expression = "POLICY_REMOVE_WEIGHT_A and ~POLICY_REMOVE_WEIGHT_B";
        score = 5.0;
    }
    POLICY_FORCE_REMOVE {
        expression = "POLICY_FORCE_REMOVE_A & ^POLICY_FORCE_REMOVE_B";
        score = 5.0;
    }
    POLICY_FORCE_REMOVE_LEAVE {
        expression = "-POLICY_FORCE_REMOVE_A and -POLICY_FORCE_REMOVE_B";
        score = 5.0;
    }
    POLICY_LEAVE {
        expression = "POLICY_LEAVE_A & -POLICY_LEAVE_B";
        score = 5.0;
    }

    DEFAULT_POLICY_REMOVE_WEIGHT {
        expression = "DEFAULT_POLICY_REMOVE_WEIGHT_A and DEFAULT_POLICY_REMOVE_WEIGHT_B";
        score = 5.0;
        policy = "remove_weight";
    }
    DEFAULT_POLICY_REMOVE_SYMBOL {
        expression = "DEFAULT_POLICY_REMOVE_SYMBOL_A & DEFAULT_POLICY_REMOVE_SYMBOL_B";
        score = 5.0;
        policy = "remove_symbol";
    }
    DEFAULT_POLICY_LEAVE {
        expression = "DEFAULT_POLICY_LEAVE_A & DEFAULT_POLICY_LEAVE_B";
        score = 5.0;
        policy = "leave";
    }

    SYMBOL_GROUPS {
        expression = "!g+:positive & g-:negative & -g:any";
        score = 5.0;
    }

    SYMOPTS1 {
      expression = "OPTS[sym1]";
      score = 5.0;
    }

    SYMOPTS2 {
      expression = 'OPTS[/foo[0-9]/,sym2]';
      score = 6.0;
    }
    SYMOPTS3 {
      expression = 'OPTS[sym2,/FoO\\//i]';
      score = 6.0;
    }
    SYMOPTS4 {
      expression = 'POSITIVE_A & OPTS[/>app.link$/i] & EXPRESSIONS';
      score = 6.0;
    }
}