]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-log: Show lda/lmtp deliveries as "save", not "copy from Dovecot Delivery Mail".
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Jun 2010 14:39:58 +0000 (15:39 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Jun 2010 14:39:58 +0000 (15:39 +0100)
--HG--
branch : HEAD

src/plugins/mail-log/mail-log-plugin.c

index 82b4795e6c6e6d20a2fef9879652c2674dac1b96..e0be1d351806ccf14e48c26878ab83e00a78e083 100644 (file)
@@ -297,9 +297,14 @@ static void mail_log_mail_copy(void *txn, struct mail *src, struct mail *dst)
                (struct mail_log_mail_txn_context *)txn;
        const char *desc;
 
-       desc = t_strdup_printf("copy from %s",
-                       str_sanitize(mailbox_get_name(src->box),
-                                    MAILBOX_NAME_LOG_LEN));
+       if (strcmp(src->box->storage->name, "raw") == 0) {
+               /* special case: lda/lmtp is saving a mail */
+               desc = "save";
+       } else {
+               desc = t_strdup_printf("copy from %s",
+                                      str_sanitize(mailbox_get_name(src->box),
+                                                   MAILBOX_NAME_LOG_LEN));
+       }
        mail_log_append_mail_message(ctx, dst, MAIL_LOG_EVENT_SAVE, desc);
 }