diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2020-02-22 10:19:46 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2020-02-22 10:19:46 +0300 |
commit | 98fd19a8e6786e0c6239794eed24051b1256db95 (patch) | |
tree | 69e591c57c0e39f212fb92be6abf11b52fa632c1 /src/plugins | |
parent | b65f3234c48e80ef3494dfb58a9c48cb78822fb7 (diff) | |
download | rspamd-98fd19a8e6786e0c6239794eed24051b1256db95.tar.gz rspamd-98fd19a8e6786e0c6239794eed24051b1256db95.zip |
[Minor] Make X-Rspamd-Server configurable
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/milter_headers.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua index 982b07dd0..0304b863a 100644 --- a/src/plugins/lua/milter_headers.lua +++ b/src/plugins/lua/milter_headers.lua @@ -56,6 +56,7 @@ local settings = { ['x-rspamd-server'] = { header = 'X-Rspamd-Server', remove = 0, + hostname = nil, -- Get the local computer host name }, ['x-rspamd-queue-id'] = { header = 'X-Rspamd-Queue-Id', @@ -295,7 +296,8 @@ local function milter_headers(task) if settings.routines['x-rspamd-server'].remove then remove[settings.routines['x-rspamd-server'].header] = settings.routines['x-rspamd-server'].remove end - add[settings.routines['x-rspamd-server'].header] = HOSTNAME + local hostname = settings.routines['x-rspamd-server'].hostname + add[settings.routines['x-rspamd-server'].header] = hostname and hostname or HOSTNAME end routines['x-spamd-bar'] = function() |