]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Split the MAIL command into a generic part and a part related to relaying...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 29 Aug 2018 20:25:18 +0000 (22:25 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 9 Oct 2018 06:41:17 +0000 (06:41 +0000)
src/submission/cmd-mail.c
src/submission/submission-commands.h

index 6cac27c136ff12d6022507111d9c0b60782d6350..1313f8eaf52e11cc87c334a799e3e6992339c934 100644 (file)
@@ -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);
+}
+
index 6d672e0e2f90cbad3a1b5803719471fce6fc018f..7babc370f6b2d9e40f2135abefcb57ec6f1dd338 100644 (file)
@@ -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);