From: Stephan Bosch Date: Wed, 29 Aug 2018 20:25:18 +0000 (+0200) Subject: submission: Split the MAIL command into a generic part and a part related to relaying... X-Git-Tag: 2.3.9~1351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=128e1510f13fcf116744258e14560067a704f8e8;p=thirdparty%2Fdovecot%2Fcore.git submission: Split the MAIL command into a generic part and a part related to relaying to an MTA. --- diff --git a/src/submission/cmd-mail.c b/src/submission/cmd-mail.c index 6cac27c136..1313f8eaf5 100644 --- a/src/submission/cmd-mail.c +++ b/src/submission/cmd-mail.c @@ -129,10 +129,9 @@ cmd_mail_parameter_size(struct client *client, return 0; } -int cmd_mail(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, - struct smtp_server_cmd_mail *data) +int cmd_mail_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_mail *data) { - struct client *client = conn_ctx; struct cmd_mail_context *mail_cmd; enum smtp_capability proxy_caps = smtp_client_connection_get_capabilities(client->proxy_conn); @@ -159,3 +158,12 @@ int cmd_mail(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, cmd_mail_proxy_cb, mail_cmd); return 0; } + +int cmd_mail(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_mail *data) +{ + struct client *client = conn_ctx; + + return cmd_mail_relay(client, cmd, data); +} + diff --git a/src/submission/submission-commands.h b/src/submission/submission-commands.h index 6d672e0e2f..7babc370f6 100644 --- a/src/submission/submission-commands.h +++ b/src/submission/submission-commands.h @@ -6,6 +6,8 @@ bool client_command_handle_proxy_reply(struct client *client, int cmd_helo_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_helo *data); +int cmd_mail_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_mail *data); void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd, struct smtp_server_cmd_helo *data);