From: Stephan Bosch Date: Wed, 29 Aug 2018 21:43:43 +0000 (+0200) Subject: submission: Split the NOOP command into a generic part and a part related to relaying... X-Git-Tag: 2.3.9~1346 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a033a0ab6028635f5c7c5baaff22c00257e1ac4f;p=thirdparty%2Fdovecot%2Fcore.git submission: Split the NOOP command into a generic part and a part related to relaying to an MTA. --- diff --git a/src/submission/cmd-noop.c b/src/submission/cmd-noop.c index b3e35c12e8..6cd7da50bb 100644 --- a/src/submission/cmd-noop.c +++ b/src/submission/cmd-noop.c @@ -33,9 +33,8 @@ static void cmd_noop_proxy_cb(const struct smtp_reply *proxy_reply, } } -int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd) +int cmd_noop_relay(struct client *client, struct smtp_server_cmd_ctx *cmd) { - struct client *client = conn_ctx; struct cmd_noop_context *noop_cmd; noop_cmd = p_new(cmd->pool, struct cmd_noop_context, 1); @@ -46,3 +45,10 @@ int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd) (client->proxy_conn, 0, cmd_noop_proxy_cb, noop_cmd); return 0; } + +int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd) +{ + struct client *client = conn_ctx; + + return cmd_noop_relay(client, cmd); +} diff --git a/src/submission/submission-commands.h b/src/submission/submission-commands.h index 640198b21c..c5b0cc1584 100644 --- a/src/submission/submission-commands.h +++ b/src/submission/submission-commands.h @@ -16,6 +16,7 @@ int cmd_data_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, struct istream *data_input); int cmd_vrfy_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, const char *param); +int cmd_noop_relay(struct client *client, struct smtp_server_cmd_ctx *cmd); void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_helo *data);