aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/configs/settings.conf
blob: 8155ded91989b88b68764b29ca1ffb43d4c50c40 (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
88
89
90
91
92
93
94
95
96
97
98
99
lua = ${LUA_SCRIPT};

settings {
  id_test {
    id = "id_test";
    apply {
      symbols_enabled = ["SIMPLE_TEST"];
    }
  }

  id_pre { # implicit id
    apply {
      symbols_enabled = ["SIMPLE_PRE"];
    }
  }

  id_virtual {
    apply {
      symbols_enabled = ["SIMPLE_VIRTUAL"];
    }
  }

  id_virtual1 {
    apply {
      symbols {
        EXPLICIT_VIRTUAL1 = 10.0
      }
       symbols_enabled = ["DEP_REAL"];
    }
  }

  id_virtual_group {
    user = "test@example.com";
    from = "test2@example.com";
    hostname = "example.com";
    selector = "rcpts:addr.in(test3@example.com)";
    header = {
      "Content-Transfer-Encoding" = "7bit";
      "Custom-Header" = true;
      "Mime-Version" = false;
    }
    request_header = {
      "Test" = "passed";
    }

    expression = 'user || from || hostname || selector:1 || header:mime_version || header:custom_header || header:1 || request_header:test'
    apply {
      symbols_enabled {
        SIMPLE_VIRTUAL = 10.0;
      }
      symbols {
        EXPLICIT_VIRTUAL = 10.0
      }
    }
  }

  id_test_priority {
    priority = high;
    from = "user@test.com";
    apply {
      symbols_enabled {
        PRIORITY = 10.0;
      }
      symbols {
        PRIORITY_2 = 10.0
      }
    }
  }

  empty_symbols_enabled {
    ip = "5.5.5.5";
    apply {
      symbols_enabled = [];
    }
  }

  empty_groups_enabled {
    ip = "5.5.5.6";
    apply {
      groups_enabled = [];
    }
  }
}

classifier {
  backend = "sqlite3";
  statfile {
    spam = true;
    symbol = BAYES_SPAM;
    path = "/tmp/bayes.spam.sqlite3";
  }
  statfile {
    spam = false;
    symbol = BAYES_HAM;
    path = "/tmp/bayes.ham.sqlite3";
  }
  min_learns = 1;
  min_token_hits = 1;
}