aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-08 18:53:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-08 18:54:47 +0100
commitd9c0c2ceca62968dd1a60179e7741c0e37310643 (patch)
tree373bc145b625cf094f5a1e5496d00fd60e631d0c /src/libserver
parent69e8a342fcd56cf8bacbedc8871a319c9c9e2ba8 (diff)
downloadrspamd-d9c0c2ceca62968dd1a60179e7741c0e37310643.tar.gz
rspamd-d9c0c2ceca62968dd1a60179e7741c0e37310643.zip
[Feature] Allow to change SMTP from via milter headers
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/milter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c
index 8d8f0e9b3..2907e0414 100644
--- a/src/libserver/milter.c
+++ b/src/libserver/milter.c
@@ -1458,6 +1458,16 @@ rspamd_milter_process_milter_block (struct rspamd_milter_session *session,
}
}
}
+
+ elt = ucl_object_lookup (obj, "change_from");
+
+ if (elt && ucl_object_type (elt) == UCL_STRING) {
+ hvalue = g_string_new (ucl_object_tostring (elt));
+ rspamd_milter_send_action (session,
+ RSPAMD_MILTER_CHGFROM,
+ hvalue);
+ g_string_free (hvalue, TRUE);
+ }
}
if (action == METRIC_ACTION_ADD_HEADER) {