commit 98fd19a: [Minor] Make X-Rspamd-Server configurable
Alexander Moisseev
moiseev at mezonplus.ru
Sat Feb 22 09:42:06 UTC 2020
Author: Alexander Moisseev
Date: 2020-02-22 10:19:46 +0300
URL: https://github.com/rspamd/rspamd/commit/98fd19a8e6786e0c6239794eed24051b1256db95 (refs/pull/3273/head)
[Minor] Make X-Rspamd-Server configurable
---
src/plugins/lua/milter_headers.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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()
More information about the Commits
mailing list