history_redis {
  enabled = false;
}

neural {
  enabled = false;
}

bayes_expiry {
  enabled = false;
}

metric_exporter {
  enabled = false;
}

emails {
  "whitelist" = [
    "rspamd-test.com"
  ]
  rules {
    "RSPAMD_EMAILBL_FULL" {
        dnsbl = "test5.uribl";
        replyto = true;
        }
      "RSPAMD_EMAILBL_DOMAINONLY" {
        dnsbl = "test6.uribl";
        domain_only = true;
        replyto = true;
      }
  }
}

external_relay {
  enabled = {= env.EXTERNAL_RELAY_ENABLED =};

  rules {
    EXTERNAL_RELAY_AUTHENTICATED {
      strategy = "authenticated";
      user_map = "{= env.TESTDIR =}/configs/maps/external_relay.user_map";
    }
    EXTERNAL_RELAY_COUNT {
      count = 4;
      strategy = "count";
    }
    EXTERNAL_RELAY_HOSTNAME_MAP {
      hostname_map = "{= env.TESTDIR =}/configs/maps/external_relay.hostname_map";
      strategy = "hostname_map";
    }
    EXTERNAL_RELAY_LOCAL {
      strategy = "local";
    }
  }
}

greylist {
  check_local = true;
  timeout = 4;
}

logging = {
  type = "file",
  level = "debug"
  filename = "{= env.TMPDIR =}/rspamd.log"
  log_usec = true;
}

mid = {
    source = {
        url = [
            "https://maps.rspamd.com/rspamd/mid.inc.zst",
            "fallback+file://{= env.TESTDIR =}/../../../conf/mid.inc",
            "file://{= env.TESTDIR =}/configs/maps/mid.list"
        ];
    }
}

mime_types {
    file = [
      "https://maps.rspamd.com/rspamd/mime_types.inc.zst",
      "fallback+file://{= env.TESTDIR =}/../../../conf/mime_types.inc"
     ];
    extension_map {
        html = "text/html";
        txt [
            "message/disposition-notification",
            "text/plain",
            "text/rfc822-headers",
        ]
        pdf [
            "application/octet-stream",
            "application/pdf",
        ]
    }
    filename_whitelist = "{= env.TESTDIR =}/configs/maps/mime_types.wl";
}

options = {
  pidfile = "{= env.TMPDIR =}/rspamd.pid";
  url_tld = "{= env.TESTDIR =}/../lua/unit/test_tld.dat";
  dns {
    nameserver = ["8.8.8.8", "8.8.4.4"];
    retransmits = 10;
    timeout = 2s;
        fake_records = [{
        # non-existent records requested by 350_surbl tests
        name = "114.73.21.104.test4.uribl", type = "a", rcode = "norec"},
        {name = "153.23.128.52.test4.uribl", type = "a", rcode = "norec"},
        {name = "158.136.181.135.test4.uribl", type = "a", rcode = "norec"},
        {name = "177.115.236.44.test4.uribl", type = "a", rcode = "norec"},
        {name = "180.136.102.34.test4.uribl", type = "a", rcode = "norec"},
        {name = "180.144.67.172.test4.uribl", type = "a", rcode = "norec"},
        {name = "2.7.9.4.5.1.8.6.0.0.0.0.0.0.0.0.0.0.0.0.7.3.0.3.0.0.7.4.6.0.6.2.test4.uribl", type = "a", rcode = "norec"},
        {name = "217.228.62.64.test4.uribl", type = "a", rcode = "norec"},
        {name = "34.216.184.93.test4.uribl", type = "a", rcode = "norec"},
        {name = "4.b.0.9.3.4.c.a.0.0.0.0.0.0.0.0.0.0.0.0.1.3.0.3.0.0.7.4.6.0.6.2.test4.uribl", type = "a", rcode = "norec"},
        {name = "4eikheqjb4rb3y4oxgnfxek9wrwnyii4.test.uribl", type = "a", rcode = "norec"},
        {name = "6.4.9.1.8.c.5.2.3.9.8.1.8.4.2.0.1.0.0.0.0.2.2.0.0.0.8.2.6.0.6.2.test4.uribl", type = "a", rcode = "norec"},
        {name = "69so7b146n15x6qkr8rj9x8iqb7zfr1s.test.uribl", type = "a", rcode = "norec"},
        {name = "6cqpxfrojdnzawwjmacjwtstzwehxnzb.test.uribl", type = "a", rcode = "norec"},
        {name = "7.5.2.e.9.5.e.f.f.f.1.9.c.3.0.f.0.0.0.0.0.0.0.0.1.0.c.3.0.0.6.2.test4.uribl", type = "a", rcode = "norec"},
        {name = "baddomain.com.test2.uribl", type = "a", rcode = "norec"},
        {name = "baddomain.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "bbjo9td11ewijyjkq8rsn4j3kxhthz4m.test.uribl", type = "a", rcode = "norec"},
        {name = "emailbl.com.test2.uribl", type = "a", rcode = "norec"},
        {name = "emailbl.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "emailbl.com.test6.uribl", type = "a", rcode = "norec"},
        {name = "example.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "example.com.test6.uribl", type = "a", rcode = "norec"},
        {name = "example.com.test7.uribl", type = "a", rcode = "norec"},
        {name = "example.net.test3.uribl", type = "a", rcode = "norec"},
        {name = "example.net.test7.uribl", type = "a", rcode = "norec"},
        {name = "example.org.test2.uribl", type = "a", rcode = "norec"},
        {name = "example.org.test3.uribl", type = "a", rcode = "norec"},
        {name = "example.org.test7.uribl", type = "a", rcode = "norec"},
        {name = "example.ru.test2.uribl", type = "a", rcode = "norec"},
        {name = "example.ru.test7.uribl", type = "a", rcode = "norec"},
        {name = "gdhhir83i5pjk6s8i3e5afwa4md7uns7.test.uribl", type = "a", rcode = "norec"},
        {name = "k8qo8m33z19cqejfncirs85rf4nr9h3u.test.uribl", type = "a", rcode = "norec"},
        {name = "kr1adm7tnzuudiftdt1g4t6yg1rbt1ez.test.uribl", type = "a", rcode = "norec"},
        {name = "rspamd.com.test2.uribl", type = "a", rcode = "norec"},
        {name = "rspamd.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "rspamd.com.test7.uribl", type = "a", rcode = "norec"},
        {name = "rspamd.tk.test3.uribl", type = "a", rcode = "norec"},
        {name = "rspamd.tk.test7.uribl", type = "a", rcode = "norec"},
        {name = "sanchez.com.test2.uribl", type = "a", rcode = "norec"},
        {name = "sanchez.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "sanchez.com.test7.uribl", type = "a", rcode = "norec"},
        {name = "subdomain.emailbl.com.test6.uribl", type = "a", rcode = "norec"},
        {name = "testtest.com.test2.uribl", type = "a", rcode = "norec"},
        {name = "testtest.com.test3.uribl", type = "a", rcode = "norec"},
        {name = "testtest.com.test7.uribl", type = "a", rcode = "norec"},
        {name = "user.baddomain.com.test5.uribl", type = "a", rcode = "norec"},
        {name = "user.example.com.test5.uribl", type = "a", rcode = "norec"},
        {name = "xn--80arbjktj.xn--p1ai.test3.uribl", type = "a", rcode = "norec"},
        {name = "xn--80arbjktj.xn--p1ai.test7.uribl", type = "a", rcode = "norec"},
        {name = "y84tis6xzaf41h4p5kzxiw6puixnm43k.test.uribl", type = "a", rcode = "norec"},
        # other stuff is here too! :\
        { # 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"];
        },
        {
          name = "eddsa._domainkey.cacophony.za.org",
          type = "txt";
          replies = ["v=DKIM1; k=ed25519; p=+nU+aC33ICeS4zx8VUjFYCtxj0fRbHWQn2gP2hTkm9w="];
        },
        {
          name = "dkim._domainkey.invalid.za.org",
          type = "txt";
          replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEEXmNGQq7PUrr9Mg4UakTFHgXBCy2DOztkrZm+0OrVWtiRzGluxBkbOWTBwuU3/Yw97yTphBMQxzWFN603/f/KPAQcF/Lc1l+6kmIBBxNXjjGuOK/3PYKZVntUdKmqcQBYfnHdzH2Tohbuyx1a7xqnv6VSChqQrZU4CwkeT3+eQIDAQAB"];
        },
        {
          name = "eddsa._domainkey.invalid.za.org",
          type = "txt";
          replies = ["v=DKIM1; k=ed25519; p=Wkkrp5DJTvknDMGWYv8vm3p3sZjiQp03LZo80RregY8="];
        },
        {
          name = "dkim._domainkey.rspamd.com",
          type = "txt";
          replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCd/XhZBEGGAss48lEuMmwZv9lOFf6FTllBiQ3sPhdTpDdIPaW9TInW7iYnYD/bXHeVxYAyD/sKhYk6+qGBRu10rEi+iyPvLCIED+Boq0tEQosuKuV6Fjoomb+QhZY9KdjyZTjsrFPZ+wCkUY/30uTmpX2SwSqyxxlK0pUIsRgMAQIDAQAB"];
        },
        {
          name = "_dmarc.rspamd.com",
          type = "txt";
          rcode = 'norec';
        },
        {
          name = "dkim._domainkey.highsecure.ru",
          type = "txt";
          replies = ["p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDK4ZQYky30GH0Ak9OQ1fv3IdFNbpOtpa4S/PR20ZLgPXfd/FCA//ztUmu7kHlELI+/+4f8W+xX0oZlOc/cFxhopRjXZMlSsQqmWOZ40/GxWFBtcqafKu78FCqO7URqZUmMCM5Jlp4zt/yzH3dbYNG3i5PVlB5QtQnZvY+dvBL3dwIDAQAB"];
        },
        {
          name = "_dmarc.cacophony.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=none; sp=reject"];
        },
        {
          name = "_dmarc.my.mom.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=reject"];
        },
        {
          name = "example.net",
          type = "txt";
          replies = ["v=spf1 -all"];
        },
        {
          name = "fail4.org.org.za",
          type = "txt";
          replies = ["v=spf1 redirect=asdfsfewewrredfs"];
        },
        {
          name = "_dmarc.reject.cacophony.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=reject"];
        },
        {
          name = "spf.cacophony.za.org",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.4.4 -all"];
        },
        {
          name = "fail7.org.org.za",
          type = "a";
          rcode = 'norec';
        },
        {
          name = "fail6.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 mx -all"];
        },
        {
          name = "fail6.org.org.za",
          type = "mx";
          rcode = 'norec';
        },
        {
          name = "fail7.org.org.za",
          type = "aaaa";
          rcode = 'norec';
        },
        {
          name = "_dmarc.quarantine.cacophony.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=quarantine"];
        },
        {
          name = "_dmarc.yo.mom.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=reject; aspf=s; adkim=s;"];
        },
        {
          name = "yo.mom.za.org",
          type = "txt";
          replies = ["v=spf1 ip4:37.48.67.26 -all"];
        },
        {
          name = "testdkim._domainkey.mom.za.org",
          type = "txt";
          replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3v4VPE1QMHUzsMRbC8VzXNq82mDjiv9Gi1NB/YYC+vIYZT+sE/Uxnr0Clk8C2jgzEr3jcxgQEWZfMtEEg/EfEJvh4SrXWv9c0gw1EEfxKxX9i+r8yBQtc/EWospWVDkhF2lAvQAK1lV1ZiU7psJ6fh1CI39uZyWdAktZzWLf0zQIDAQAB"];
        },
        {
          name = "_dmarc.rspamd.tk",
          type = "txt";
          replies = ["bio=a263adeab8acdcdb8b89e127b67d696061fdfbee"];
        },
        {
          name = "fail2.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.4.4 include:www.dnssec-failed.org -all"];
        },
        {
          name = "fail3.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 include:total.barf -all"];
        },
        {
          name = "mom.za.org",
          type = "txt";
          replies = ["v=spf1 ip4:37.48.67.26 -all"];
        },
        {
          name = "testdkim._domainkey.asdf.rspamd.tk", # testdkim._domainkey.asdf.rspamd.tk is an alias for rspamd.tk
          type = "txt";
          replies = ["bio=a263adeab8acdcdb8b89e127b67d696061fdfbee"];
        },
        {
          name = "testdkim._domainkey.rspamd.tk", # testdkim._domainkey.rspamd.tk is an alias for rspamd.tk
          type = "txt";
          replies = ["bio=a263adeab8acdcdb8b89e127b67d696061fdfbee"];
        },
        {
          name = "pass1.org.org.za",
          type = "txt";
          replies = ["v=spf1 include:pass2.org.org.za -all"];
        },
        {
          name = "95.142.99.88.in-addr.arpa",
          type = "ptr";
          replies = ["mail.highsecure.ru"];
        },
        {
          name = "mail.highsecure.ru",
          type = "a";
          replies = ["88.99.142.95"];
        },
        {
          name = "mail.highsecure.ru",
          type = "aaaa";
          rcode = 'norec';
        },
        {
          name = "1.0.66.128.in-addr.arpa",
          type = "ptr";
          rcode = 'nxdomain';
        },
        {
          name = "182.216.85.209.in-addr.arpa",
          type = "ptr";
          replies = ["mail-qt0-f182.google.com"];
        },
        {
          name = "crazyspf.cacophony.za.org",
          type = "txt";
          replies = ["v=spf1 ptr:cacophony.za.org ptr:rspamd.com ptr:yahoo.com ptr:yahoo.net ptr:highsecure.ru -all"];
        },
        {
          name = "pass2.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 -all"];
        },
        {
          name = "_dmarc.yoni.za.org",
          type = "txt";
          replies = ["v=DMARC1; p=reject; sp=none;"];
        },
        {
          name = "fail10.org.org.za",
          type = "txt";
          replies = ["v=spf1 redirect=fail5.org.org.za"];
        },
        {
          name = "fail11.org.org.za",
          type = "txt";
          replies = ["v=sPF1 ip4:8.8.8.8 -all"];
        },
        {
          name = "fail5.org.org.za",
          type = "txt";
          replies = ["v=spf1 OMGBARF"];
        },
        {
          name = "fail7.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 a -all"];
        },
        {
          name = "trusted.com",
          type = "txt";
          replies = ["v=spf1 ip4:192.168.1.1"];
        },
        {
          name = "external.com",
          type = "txt";
          replies = ["v=spf1 ip4:37.48.67.26"];
        },
        {
          name = "co.za",
          type = "txt";
          rcode = 'norec';
        },
        {
          name = "testdkim1._domainkey.yoni.za.org",
          type = "txt";
          replies = ["v=DKIM1; k=rsa; p=BARF"];
        },
        {
          name = "_dmarc.yoni.za.net",
          type = "txt";
          replies = ["v=DMARC1; p=none; sp=quarantine"];
        },
        {
          name = "za",
          type = "txt";
          replies = ["Top-level domain for South Africa"];
        },
        {
          name = "_dmarc.foo.yoni.za.org",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "_dmarc.foo.cacophony.za.org",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "_dmarc.foo.yoni.za.net",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "_dmarc.dnssec-failed.org",
          type = "txt";
          rcode = 'timeout';
        },
        {
          name = "_dmarc.example.com",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "_dmarc.zero_pct.com",
          type = "txt";
          replies = ["v=DMARC1; p=reject; sp=quarantine; pct=0"];
        },
        {
          name = "example.com",
          type = "txt";
          replies = ["$Id: example.com 4415 2015-08-24 20:12:23Z davids $", "v=spf1 -all"];
        },
        {
          name = "example.com",
          type = "a";
          replies = ["93.184.216.34"];
        },
        {
          name = "testdkim1._domainkey.dnssec-failed.org",
          type = "txt";
          rcode = 'timeout';
        },
        {
          name = "total.barf",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "_dmarc.foo.cacophony.za.org",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "zzzzaaaa",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "asdfsfewewrredfs",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "95.142.99.88.asn.rspamd.com",
          type = "txt";
          replies = ["24940|88.99.0.0/16|DE|ripencc|"];
        },
        {
          name = "2.a.d.1.1.d.e.f.f.f.0.0.4.5.0.5.d.6.2.0.6.b.a.a.8.c.7.0.1.0.a.2.asn6.rspamd.com",
          type = "txt";
          replies = ["20857|2a01:7c8::/32|NL|ripencc|"];
        },
        {
          name = "2.a.d.1.1.d.e.f.f.f.0.0.4.5.0.5.d.6.2.0.6.b.a.a.8.c.7.0.1.0.a.2.rspamd.com",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "2.a.d.1.1.d.e.f.f.f.0.0.4.5.0.5.d.6.2.0.6.b.a.a.8.c.7.0.1.0.a.2.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "rspamd.com",
          type = "txt";
          replies = ["v=spf1 mx -all"];
        },
        {
          name = "rspamd.com",
          type = "mx";
          replies = ["10 mail.highsecure.ru"];
        },
        {
          name = "95.142.99.88.rspamd.com",
          type = "a";
          rcode = 'norec';
        },
        {
          name = "95.142.99.88.rspamd.com",
          type = "aaaa";
          rcode = 'norec';
        },
        {
          name = "2.0.0.127.rspamd.com",
          type = "a";
          replies = ["127.0.0.1"];
        },
        {
          name = "8.8.8.8.asn.rspamd.com",
          type = "txt";
          replies = ["15169|8.8.8.0/24|US|arin|"];
        },
        {
          name = "8.8.8.8.asn.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "10.0.1.10.asn.rspamd.com",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "10.0.1.10.asn.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "10.0.1.11.asn.rspamd.com",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "10.0.1.11.asn.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "test.com",
          type = "txt";
          replies = [""];
        },
        {
          name = "other.com",
          type = "txt";
          rcode = 'norec';
        },
        {
          name = "bob",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "mail.highsecure.ru",
          type = "aaaa";
          rcode = 'norec';
        },
        {
          name = "mail.highsecure.ru",
          type = "a";
          replies = ["88.99.142.95"];
        },
        {
          name = "4.3.2.1.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "4.3.2.1.asn.rspamd.com",
          type = "txt";
          rcode = 'nxdomain';
        },
        {
          name = "1.0.0.127.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "114.47.228.46.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "114.47.228.46.asn.rspamd.com",
          type = "txt";
          replies = ["34010|46.228.40.0/21|GB|ripencc|"];
        },
        {
          name = "10.0.1.10.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "10.0.1.11.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "other.org",
          type = "txt";
          rcode = 'norec';
        },
        {
          name = "8.8.8.8.rspamd.com",
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "rspamd.tk",
          type = "txt";
          replies = ["bio=a263adeab8acdcdb8b89e127b67d696061fdfbee"];
        },
        {
          name = "fail1.org.org.za",
          type = "txt";
          replies = ["v=spf1 redirect=www.dnssec-failed.org"];
        },
        {
          name = "www.dnssec-failed.org",
          type = "txt";
          rcode = 'timeout';
        },
        {
          name = "www.dnssec-failed.org",
          type = "mx";
          rcode = 'timeout';
        },
        {
          name = "www.dnssec-failed.org",
          type = "a";
          rcode = 'timeout';
        },
        {
          name = "www.dnssec-failed.org",
          type = "aaaa";
          rcode = 'norec';
        },
        {
          name = "cacophony.za.org",
          type = "txt";
          replies = ["v=spf1 redirect=asdfsfewewrredfs"];
        },
        {
          name = "fail9.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 mx:www.dnssec-failed.org -all"];
        },
        {
          name = "fail8.org.org.za",
          type = "txt";
          replies = ["v=spf1 ip4:8.8.8.8 a:www.dnssec-failed.org -all"];
        },
        {
          name = "1.2.3.4.fake.rbl";
          type = "a";
          replies = ["127.0.0.2"];
        },
        {
          name = "2.2.3.4.fake.rbl";
          type = "a";
          replies = ["127.0.0.10"];
        },
        {
          name = "3.2.3.4.fake.rbl";
          type = "a";
          replies = ["127.0.0.2", "127.0.0.3"];
        },
        {
          name = "4.2.3.4.fake.rbl";
          type = "a";
          replies = ["127.0.0.2"];
        },
        {
          name = "4.2.3.4.fake.wl";
          type = "a";
          replies = ["127.0.0.2"];
        },
        {
          name = "4.3.2.1.fake.rbl";
          type = "a";
          rcode = 'nxdomain';
        },
        {
          name = "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.fake.rbl";
          type = "a";
          replies = ["127.0.0.2"];
        },
        {
          name = "131.193.18.151.fake.rbl";
          type = "a";
          replies = ["127.0.0.3"];
        },
        # SURBL tests
        {
          name = "rciuosbadgpq6b5wt436nhgnwzmfh9w9.test.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          # testtest.com
          name = "rcf1ecxtxrrpfncqzsdaiezjkf7f1rzz.test.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "jhcszdsmo3wuj5mp8t38kdisdmr3ib3q.test.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "g9ifs3q39oh5jwru94cj7ffaqd6rfyq6.test.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "xn--80arbjktj.xn--p1ai.test2.uribl";
          type = a;
          replies = ["127.0.1.2"];
        },
        {
          name = "мойсайт.рф.test2.uribl";
          type = a;
          replies = ["127.0.1.2"];
        },
        {
          name = "user.emailbl.com.test5.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "user.subdomain.emailbl.com.test5.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "baddomain.com.test6.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "user.subdomain.baddomain.com.test5.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "example.com.test2.uribl";
          type = a;
          replies = ["127.0.1.2"];
        },
        {
          name = "user.example.com.test2.uribl";
          type = a;
          replies = ["127.0.1.5"];
        },
        {
          name = "example.net.test2.uribl";
          type = a;
          replies = ["127.0.1.4"];
        },
        {
          name = "rspamd.tk.test2.uribl";
          type = a;
          replies = ["127.0.1.4"];
        },
        {
          name = "example.org.test3.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "example.ru.test3.uribl";
          type = a;
          replies = ["127.0.0.12"];
        },
        {
          name = "example.ru";
          type = a;
          replies = ["8.8.8.8", "8.8.8.9"];
        },
        {
          name = "8.8.8.8.test4.uribl";
          type = a;
          replies = ["127.0.0.4", "127.0.0.11"];
        },
        {
          name = "uppht14nj4fsoycu3huctg9d5psx9je4.test.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "rspamd-test.com.test2.uribl";
          type = a;
          replies = ["127.0.1.2"];
        },
        {
          name = "9.8.8.8.test4.uribl";
          type = a;
          replies = ["127.0.0.3"];
        },
        {
          name = "4.very.dirty.sanchez.com.test7.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "clean.dirty.sanchez.com.test7.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "not.dirty.sanchez.com.test7.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "41.black.sanchez.com.test7.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "black.sanchez.com.test7.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "dirty.sanchez.com.test8.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "very.dirty.sanchez.com.test8.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "41.black.sanchez.com.test8.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "black.sanchez.com.test8.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "example.com.test9.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "example.org.test9.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "8.8.8.8.test9.uribl";
          type = a;
          replies = ["127.0.0.2"];
        },
        {
          name = "site.resolveme",
          type = "a";
          replies = ["127.0.0.1"];
        },
        {
          name = "not-resolvable.com",
          type = "a";
          rcode = 'norec';
        },
        # TODO: add IPv6 tests
        ];
  }
}

phishing {
  symbol = "PHISHING";
  strict_domains = {
    STRICT_PHISHING = [
      "{= env.TESTDIR =}/configs/maps/strict.phishing",
    ];
    STRICTER_PHISHING = [
      "{= env.TESTDIR =}/configs/maps/stricter.phishing"
    ]
  }
}

redis {
  servers = "{= env.REDIS_ADDR =}:{= env.REDIS_PORT =}";
  expand_keys = true;
}

regexp {
  CONFIG_SELECTOR_RE_RCPT_SUBJECT {
    re =  'test=/test@user.com some subject/$',
    score = 100500,
  }
}

spf {
  external_relay = [
        "{= env.TESTDIR =}/configs/maps/external_relay_ip.list",
  ];
}

symbols {
  FOUR_POINTS = {
    score = 4.0,
  }
  SYM1 = {
    score = 1.0,
  }
}

worker "controller" {
    bind_socket = "{= env.LOCAL_ADDR =}:{= env.PORT_CONTROLLER =}";
    keypair {
        pubkey = "{= env.KEY_PUB1 =}";
        privkey = "{= env.KEY_PVT1 =}";
    }
}

worker "normal" {
    count = 1;
    bind_socket = "{= env.LOCAL_ADDR =}:{= env.PORT_NORMAL =}";
    keypair {
        pubkey = "{= env.KEY_PUB1 =}";
        privkey = "{= env.KEY_PVT1 =}";
    }
}
