static gboolean skip_images = FALSE;
static gboolean skip_attachments = FALSE;
static gchar *key = NULL;
+static gchar *user_agent = "rspamc";
static GList *children;
#define ADD_CLIENT_HEADER(o, n, v) do { \
"Use specified pubkey to encrypt request", NULL },
{ "exec", 'e', 0, G_OPTION_ARG_STRING, &execute,
"Execute the specified command and pass output to it", NULL },
- { "mime", 'e', 0, G_OPTION_ARG_NONE, &mime_output,
+ { "mime", 'm', 0, G_OPTION_ARG_NONE, &mime_output,
"Write mime body of message with headers instead of just a scan's result", NULL },
{"header", 0, 0, G_OPTION_ARG_STRING_ARRAY, &http_headers,
"Add custom HTTP header to query (can be repeated)", NULL},
"Skip images when learning/unlearning fuzzy", NULL },
{ "skip-attachments", '\0', 0, G_OPTION_ARG_NONE, &skip_attachments,
"Skip attachments when learning/unlearning fuzzy", NULL },
+ { "user-agent", 'U', 0, G_OPTION_ARG_STRING, &user_agent,
+ "Use specific User-Agent instead of \"rspamc\"", NULL },
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
};
GString *numbuf;
gchar **hdr, **rcpt;
- ADD_CLIENT_HEADER (opts, "User-Agent", "rspamc");
+ if (user_agent) {
+ ADD_CLIENT_HEADER (opts, "User-Agent", user_agent);
+ }
if (ip != NULL) {
rspamd_inet_addr_t *addr = NULL;