METRIC_ACTION_NOACTION,
METRIC_ACTION_MAX,
METRIC_ACTION_CUSTOM = 999,
- METRIC_ACTION_MILTER_DISCARD,
- METRIC_ACTION_MILTER_QUARANTINE
+ METRIC_ACTION_DISCARD,
+ METRIC_ACTION_QUARANTINE
};
enum rspamd_action_flags {
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);
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;
}
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";
}
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";
}
rspamd_milter_send_action (session, RSPAMD_MILTER_ACCEPT);
break;
- case METRIC_ACTION_MILTER_QUARANTINE:
+ case METRIC_ACTION_QUARANTINE:
/* TODO: be more flexible about SMTP messages */
rspamd_milter_send_action (session, RSPAMD_MILTER_QUARANTINE,
RSPAMD_MILTER_QUARANTINE_MESSAGE);
/* Quarantine also requires accept action, all hail Sendmail */
rspamd_milter_send_action (session, RSPAMD_MILTER_ACCEPT);
break;
- case METRIC_ACTION_MILTER_DISCARD:
+ case METRIC_ACTION_DISCARD:
rspamd_milter_send_action (session, RSPAMD_MILTER_DISCARD);
break;
case METRIC_ACTION_GREYLIST:
}
if (action->flags & RSPAMD_ACTION_MILTER) {
/* Treat milter action specially */
- if (action->action_type == METRIC_ACTION_MILTER_DISCARD) {
+ if (action->action_type == METRIC_ACTION_DISCARD) {
ucl_object_insert_key (obj, ucl_object_fromstring ("discard"),
"reject", 0, false);
}
- else if (action->action_type == METRIC_ACTION_MILTER_QUARANTINE) {
+ else if (action->action_type == METRIC_ACTION_QUARANTINE) {
ucl_object_insert_key (obj, ucl_object_fromstring ("quarantine"),
"reject", 0, false);
}