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)
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);
}
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);