diff src/lmtp/main.c @ 21872:f166a414426f

lmtp: Die at startup if config reading fails. Although most of the time it's not strictly required for config to be read here, one exception is SSL server settings. If this config reading fails, the SSL initialization just crashes. So this gives a better error message than a crash. Also config reading really isn't supposed to fail anyway.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Fri, 31 Mar 2017 16:42:55 +0300
parents 869db4bcecdb
children cb108f786fb4
line wrap: on
line diff
--- a/src/lmtp/main.c	Thu Mar 30 23:25:40 2017 +0300
+++ b/src/lmtp/main.c	Fri Mar 31 16:42:55 2017 +0300
@@ -50,8 +50,9 @@
 	i_zero(&input);
 	input.module = "lmtp";
 	input.service = "lmtp";
-	(void)master_service_settings_read(master_service,
-					   &input, &output, &error);
+	if (master_service_settings_read(master_service,
+					 &input, &output, &error) < 0)
+		i_fatal("Error reading configuration: %s", error);
 	restrict_access_by_env(NULL, FALSE);
 }