From 63cb04ff34cfd1a9ed818c5685634fa8725bed83 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 12 Feb 2017 17:23:37 +0000 Subject: [PATCH] [Conf] Add configurations for asn, clickhouse and dcc --- conf/modules.d/asn.conf | 30 ++++++++++++++++++ conf/modules.d/clickhouse.conf | 57 ++++++++++++++++++++++++++++++++++ conf/modules.d/dcc.conf | 25 +++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 conf/modules.d/asn.conf create mode 100644 conf/modules.d/clickhouse.conf create mode 100644 conf/modules.d/dcc.conf diff --git a/conf/modules.d/asn.conf b/conf/modules.d/asn.conf new file mode 100644 index 000000000..955e6ba33 --- /dev/null +++ b/conf/modules.d/asn.conf @@ -0,0 +1,30 @@ +# Please don't modify this file as your changes might be overwritten with +# the next update. +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine +# parameters defined on the top level +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add +# parameters defined on the top level +# +# For specific modules or configuration you can also modify +# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults +# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults +# +# See https://rspamd.com/doc/tutorials/writing_rules.html for details + +asn { + # Provider: just "rspamd" for now + provider_type = "rspamd"; + # Provider-specific configuration + provider_info { + ip4 = "asn.rspamd.com"; + ip6 = "asn6.rspamd.com"; + } + # If defined, insert symbol with lookup results + # symbol = "ASN"; + + .include(try=true,priority=5) "${DBDIR}/dynamic/asn.conf" + .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/asn.conf" + .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/asn.conf" +} diff --git a/conf/modules.d/clickhouse.conf b/conf/modules.d/clickhouse.conf new file mode 100644 index 000000000..3dbc3b60c --- /dev/null +++ b/conf/modules.d/clickhouse.conf @@ -0,0 +1,57 @@ +# Please don't modify this file as your changes might be overwritten with +# the next update. +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine +# parameters defined on the top level +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add +# parameters defined on the top level +# +# For specific modules or configuration you can also modify +# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults +# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults +# +# See https://rspamd.com/doc/tutorials/writing_rules.html for details + + +clickhouse { + # Push update when 1000 records are collected (1000 if unset) + limit = 1000; + # IP:port of Clickhouse server + # server = "localhost:8123"; + # Timeout to wait for response (5 seconds if unset) + timeout = 5; + # How many bits of sending IP to mask in logs for IPv4 (19 if unset) + ipmask = 19; + # How many bits of sending IP to mask in logs for IPv6 (48 if unset) + ipmask6 = 48; + # Record URL paths? (default false) + full_urls = false; + # This parameter points to a map of domain names + # If a message has a domain in this map in From: header and DKIM signature, + # record general metadata in a table named after the domain + #from_tables = "/etc/rspamd/clickhouse_from.map"; + # These are tables used to store data in Clickhouse + # Table used to store ASN information (default unset: not collected) + #asn_table = "rspamd_asn"; # default unset + # The following table names are set by default + # Set these if you use want to use different table names + #table = "rspamd"; # general metadata + #attachments_table = "rspamd_attachments"; # attachment metadata + #urls_table = "rspamd_urls"; # url metadata + # These are symbols of other checks in Rspamd + # Set these if you use non-default symbol names (unlikely) + #bayes_spam_symbols = ["BAYES_SPAM"]; + #bayes_ham_symbols = ["BAYES_HAM"]; + #fann_symbols = ["FANN_SCORE"]; + #fuzzy_symbols = ["FUZZY_DENIED"]; + #whitelist_symbols = ["WHITELIST_DKIM", "WHITELIST_SPF_DKIM", "WHITELIST_DMARC"]; + #dkim_allow_symbols = ["R_DKIM_ALLOW"]; + #dkim_reject_symbols = ["R_DKIM_REJECT"]; + #dmarc_allow_symbols = ["DMARC_POLICY_ALLOW"]; + #dmarc_reject_symbols = ["DMARC_POLICY_REJECT", "DMARC_POLICY_QUARANTINE"]; + + .include(try=true,priority=5) "${DBDIR}/dynamic/clickhouse.conf" + .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/clickhouse.conf" + .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/clickhouse.conf" +} diff --git a/conf/modules.d/dcc.conf b/conf/modules.d/dcc.conf new file mode 100644 index 000000000..ea774bdca --- /dev/null +++ b/conf/modules.d/dcc.conf @@ -0,0 +1,25 @@ +# Please don't modify this file as your changes might be overwritten with +# the next update. +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine +# parameters defined on the top level +# +# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add +# parameters defined on the top level +# +# For specific modules or configuration you can also modify +# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults +# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults +# +# See https://rspamd.com/doc/tutorials/writing_rules.html for details + +dcc { + # host = "/var/dcc/dccifd"; + # Port is only required if `dccifd` listens on a TCP socket + # port = 1234 + timeout = 2s; + + .include(try=true,priority=5) "${DBDIR}/dynamic/dcc.conf" + .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/dcc.conf" + .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/dcc.conf" +} -- 2.39.5