From: Stephan Bosch Date: Mon, 27 Aug 2018 17:46:21 +0000 (+0200) Subject: submission: Make HELO/EHLO reply submission a separate public function. X-Git-Tag: 2.3.9~1354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c66087d92315502690a15d035ac011ad523436d;p=thirdparty%2Fdovecot%2Fcore.git submission: Make HELO/EHLO reply submission a separate public function. --- diff --git a/src/submission/cmd-helo.c b/src/submission/cmd-helo.c index 529c5f851e..eed4a48b3c 100644 --- a/src/submission/cmd-helo.c +++ b/src/submission/cmd-helo.c @@ -38,17 +38,17 @@ static void cmd_helo_update_xclient(struct client *client, client->xclient_sent = TRUE; } -static void -cmd_helo_do_reply(struct client *client, struct smtp_server_cmd_ctx *cmd, - struct cmd_helo_context *helo) +void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_helo *data) { + struct client *client = smtp_server_connection_get_context(cmd->conn); enum smtp_capability proxy_caps = smtp_client_connection_get_capabilities(client->proxy_conn); struct smtp_server_reply *reply; uoff_t cap_size; reply = smtp_server_reply_create_ehlo(cmd->cmd); - if (!helo->data->helo.old_smtp) { + if (!data->helo.old_smtp) { string_t *burl_params = t_str_new(256); str_append(burl_params, "imap"); @@ -104,7 +104,7 @@ cmd_helo_reply(struct smtp_server_cmd_ctx *cmd, struct cmd_helo_context *helo) cmd_helo_update_xclient(client, helo->data); T_BEGIN { - cmd_helo_do_reply(client, cmd, helo); + submission_helo_reply_submit(cmd, helo->data); } T_END; } diff --git a/src/submission/submission-commands.h b/src/submission/submission-commands.h index d0d5b1d706..79afe1cce6 100644 --- a/src/submission/submission-commands.h +++ b/src/submission/submission-commands.h @@ -4,6 +4,8 @@ bool client_command_handle_proxy_reply(struct client *client, const struct smtp_reply *reply, struct smtp_reply *reply_r); +void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_helo *data); int cmd_helo(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_helo *data);