diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-26 17:11:55 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-26 17:11:55 +0000 |
commit | f97078913a7a45adc1f1640d31e032ff7f232e48 (patch) | |
tree | 0f9c6369f8a01176dadc910d9ef5808e35301c65 /src/libserver/cfg_utils.c | |
parent | da346dc41d500e0617a668fcb5158c1a9a3bd363 (diff) | |
download | rspamd-f97078913a7a45adc1f1640d31e032ff7f232e48.tar.gz rspamd-f97078913a7a45adc1f1640d31e032ff7f232e48.zip |
[Minor] Core: Use quarantine/dicard as semi-standard actions
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 0d3f1e75a..d288c8e06 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -1937,11 +1937,11 @@ rspamd_config_action_from_ucl (struct rspamd_config *cfg, if (strcmp (milter_action, "discard") == 0) { flags |= RSPAMD_ACTION_MILTER; - act->action_type = METRIC_ACTION_MILTER_DISCARD; + act->action_type = METRIC_ACTION_DISCARD; } else if (strcmp (milter_action, "quarantine") == 0) { flags |= RSPAMD_ACTION_MILTER; - act->action_type = METRIC_ACTION_MILTER_QUARANTINE; + act->action_type = METRIC_ACTION_QUARANTINE; } else { msg_warn_config ("unknown milter action: %s", milter_action); @@ -2239,6 +2239,12 @@ rspamd_action_from_str (const gchar *data, gint *result) case 0x167C0DF4BAA9BCECULL: /* accept */ *result = METRIC_ACTION_NOACTION; break; + case 0x4E9666ECCD3FC314ULL: /* quarantine */ + *result = METRIC_ACTION_QUARANTINE; + break; + case 0x93B346242F7F69B3ULL: /* discard */ + *result = METRIC_ACTION_DISCARD; + break; default: return FALSE; } @@ -2266,9 +2272,9 @@ rspamd_action_to_str (enum rspamd_action_type action) return "invalid max action"; case METRIC_ACTION_CUSTOM: return "custom"; - case METRIC_ACTION_MILTER_DISCARD: + case METRIC_ACTION_DISCARD: return "discard"; - case METRIC_ACTION_MILTER_QUARANTINE: + case METRIC_ACTION_QUARANTINE: return "quarantine"; } @@ -2295,9 +2301,9 @@ rspamd_action_to_str_alt (enum rspamd_action_type action) return "invalid max action"; case METRIC_ACTION_CUSTOM: return "custom"; - case METRIC_ACTION_MILTER_DISCARD: + case METRIC_ACTION_DISCARD: return "discard"; - case METRIC_ACTION_MILTER_QUARANTINE: + case METRIC_ACTION_QUARANTINE: return "quarantine"; } |