Skip to content

Commit

Permalink
submission: Split the VRFY 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 d574b79 commit 743c5e7
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-vrfy.c
Expand Up @@ -42,10 +42,9 @@ static void cmd_vrfy_proxy_cb(const struct smtp_reply *proxy_reply,
smtp_server_reply_forward(cmd, &reply);
}

int cmd_vrfy(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
const char *param)
int cmd_vrfy_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
const char *param)
{
struct client *client = conn_ctx;
struct cmd_vrfy_context *vrfy_cmd;

vrfy_cmd = p_new(cmd->pool, struct cmd_vrfy_context, 1);
Expand All @@ -56,3 +55,11 @@ int cmd_vrfy(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
client->proxy_conn, 0, param, cmd_vrfy_proxy_cb, vrfy_cmd);
return 0;
}

int cmd_vrfy(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
const char *param)
{
struct client *client = conn_ctx;

return cmd_vrfy_relay(client, cmd, param);
}
2 changes: 2 additions & 0 deletions src/submission/submission-commands.h
Expand Up @@ -14,6 +14,8 @@ int cmd_rset_relay(struct client *client, struct smtp_server_cmd_ctx *cmd);
int cmd_data_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
struct smtp_server_transaction *trans,
struct istream *data_input);
int cmd_vrfy_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
const char *param);

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

0 comments on commit 743c5e7

Please sign in to comment.