summaryrefslogtreecommitdiffstats
path: root/src/client/rspamc.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-27 14:35:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-27 14:35:03 +0100
commit1af1d6ec7bf52eef7955474f8f51bc6351fa5980 (patch)
treeba6aacce0a4ca18c8265f820da060da6793b7801 /src/client/rspamc.c
parent0b2882ea9b6722a6ca9533e9121a5f30bd55fc49 (diff)
downloadrspamd-1af1d6ec7bf52eef7955474f8f51bc6351fa5980.tar.gz
rspamd-1af1d6ec7bf52eef7955474f8f51bc6351fa5980.zip
[Feature] Allow setting fuzzy flag by symbol not by value
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r--src/client/rspamc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index 638ccedfe..68c33472d 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -43,6 +43,7 @@ static gchar *sort = NULL;
static gchar **http_headers = NULL;
static gint weight = 0;
static gint flag = 0;
+static gchar *fuzzy_symbol = NULL;
static gint max_requests = 8;
static gdouble timeout = 10.0;
static gboolean pass_all;
@@ -133,6 +134,8 @@ static GOptionEntry entries[] =
"Sort output in a specific order (name, weight, time)", NULL},
{ "empty", 'E', 0, G_OPTION_ARG_NONE, &empty_input,
"Allow empty input instead of reading from stdin", NULL },
+ { "fuzzy-symbol", 'S', 0, G_OPTION_ARG_STRING, &fuzzy_symbol,
+ "Learn the specified fuzzy symbol", NULL },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
};
@@ -468,6 +471,9 @@ add_options (GQueue *opts)
rspamd_printf_gstring (numbuf, "%d", weight);
ADD_CLIENT_HEADER (opts, "Weight", numbuf->str);
}
+ if (fuzzy_symbol != NULL) {
+ ADD_CLIENT_HEADER (opts, "Symbol", fuzzy_symbol);
+ }
if (flag != 0) {
numbuf = g_string_sized_new (8);
rspamd_printf_gstring (numbuf, "%d", flag);