File: 0002-lda-Default-mail_home-HOME-environment-if-not-using-.patch

package info (click to toggle)
dovecot 1%3A2.4.1%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,224 kB
  • sloc: ansic: 596,204; makefile: 7,825; sh: 6,005; cpp: 1,866; perl: 487; yacc: 412; lex: 320; python: 253; xml: 232
file content (34 lines) | stat: -rw-r--r-- 1,217 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 42864e4182c7bfe2931fdf888f3cb4ba77953dee Mon Sep 17 00:00:00 2001
From: Timo Sirainen <timo.sirainen@open-xchange.com>
Date: Mon, 26 May 2025 09:45:56 +0300
Subject: [PATCH] lda: Default mail_home=$HOME environment if not using userdb
 lookup

The previous code to do this was removed by
e57d5b9002f910c095ee5b55821395fcf1da016a
---
 src/lda/main.c | 5 +++++
 1 file changed, 5 insertions(+)

Index: dovecot/src/lda/main.c
===================================================================
--- dovecot.orig/src/lda/main.c
+++ dovecot/src/lda/main.c
@@ -478,12 +478,17 @@ int main(int argc, char *argv[])
 				       "Couldn't lookup our username (uid=%s)",
 				       dec2str(process_euid));
 		}
+		struct settings_root *set_root =
+			master_service_get_settings_root(master_service);
+		settings_root_override(set_root, "mail_home", home,
+				       SETTINGS_OVERRIDE_TYPE_DEFAULT);
 	} else {
 		i_fatal_status(EX_USAGE,
 			"destination user parameter (-d user) not given");
 	}
 	struct master_service_settings_input set_input = {
 		.preserve_user = TRUE,
+		.preserve_home = TRUE,
 	};
 	struct master_service_settings_output set_output;
 	if (master_service_settings_read(master_service, &set_input,