aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/configs/dkim.conf
blob: cc2f6f25073ae5e07ff9ee8d5c021e6d80b79a2a (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
options = {
  filters = ["dkim"]
  pidfile = "${TMPDIR}/rspamd.pid"
  dns {
    retransmits = 10;
    timeout = 2s;
    fake_records = [{ # ed25519
      name = "test._domainkey.example.com";
      type = txt;
      replies = ["k=ed25519; p=yi50DjK5O9pqbFpNHklsv9lqaS0ArSYu02qp1S0DW1Y="];
    },
    {
      name = "brisbane._domainkey.football.example.com";
      type = txt;
      replies = ["v=DKIM1; k=ed25519; p=11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="];
    },
    {
      name = "test._domainkey.football.example.com";
      type = txt;
      replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWRiGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/byYzCNb3W91y3FutACDfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqMKrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3Ip3G+2kryOTIKT+l/K4w3QIDAQAB"],
    },
    {
      name = "dkim._domainkey.cacophony.za.org",
      type = "txt";
      replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXtxBE5IiNRMcq2/lc2zErfdCvDFyQNBnMjbOjBQrPST2k4fdGbtpe5Iu5uS01Met+dAEf94XL8I0hwmYw+n70PP834zfJGi2egwGqrakpaWsCDPvIJZLkxJCJKQRA/zrQ622uEXdvYixVbsEGVw7U4wAGSmT5rU2eU1y63AlOlQIDAQAB"];
    }];
  }
}
logging = {
  type = "file",
  level = "debug"
  filename = "${TMPDIR}/rspamd.log"
}
metric = {
  name = "default",
  actions = {
    reject = 100500,
  }
  unknown_weight = 1
}

worker {
  type = normal
  bind_socket = ${LOCAL_ADDR}:${PORT_NORMAL}
  count = 1
  keypair {
    pubkey = "${KEY_PUB1}";
    privkey = "${KEY_PVT1}";
  }
  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"
}

dkim {

sign_condition =<<EOD
return function(task)
  local dodkim = task:get_request_header('dodkim')
  if not dodkim then return end
  return {
    key = "${TESTDIR}/configs/dkim.key",
    domain = "cacophony.za.org",
    selector = "dkim"
  }
end
EOD;

  dkim_cache_size = 2k;
  dkim_cache_expire = 1d;
  time_jitter = 6h;
  trusted_only = false;
  skip_multi = false;
}
modules {
    path = "${TESTDIR}/../../src/plugins/lua/"
}
lua = "${TESTDIR}/lua/test_coverage.lua";