]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lda: Get hostname via mail_user_settings
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 12 Jan 2023 22:13:29 +0000 (00:13 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 20 Nov 2023 12:20:16 +0000 (14:20 +0200)
It's the same value as via mail_storage_settings, but easier to get.

src/lib-lda/mail-deliver.c

index e0f69da216b03c3131504e5ec024dd52bb373c43..346c770029d8b01c8b682946edc6b3b989052181 100644 (file)
@@ -506,13 +506,11 @@ const char *mail_deliver_get_new_message_id(struct mail_deliver_context *ctx)
 {
        static int count = 0;
        struct mail_user *user = ctx->rcpt_user;
-       const struct mail_storage_settings *mail_set =
-               mail_user_set_get_storage_set(user);
 
        return t_strdup_printf("<dovecot-%s-%s-%d@%s>",
                               dec2str(ioloop_timeval.tv_sec),
                               dec2str(ioloop_timeval.tv_usec),
-                              count++, mail_set->hostname);
+                              count++, user->set->hostname);
 }
 
 static bool mail_deliver_is_tempfailed(struct mail_deliver_context *ctx,