Skip to content

Commit

Permalink
lib-smtp: smtp-server - Record the enhanced code in the reply content.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Mar 2, 2019
1 parent 03ba35d commit 4c2dd7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-smtp/smtp-server-private.h
Expand Up @@ -64,6 +64,7 @@ struct smtp_server_recipient_hook {

struct smtp_server_reply_content {
unsigned int status;
const char *enhanced_code;
const char *status_prefix;

string_t *text;
Expand Down
1 change: 1 addition & 0 deletions src/lib-smtp/smtp-server-reply.c
Expand Up @@ -118,6 +118,7 @@ smtp_server_reply_create_index(struct smtp_server_command *cmd,
if (reply->content == NULL)
reply->content = p_new(pool, struct smtp_server_reply_content, 1);
reply->content->status = status;
reply->content->enhanced_code = p_strdup(pool, enh_code);
if (enh_code == NULL || *enh_code == '\0') {
reply->content->status_prefix =
p_strdup_printf(pool, "%03u-", status);
Expand Down

0 comments on commit 4c2dd7f

Please sign in to comment.