summaryrefslogtreecommitdiffstats
path: root/src/libserver/milter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/milter.c')
-rw-r--r--src/libserver/milter.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c
index fca4d44fb..3a3f9af14 100644
--- a/src/libserver/milter.c
+++ b/src/libserver/milter.c
@@ -1787,8 +1787,15 @@ rspamd_milter_send_task_results (struct rspamd_milter_session *session,
sizeof (RSPAMD_MILTER_XCODE_REJECT) - 1);
if (!reply) {
- reply = rspamd_fstring_new_init (RSPAMD_MILTER_REJECT_MESSAGE,
- sizeof (RSPAMD_MILTER_REJECT_MESSAGE) - 1);
+ if (milter_ctx->reject_message == NULL) {
+ reply = rspamd_fstring_new_init (
+ RSPAMD_MILTER_REJECT_MESSAGE,
+ sizeof (RSPAMD_MILTER_REJECT_MESSAGE) - 1);
+ }
+ else {
+ reply = rspamd_fstring_new_init (milter_ctx->reject_message,
+ strlen (milter_ctx->reject_message));
+ }
}
rspamd_milter_set_reply (session, rcode, xcode, reply);