Skip to content

Commit

Permalink
lda & lib-lda: "if(mail_debug){i_debug}" with "e_debug"
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey-Kitov authored and cmouse committed Aug 7, 2018
1 parent 92b4d94 commit 4bf907e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/lda/main.c
Expand Up @@ -210,10 +210,9 @@ lda_set_rcpt_to(struct mail_deliver_context *ctx,
if (ctx->rcpt_to == NULL)
ctx->rcpt_to = rcpt_to;

if (ctx->rcpt_user->mail_debug) {
i_debug("Destination address: %s (source: %s)",
smtp_address_encode_path(rcpt_to), rcpt_to_source);
}
e_debug(ctx->rcpt_user->event,
"Destination address: %s (source: %s)",
smtp_address_encode_path(rcpt_to), rcpt_to_source);
}

static void failure_exit_callback(int *status)
Expand Down Expand Up @@ -452,8 +451,9 @@ int main(int argc, char *argv[])
ctx.set = lda_set;
ctx.smtp_set = smtp_set;

if (ctx.rcpt_user->mail_debug && *user_source != '\0') {
i_debug("userdb lookup skipped, username taken from %s",
if (*user_source != '\0') {
e_debug(ctx.rcpt_user->event,
"userdb lookup skipped, username taken from %s",
user_source);
}

Expand Down
8 changes: 3 additions & 5 deletions src/lib-lda/mail-send.c
Expand Up @@ -91,11 +91,9 @@ int mail_send_rejection(struct mail_deliver_context *ctx,
return -1;
}

if (mailbox_get_settings(mail->box)->mail_debug) {
i_debug("Sending a rejection to <%s>: %s",
smtp_address_encode(return_addr),
str_sanitize(reason, 512));
}
e_debug(mail->event, "Sending a rejection to <%s>: %s",
smtp_address_encode(return_addr),
str_sanitize(reason, 512));

vtable = get_var_expand_table(mail, recipient, reason);

Expand Down

0 comments on commit 4bf907e

Please sign in to comment.