-r *user@domain*, \--rcpt=*user@domain*
: Emulate that message is for specified user
+\--helo=*helo_string*
+: Imitate SMTP HELO passing from MTA
+
+\--hostname=*hostname*
+: Imitate hostname passing from MTA (rspamd assumes that it is verified by MTA)
+
-t *seconds*, \--timeout=*seconds*
: Timeout for waiting for a reply
Rspamd documentation and source codes may be downloaded from
<https://rspamd.com/>.
-[rspamd-workers]: https://rspamd.com/doc/rspamd-workers.html
\ No newline at end of file
+[rspamd-workers]: https://rspamd.com/doc/workers/
\ No newline at end of file
static gchar *deliver_to = NULL;
static gchar *rcpt = NULL;
static gchar *user = NULL;
+static gchar *helo = NULL;
+static gchar *hostname = NULL;
static gchar *classifier = "bayes";
static gchar *local_addr = NULL;
static gint weight = 1;
{ "deliver", 'd', 0, G_OPTION_ARG_STRING, &deliver_to, "Emulate that message is delivered to specified user", NULL },
{ "from", 'F', 0, G_OPTION_ARG_STRING, &from, "Emulate that message is from specified user", NULL },
{ "rcpt", 'r', 0, G_OPTION_ARG_STRING, &rcpt, "Emulate that message is for specified user", NULL },
+ { "helo", 0, 0, G_OPTION_ARG_STRING, &helo, "Imitate SMTP HELO passing from MTA", NULL },
+ { "hostname", 0, 0, G_OPTION_ARG_STRING, &hostname, "Imitate hostname passing from MTA", NULL },
{ "timeout", 't', 0, G_OPTION_ARG_INT, &timeout, "Timeout for waiting for a reply", NULL },
{ "bind", 'b', 0, G_OPTION_ARG_STRING, &local_addr, "Bind to specified ip address", NULL },
{ "commands", 0, 0, G_OPTION_ARG_NONE, &print_commands, "List available commands", NULL },
if (deliver_to != NULL) {
g_hash_table_insert (opts, "Deliver-To", deliver_to);
}
+ if (helo != NULL) {
+ g_hash_table_insert (opts, "Helo", helo);
+ }
+ if (hostname != NULL) {
+ g_hash_table_insert (opts, "Hostname", hostname);
+ }
if (pass_all) {
g_hash_table_insert (opts, "Pass", "all");
}