]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lda & lib-lda: "if(mail_debug){i_debug}" with "e_debug"
authorSergey Kitov <sergey.kitov@open-xchange.com>
Tue, 20 Mar 2018 08:51:21 +0000 (10:51 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 30 May 2018 07:35:53 +0000 (07:35 +0000)
src/lda/main.c
src/lib-lda/mail-send.c

index 869271f4fa08500cccf470826b253e03a2f3f85a..273ef7f2ebca90b87717243b82fe8203b23dfc9b 100644 (file)
@@ -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)
@@ -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);
        }
 
index 2e9eca6d5c450929ca07fb51e951c6973cca77d5..2a059aa760fcc29c72caed45761d826a1563d38e 100644 (file)
@@ -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);