Skip to content

Commit

Permalink
submission: Split the RCPT command into a generic part and a part rel…
Browse files Browse the repository at this point in the history
…ated to relaying to an MTA.
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 12, 2019
1 parent 62edb8e commit 20f1717
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/submission/cmd-rcpt.c
Expand Up @@ -55,10 +55,9 @@ static void cmd_rcpt_proxy_cb(const struct smtp_reply *proxy_reply,
smtp_server_reply_forward(cmd, &reply);
}

int cmd_rcpt(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data)
int cmd_rcpt_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data)
{
struct client *client = conn_ctx;
struct cmd_rcpt_context *rcpt_cmd;

/* queue command (pipeline) */
Expand All @@ -75,3 +74,11 @@ int cmd_rcpt(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
cmd_rcpt_proxy_cb, rcpt_cmd);
return 0;
}

int cmd_rcpt(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data)
{
struct client *client = conn_ctx;

return cmd_rcpt_relay(client, cmd, data);
}
2 changes: 2 additions & 0 deletions src/submission/submission-commands.h
Expand Up @@ -8,6 +8,8 @@ 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);
int cmd_rcpt_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_rcpt *data);

void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd,
struct smtp_server_cmd_helo *data);
Expand Down

0 comments on commit 20f1717

Please sign in to comment.