@@ -32,3 +32,6 @@ allow_raw_input = true; | |||
# Start ignore words when reaching the following limit, so the total | |||
# amount of words processed will not be *LIKELY more than the twice of that limit | |||
words_decay = 200; | |||
# Local networks | |||
local_addrs = "192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/8"; |
@@ -54,6 +54,7 @@ symbol). | |||
* `cores_dir`: directory where rspamd is intended to drop core files | |||
* `max_cores_size`: maximum total size of core files that are placed in `cores_dir` | |||
* `max_cores_count`: maximum number of files in `cores_dir` | |||
* `local_addrs` or `local_networks`: map or list of ip networks used as local, so certain checks are skipped for them (e.g. SPF checks) | |||
## DNS options | |||
@@ -1604,6 +1604,18 @@ rspamd_rcl_config_init (struct rspamd_config *cfg) | |||
G_STRUCT_OFFSET (struct rspamd_config, max_cores_count), | |||
RSPAMD_CL_FLAG_INT_SIZE, | |||
"Limit of files count in `cores_dir`"); | |||
rspamd_rcl_add_default_handler (sub, | |||
"local_addrs", | |||
rspamd_rcl_parse_struct_string, | |||
G_STRUCT_OFFSET (struct rspamd_config, local_addrs), | |||
0, | |||
"Use the specified addresses as local ones"); | |||
rspamd_rcl_add_default_handler (sub, | |||
"local_networks", | |||
rspamd_rcl_parse_struct_string, | |||
G_STRUCT_OFFSET (struct rspamd_config, local_addrs), | |||
0, | |||
"Use the specified addresses as local ones (alias for `local_addrs`)"); | |||
/* New DNS configuration */ | |||
ssub = rspamd_rcl_add_section_doc (&sub->subsections, "dns", NULL, NULL, |
@@ -358,7 +358,7 @@ spf_symbol_callback (struct rspamd_task *task, void *unused) | |||
} | |||
if (task->user != NULL || rspamd_inet_address_is_local (task->from_addr)) { | |||
msg_info_task ("skip SPF checks for local and authorized users"); | |||
msg_info_task ("skip SPF checks for local networks and authorized users"); | |||
return; | |||
} | |||