$OpenBSD: patch-spooler_DAgent_cpp,v 1.29 2016/04/20 18:38:41 robert Exp $
--- spooler/DAgent.cpp.orig	Wed Apr 20 13:13:54 2016
+++ spooler/DAgent.cpp	Wed Apr 20 19:54:13 2016
@@ -69,6 +69,11 @@
 #include <pwd.h>
 #endif
 
+#ifdef __OpenBSD__
+#include <sys/resource.h>
+extern char **environ;
+#endif
+
 #include "spmain.h"
 #include "TmpPath.h"
 
@@ -1727,12 +1732,18 @@ static HRESULT SendOutOfOffice(LPADRBOOK lpAdrBook, LP
 	}
 
 	{
+#ifndef __OpenBSD__
 		locale_t timelocale = createlocale(LC_TIME, "C");
+#endif
 		time_t now = time(NULL);
 		tm local;
 		localtime_r(&now, &local);
+#ifndef __OpenBSD__
 		strftime_l(szHeader, PATH_MAX, "\nDate: %a, %d %b %Y %T %z", &local, timelocale);
 		freelocale(timelocale);
+#else
+		strftime(szHeader, PATH_MAX, "\nDate: %a, %d %b %Y %T %z", &local);
+#endif
 	}
 
 	if (WriteOrLogError(fd, szHeader, strlen(szHeader)) != hrSuccess) {
@@ -3989,7 +4000,7 @@ int main(int argc, char *argv[]) {
 
 	DeliveryArgs sDeliveryArgs;
 	sDeliveryArgs.strPath = "";
-	sDeliveryArgs.strAutorespond = "/usr/sbin/zarafa-autorespond";
+	sDeliveryArgs.strAutorespond = "/usr/local/sbin/zarafa-autorespond";
 	sDeliveryArgs.bCreateFolder = false;
 	sDeliveryArgs.strDeliveryFolder.clear();
 	sDeliveryArgs.szPathSeperator = '\\';
@@ -4045,8 +4056,8 @@ int main(int argc, char *argv[]) {
 		{ "server_bind", "" },
 		{ "server_bind_intf", "" },
 #ifdef LINUX
-		{ "run_as_user", "zarafa" },
-		{ "run_as_group", "zarafa" },
+		{ "run_as_user", "_zarafa" },
+		{ "run_as_group", "_zarafa" },
 		{ "pid_file", "/var/run/zarafad/dagent.pid" },
 		{ "coredump_enabled", "no" },
 #endif
@@ -4066,11 +4077,11 @@ int main(int argc, char *argv[]) {
 		{ "log_raw_message", "no", CONFIGSETTING_RELOADABLE },
 		{ "log_raw_message_path", "/tmp", CONFIGSETTING_RELOADABLE },
 		{ "archive_on_delivery", "no", CONFIGSETTING_RELOADABLE },
-		{ "mr_autoaccepter", "/usr/sbin/zarafa-mr-accept", CONFIGSETTING_RELOADABLE },
-		{ "mr_autoprocessor", "/usr/sbin/zarafa-mr-process", CONFIGSETTING_RELOADABLE },
+		{ "mr_autoaccepter", "/usr/local/sbin/zarafa-mr-accept", CONFIGSETTING_RELOADABLE },
+		{ "mr_autoprocessor", "/usr/local/sbin/zarafa-mr-process", CONFIGSETTING_RELOADABLE },
 		{ "plugin_enabled", "yes" },
-		{ "plugin_path", "/var/lib/zarafa/dagent/plugins" },
-		{ "plugin_manager_path", "/usr/share/zarafa-dagent/python" },
+		{ "plugin_path", "/var/db/zarafa/dagent/plugins" },
+		{ "plugin_manager_path", "/usr/local/share/zarafa-dagent/python" },
 		{ "default_charset", "iso-8859-15" },
 		{ "set_rule_headers", "yes", CONFIGSETTING_RELOADABLE },
 		{ "no_double_forward", "no", CONFIGSETTING_RELOADABLE },
