$OpenBSD: patch-gateway_Gateway_cpp,v 1.10 2019/06/29 13:52:11 robert Exp $

Index: gateway/Gateway.cpp
--- gateway/Gateway.cpp.orig
+++ gateway/Gateway.cpp
@@ -51,6 +51,10 @@
 #include <openssl/ssl.h>
 #include <kopano/hl.hpp>
 
+#ifdef __OpenBSD__
+#include <sys/resource.h>
+#endif
+
 /**
  * @defgroup gateway Gateway for IMAP and POP3
  * @{
@@ -300,8 +304,8 @@ int main(int argc, char *argv[]) {
 	const char *szConfig = ECConfig::GetDefaultPath("gateway.cfg");
 	bool exp_config = false;
 	static const configsetting_t lpDefaults[] = {
-		{ "run_as_user", "kopano" },
-		{ "run_as_group", "kopano" },
+		{ "run_as_user", "_kopano" },
+		{ "run_as_group", "_kopano" },
 		{ "pid_file", "/var/run/kopano/gateway.pid" },
 		{ "process_model", "thread" },
 		{"coredump_enabled", "systemdefault"},
