]> source.dussan.org Git - rspamd.git/commitdiff
[Rework] Stop using name 'rmilter' for the modern protocol
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 2 Jun 2017 14:43:00 +0000 (15:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 2 Jun 2017 14:53:34 +0000 (15:53 +0100)
src/libserver/protocol.c

index 3bb829cab731039c2077681a67abf1508d2f0313..2bfcdd6d1d7c0e005838dfc679916637b60b88ef 100644 (file)
@@ -1184,8 +1184,14 @@ rspamd_protocol_write_ucl (struct rspamd_task *task,
                                RSPAMD_MEMPOOL_RMILTER_REPLY);
 
                if (rmilter_reply) {
-                       ucl_object_insert_key (top, ucl_object_ref (rmilter_reply),
-                                       "rmilter", 0, false);
+                       if (task->cmd == CMD_CHECK_V2) {
+                               ucl_object_insert_key (top, ucl_object_ref (rmilter_reply),
+                                               "milter", 0, false);
+                       }
+                       else {
+                               ucl_object_insert_key (top, ucl_object_ref (rmilter_reply),
+                                               "rmilter", 0, false);
+                       }
                }
        }