Page Menu
Home
WMGMC Issues
搜索
Configure Global Search
登录
Files
F16147
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
订阅
标记用于日后
授予令牌
Size
5 KB
Referenced Files
None
订阅者
None
View Options
diff --git a/data/conf/rspamd/local.d/arc.conf b/data/conf/rspamd/local.d/arc.conf
new file mode 100644
index 00000000..578056f9
--- /dev/null
+++ b/data/conf/rspamd/local.d/arc.conf
@@ -0,0 +1,30 @@
+# If false, messages with empty envelope from are not signed
+allow_envfrom_empty = false;
+# If true, envelope/header domain mismatch is ignored
+allow_hdrfrom_mismatch = false;
+# If true, multiple from headers are allowed (but only first is used)
+allow_hdrfrom_multiple = true;
+# If true, username does not need to contain matching domain
+allow_username_mismatch = true;
+# If false, messages from authenticated users are not selected for signing
+auth_only = true;
+# Default path to key, can include '$domain' and '$selector' variables
+path = "/data/dkim/keys/$domain.dkim";
+# Default selector to use
+selector = "dkim";
+# If false, messages from local networks are not selected for signing
+sign_local = true;
+# Symbol to add when message is signed
+symbol = "ARC_SIGNED";
+# Whether to fallback to global config
+try_fallback = true;
+# Domain to use for DKIM signing: can be "header" or "envelope"
+use_domain = "envelope";
+# Whether to normalise domains to eSLD
+use_esld = false;
+# Whether to get keys from Redis
+use_redis = true;
+# Hash for DKIM keys in Redis
+key_prefix = "DKIM_PRIV_KEYS";
+# Selector map
+selector_prefix = "DKIM_SELECTORS";
diff --git a/data/conf/rspamd/local.d/milter_headers.conf b/data/conf/rspamd/local.d/milter_headers.conf
new file mode 100644
index 00000000..3e4f8fbc
--- /dev/null
+++ b/data/conf/rspamd/local.d/milter_headers.conf
@@ -0,0 +1,39 @@
+use = ["spam-header", "x-spamd-result", "x-rspamd-queue-id", "authentication-results"];
+skip_local = false;
+skip_authenticated = false;
+routines {
+ spam-header {
+ header = "X-Spam-Flag";
+ value = "YES";
+ remove = 1;
+ }
+ authentication-results {
+ header = "Authentication-Results";
+ remove = 1;
+ spf_symbols {
+ pass = "R_SPF_ALLOW";
+ fail = "R_SPF_FAIL";
+ softfail = "R_SPF_SOFTFAIL";
+ neutral = "R_SPF_NEUTRAL";
+ temperror = "R_SPF_DNSFAIL";
+ none = "R_SPF_NA";
+ permerror = "R_SPF_PERMFAIL";
+ }
+ dkim_symbols {
+ pass = "R_DKIM_ALLOW";
+ fail = "R_DKIM_REJECT";
+ temperror = "R_DKIM_TEMPFAIL";
+ none = "R_DKIM_NA";
+ permerror = "R_DKIM_PERMFAIL";
+ }
+ dmarc_symbols {
+ pass = "DMARC_POLICY_ALLOW";
+ permerror = "DMARC_BAD_POLICY";
+ temperror = "DMARC_DNSFAIL";
+ none = "DMARC_NA";
+ reject = "DMARC_POLICY_REJECT";
+ softfail = "DMARC_POLICY_SOFTFAIL";
+ quarantine = "DMARC_POLICY_QUARANTINE";
+ }
+ }
+}
diff --git a/data/conf/rspamd/local.d/mx_check.conf b/data/conf/rspamd/local.d/mx_check.conf
new file mode 100644
index 00000000..6a775a21
--- /dev/null
+++ b/data/conf/rspamd/local.d/mx_check.conf
@@ -0,0 +1,7 @@
+timeout = 1.0;
+symbol_bad_mx = "MX_INVALID";
+symbol_no_mx = "MX_MISSING";
+symbol_good_mx = "MX_GOOD";
+expire = 86400;
+key_prefix = "rmx";
+enabled = true;
diff --git a/data/conf/rspamd/local.d/rspamd.conf.local b/data/conf/rspamd/local.d/rspamd.conf.local
index 735ed822..59ee36f4 100644
--- a/data/conf/rspamd/local.d/rspamd.conf.local
+++ b/data/conf/rspamd/local.d/rspamd.conf.local
@@ -1,5 +1,14 @@
# rspamd.conf.local
history_redis {}
worker "log_helper" {
count = 1;
}
+worker "rspamd_proxy" {
+ bind_socket = "rspamd:9900";
+ milter = true;
+ upstream {
+ name = "localhost";
+ default = true;
+ hosts = "rspamd:11333"
+ }
+}
diff --git a/data/conf/rspamd/lua/rspamd.local.lua b/data/conf/rspamd/lua/rspamd.local.lua
index bb795c58..db8a08d5 100644
--- a/data/conf/rspamd/lua/rspamd.local.lua
+++ b/data/conf/rspamd/lua/rspamd.local.lua
@@ -1,61 +1,61 @@
rspamd_config.MAILCOW_AUTH = {
callback = function(task)
local uname = task:get_user()
if uname then
return 1
end
end
}
local redis_params
redis_params = rspamd_parse_redis_server('tag_settings')
if redis_params then
rspamd_config:register_symbol({
name = 'TAG_MOO',
type = 'postfilter',
callback = function(task)
local util = require("rspamd_util")
local rspamd_logger = require "rspamd_logger"
local tagged_rcpt = task:get_symbol("TAGGED_RCPT")
local mailcow_domain = task:get_symbol("RCPT_MAILCOW_DOMAIN")
local user = task:get_recipients(0)[1]['user']
local domain = task:get_recipients(0)[1]['domain']
local rcpt = user .. '@' .. domain
if tagged_rcpt and mailcow_domain then
local tag = tagged_rcpt[1].options[1]
rspamd_logger.infox("found tag: %s", tag)
local action = task:get_metric_action('default')
rspamd_logger.infox("metric action now: %s", action)
if action ~= 'no action' and action ~= 'greylist' then
rspamd_logger.infox("skipping tag handler for action: %s", action)
task:set_metric_action('default', action)
return true
end
local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
if wants_subject_tag then
rspamd_logger.infox("user wants subject modified for tagged mail")
local sbj = task:get_header('Subject')
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
- task:set_rmilter_reply({
+ task:set_milter_reply({
remove_headers = {['Subject'] = 1},
add_headers = {['Subject'] = new_sbj}
})
else
rspamd_logger.infox("Add X-Moo-Tag header")
- task:set_rmilter_reply({
+ task:set_milter_reply({
add_headers = {['X-Moo-Tag'] = 'YES'}
})
end
end
end,
priority = 11
})
end
File Metadata
详情
附加的
Mime Type
text/x-diff
Expires
9月 11 Thu, 1:58 PM (16 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5617
默认替代文本
(5 KB)
Attached To
Mode
rMAILCOW mailcow-tracking
附加的
Detach File
Event Timeline
Log In to Comment