Hello community,

here is the log from the commit of package kopano for openSUSE:Factory checked 
in at 2017-12-05 01:30:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kopano (Old)
 and      /work/SRC/openSUSE:Factory/.kopano.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kopano"

Tue Dec  5 01:30:04 2017 rev:9 rq:548010 version:8.4.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kopano/kopano.changes    2017-11-09 
14:03:53.269801682 +0100
+++ /work/SRC/openSUSE:Factory/.kopano.new/kopano.changes       2017-12-05 
01:30:09.097487048 +0100
@@ -1,0 +2,23 @@
+Sun Dec  3 23:09:31 UTC 2017 - [email protected]
+
+- Add 0001-build-fix-build-error-w.r.t.-gettimeofday.patch
+
+-------------------------------------------------------------------
+Thu Nov 23 13:52:58 UTC 2017 - [email protected]
+
+- Replace references to /var/adm/fillup-templates with new 
+  %_fillupdir macro (boo#1069468)
+
+-------------------------------------------------------------------
+Wed Nov 15 10:57:23 UTC 2017 - [email protected]
+
+- Update to bugfix snapshot 8.4.4
+  * common: fix detection of local connections that need not use
+    zlib compression
+  * libserver: improve ECICS error reporting
+  * dagent: reenable automated backtraces when invoked with -f
+  * php5-ext: fix positive retval setting in error case
+  * dagent: redirect rule led to crash
+  * inetmapi: overwrite recipients instead of appending
+
+-------------------------------------------------------------------

Old:
----
  kopanocore-8.4.2.0.tar.xz

New:
----
  0001-build-fix-build-error-w.r.t.-gettimeofday.patch
  kopanocore-8.4.4.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kopano.spec ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:17.313188581 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:17.317188435 +0100
@@ -17,10 +17,15 @@
 #
 
 
-%define version_unconverted 8.4.2.0
+#Compat macro for new _fillupdir macro introduced in Nov 2017
+%if ! %{defined _fillupdir}
+  %define _fillupdir /var/adm/fillup-templates
+%endif
+
+%define version_unconverted 8.4.4.0
 
 Name:           kopano
-Version:        8.4.2.0
+Version:        8.4.4.0
 Release:        0
 Summary:        Groupware server suite
 License:        AGPL-3.0
@@ -29,6 +34,7 @@
 Source:         kopanocore-%version.tar.xz
 Source3:        %name-rpmlintrc
 Source4:        build.collax
+Patch1:         0001-build-fix-build-error-w.r.t.-gettimeofday.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  gcc-c++
 BuildRequires:  gettext-devel
@@ -544,6 +550,7 @@
 echo Detected old RPM with broken _initddir
 %endif
 %setup -qn kopanocore-%version
+%patch -P 1 -p1
 
 %build
 autoreconf -fi
@@ -590,12 +597,16 @@
 b="%buildroot"
 make -C obj/ install DESTDIR="$b"
 find "$b" -type f -name "*.la" -print -delete
+if test "%_fillupdir" != "/var/adm/fillup-templates"; then
+       mkdir -p "$b/%_fillupdir"
+       mv "$b/var/adm/fillup-templates"/* "$b/%_fillupdir/"
+fi
 %if "%_repository" == "RHEL_6_PHP_56" || "%_repository" == "RHEL_7_PHP_56"
 mkdir -p "$b/%_prefix/lib/systemd/system/kopano-dagent.service.d"
 cat >"$b/%_prefix/lib/systemd/system/kopano-dagent.service.d/scl.conf" <<-EOF
        [Service]
        Environment=X_SCLS=rh-php56 
-       Envirnoment=LD_LIBRARY_PATH=/opt/rh/rh-php56/root/usr/lib64
+       Environment=LD_LIBRARY_PATH=/opt/rh/rh-php56/root/usr/lib64
        
Environment=PATH=/usr/local/sbin:/usr/local/bin:/opt/rh/rh-php56/root/usr/sbin:/opt/rh/rh-php56/root/usr/bin:/usr/sbin:/usr/bin
 EOF
 %endif
@@ -899,7 +910,7 @@
 %config(noreplace) %_sysconfdir/logrotate.d/*
 %doc AGPL-3
 %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version}
-%_sysconfdir/sysconfig/kopano
+%config(noreplace) %_sysconfdir/sysconfig/kopano
 %endif
 %dir %_prefix/lib/systemd/
 %dir %_prefix/lib/systemd/system/
@@ -907,7 +918,7 @@
 %_prefix/lib/tmpfiles.d/
 %_mandir/man7/kopano.7*
 %if 0%{?suse_version}
-/var/adm/fillup-templates/sysconfig.kopano
+%_fillupdir/sysconfig.kopano
 %endif
 %attr(0750,kopano,kopano) %dir %_localstatedir/log/kopano/
 
@@ -1136,6 +1147,7 @@
 %_docdir/kopano/kopano.ldif
 %_docdir/kopano/kopano.schema
 %_docdir/kopano/example-config/apparmor.d/
+%_docdir/kopano/example-config/apparmor.d/usr.sbin.kopano-dagent
 
 %files server-packages
 %defattr(-,root,root)

++++++ 0001-build-fix-build-error-w.r.t.-gettimeofday.patch ++++++
>From a90503c66509d69017d8388f1edcf37e1148b20a Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <[email protected]>
Date: Fri, 1 Dec 2017 18:03:23 +0100
Subject: [PATCH] build: fix build error w.r.t. gettimeofday

ECIndexer must have relied on some implicit include; it causes
a build error in the current openSUSE TW.

ECIndexer.cpp:366:2: error: 'gettimeofday' was not declared in this scope
   gettimeofday(&tstart, NULL);
---
 provider/libserver/ECIndexer.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/provider/libserver/ECIndexer.cpp b/provider/libserver/ECIndexer.cpp
index 5a0cc444..fc50e385 100644
--- a/provider/libserver/ECIndexer.cpp
+++ b/provider/libserver/ECIndexer.cpp
@@ -33,6 +33,7 @@
 #include <new>
 #include <string>
 #include <list>
+#include <sys/time.h>
 
 namespace KC {
 
-- 
2.15.0

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:17.385185965 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:17.385185965 +0100
@@ -1,5 +1,5 @@
 pkgname=kopano
-pkgver=8.4.2.0
+pkgver=8.4.4.0
 pkgrel=0
 pkgdesc='Kopano'
 arch=('x86_64')

++++++ _service ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:17.417184803 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:17.417184803 +0100
@@ -4,8 +4,8 @@
                <param 
name="url">https://stash.kopano.io/scm/kc/kopanocore.git</param>
                <param name="revision">kc-8.4.x</param>
                <param name="filename">kopanocore</param>
-               <param name="parent-tag">kopanocore-8.4.2</param>
-               <param name="versionformat">8.4.2.@TAG_OFFSET@</param>
+               <param name="parent-tag">kopanocore-8.4.4</param>
+               <param name="versionformat">8.4.4.@TAG_OFFSET@</param>
        </service>
        <service name="recompress" mode="disabled">
                <param name="file">*.tar</param>

++++++ build.collax ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:17.429184366 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:17.429184366 +0100
@@ -2,7 +2,7 @@
 
 set -x
 source=kopanocore
-version=8.4.2.0
+version=8.4.4.0
 revnum=0
 build=0
 

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:17.457183349 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:17.457183349 +0100
@@ -1,4 +1,4 @@
-kopano (8.4.2.0-0) unstable; urgency=low
+kopano (8.4.4.0-0) unstable; urgency=low
 
   * Current release.
 

++++++ kopano.dsc ++++++
--- /var/tmp/diff_new_pack.KW4Q60/_old  2017-12-05 01:30:18.301152689 +0100
+++ /var/tmp/diff_new_pack.KW4Q60/_new  2017-12-05 01:30:18.305152544 +0100
@@ -1,7 +1,7 @@
 Format: 1.0
 Source: kopano
 Architecture: any all
-Version: 8.4.2.0-0
+Version: 8.4.4.0-0
 DEBTRANSFORM-RELEASE: 1
 Maintainer: Kopano Development <[email protected]>
 Homepage: https://kopano.com

++++++ kopanocore-8.4.2.0.tar.xz -> kopanocore-8.4.4.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/ECtools/passwd/passwd.cpp 
new/kopanocore-8.4.4.0/ECtools/passwd/passwd.cpp
--- old/kopanocore-8.4.2.0/ECtools/passwd/passwd.cpp    2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/ECtools/passwd/passwd.cpp    2017-11-23 
18:04:27.000000000 +0100
@@ -242,30 +242,30 @@
                
                if(passprompt)
                {
-                       std::unique_ptr<char[], cstdlib_deleter> 
tmp(get_password("Enter old password:"));
+                       char *tmp = get_password("Enter old password:");
                        if (tmp == nullptr) {
                                cerr << "Wrong old password" << endl;
                                goto exit;
                        }
                        
                        cout << endl;
-                       szOldPassword = tmp.get();
+                       szOldPassword = tmp; /* tmp is a static buffer */
                        oldpassword = szOldPassword.c_str();
-                       tmp.reset(get_password("Enter new password:"));
+                       tmp = get_password("Enter new password:");
                        if (tmp == nullptr) {
                                cerr << "Wrong new password" << endl;
                                goto exit;
                        }
 
                        cout << endl;
-                       szNewPassword = tmp.get();
+                       szNewPassword = tmp;
                        newpassword = szNewPassword.c_str();
-                       tmp.reset(get_password("Re-Enter password:"));
+                       tmp = get_password("Re-Enter password:");
                        if (tmp == nullptr) {
                                cerr << "Wrong new password" << endl;
                                goto exit;
                        }
-                       if (szNewPassword != tmp.get())
+                       if (szNewPassword != std::string(tmp))
                                cerr << "Passwords don't match" << endl;
                        cout << endl;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/Makefile.am 
new/kopanocore-8.4.4.0/Makefile.am
--- old/kopanocore-8.4.2.0/Makefile.am  2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/Makefile.am  2017-11-23 18:04:27.000000000 +0100
@@ -951,7 +951,7 @@
        common/include/kopano/ecversion.h
 
 BUILT_SOURCES += source-moved-check common/include/kopano/ecversion.h
-CLEANFILES += common/include/kopano/ecversion.h version
+CLEANFILES += common/include/kopano/ecversion.h
 
 dist_sbin_SCRIPTS += tools/python-scripts/kopano-cachestat
 gdbautoloaddir = ${datadir}/gdb/auto-load/${libdir}
@@ -964,7 +964,7 @@
        @${top_srcdir}/pwdcheck.sh "${abs_top_builddir}"
 
 version:
-       touch $@
+       echo "@PACKAGE_VERSION@" >version
 
 common/include/kopano/ecversion.h: version versionheader.sh
        ${MKDIR_P} common/include/kopano
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/RELNOTES.txt 
new/kopanocore-8.4.4.0/RELNOTES.txt
--- old/kopanocore-8.4.2.0/RELNOTES.txt 2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/RELNOTES.txt 2017-11-23 18:04:27.000000000 +0100
@@ -1,5 +1,21 @@
-Release notes for 8.4.2
-=======================
+Release notes for 8.4.4 (2017-11-23)
+====================================
+* common: fix detection of local connections that need not use zlib compression
+* libserver: improve ECICS error reporting [KC-880]
+* inetmapi: overwrite recipients instead of appending [KC-419]
+
+
+Release notes for 8.4.3 (2017-11-07)
+====================================
+Enhancements:
+* dagent: enable automated backtraces when invoked with -f [KC-879]
+Fixes:
+* php5-ext: fix positive retval setting in error case [KC-875]
+* dagent: redirect rule led to crash [KC-868,KC-871]
+
+
+Release notes for 8.4.2 (2017-11-02)
+====================================
 * server: revert NO_UNSIGNED_SUBTRACTIONS [KC-841,KC-869]
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/common/ECChannel.cpp 
new/kopanocore-8.4.4.0/common/ECChannel.cpp
--- old/kopanocore-8.4.2.0/common/ECChannel.cpp 2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/common/ECChannel.cpp 2017-11-23 18:04:27.000000000 
+0100
@@ -744,7 +744,7 @@
 int zcp_peerfd_is_local(int fd)
 {
        struct sockaddr_storage peer_sockaddr;
-       socklen_t peer_socklen = sizeof(sockaddr);
+       socklen_t peer_socklen = sizeof(peer_sockaddr);
        auto sa = reinterpret_cast<struct sockaddr *>(&peer_sockaddr);
        int ret = getsockname(fd, sa, &peer_socklen);
        if (ret < 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/common/StatsClient.cpp 
new/kopanocore-8.4.4.0/common/StatsClient.cpp
--- old/kopanocore-8.4.2.0/common/StatsClient.cpp       2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/common/StatsClient.cpp       2017-11-23 
18:04:27.000000000 +0100
@@ -91,7 +91,7 @@
                struct sockaddr_un laddr;
                memset(&laddr, 0, sizeof(laddr));
                laddr.sun_family = AF_UNIX;
-               int ret = snprintf(laddr.sun_path, sizeof(laddr.sun_path), 
"%s/.%x%x.sock", TmpPath::getInstance() -> getTempPath().c_str(), rand(), 
rand());
+               ret = snprintf(laddr.sun_path, sizeof(laddr.sun_path), 
"%s/.%x%x.sock", TmpPath::getInstance()->getTempPath().c_str(), rand(), rand());
                if (ret >= 0 &&
                    static_cast<size_t>(ret) >= sizeof(laddr.sun_path)) {
                        ec_log_err("%s: Random path too long (%s...) for 
AF_UNIX socket",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/configure.ac 
new/kopanocore-8.4.4.0/configure.ac
--- old/kopanocore-8.4.2.0/configure.ac 2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/configure.ac 2017-11-23 18:04:27.000000000 +0100
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT([kopano], [8.4.2], [[email protected]])
+AC_INIT([kopano], [8.4.4], [[email protected]])
 PACKAGE_ABI=8.4
 AC_CONFIG_SRCDIR([provider/server/ECServer.cpp])
 AC_CONFIG_HEADERS([common/config.h])
@@ -21,8 +21,9 @@
 AC_PROG_SED
 PKG_PROG_PKG_CONFIG
 
+# configure may rerun as part of git-checking out a different version,
+# so remove stale version
 rm -f version
-echo "$PACKAGE_VERSION" >version
 AC_SUBST([PACKAGE_ABI])
 abs_top_srcdir=`cd $srcdir; pwd`
 abs_top_builddir=`pwd`
@@ -294,15 +295,15 @@
 # Checks for MySQL 4.1 or better
 AC_DEFUN([MYSQL_WITH_MYSQL_CONFIG],[
   AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mariadb_config])
-  AC_ARG_WITH([mysql-config], AS_HELP_STRING([--with-mysql-config=PATH], [path 
to the mysql-config script of mysql 4.1]),
+  AC_ARG_WITH([mysql-config], AS_HELP_STRING([--with-mysql-config=PATH], [path 
to the mysql-config script of mysql]),
     [MYSQL_CONFIG="$withval"])
-
+  AS_IF([test -z "$MYSQL_CONFIG"], [AC_MSG_ERROR([mysql config program not 
found])])
   MYSQL_INCLUDES=`$MYSQL_CONFIG --include`
   MYSQL_LIBS=`$MYSQL_CONFIG --libs`
-  MYSQL_VERSION=`$MYSQL_CONFIG --version`
+  MYSQL_VERSION=`$MYSQL_CONFIG --version` # see if it's there
 
   if test -z "$MYSQL_VERSION"; then
-    AC_MSG_ERROR(Cannot find mysql_config. Please use --with-mysql-config=PATH 
or install libmysqlclient-dev)
+    AC_MSG_ERROR([Cannot find a mysql installation. Please use 
--with-mysql-config=PATH or install libmysqlclient-dev.])
   fi
 
   AC_SUBST(MYSQL_INCLUDES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/inetmapi/VMIMEToMAPI.cpp 
new/kopanocore-8.4.4.0/inetmapi/VMIMEToMAPI.cpp
--- old/kopanocore-8.4.2.0/inetmapi/VMIMEToMAPI.cpp     2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/inetmapi/VMIMEToMAPI.cpp     2017-11-23 
18:04:27.000000000 +0100
@@ -1124,7 +1124,7 @@
                        return hr;
 
                // actually modify recipients in mapi object
-               hr = lpMessage->ModifyRecipients(MODRECIP_ADD, lpRecipients);   
+               hr = lpMessage->ModifyRecipients(0, lpRecipients);
                if (hr != hrSuccess)
                        return hr;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/php-ext/main.cpp 
new/kopanocore-8.4.4.0/php-ext/main.cpp
--- old/kopanocore-8.4.2.0/php-ext/main.cpp     2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/php-ext/main.cpp     2017-11-23 18:04:27.000000000 
+0100
@@ -307,6 +307,7 @@
        ZEND_FE(mapi_msgstore_openmultistoretable, NULL)
        ZEND_FE(mapi_msgstore_advise, NULL)
        ZEND_FE(mapi_msgstore_unadvise, NULL)
+       ZEND_FE(mapi_msgstore_abortsubmit, nullptr)
        
        ZEND_FE(mapi_sink_create, NULL)
        ZEND_FE(mapi_sink_timedwait, NULL)
@@ -7391,8 +7392,8 @@
        MAPI_G(hr) = lpIcalToMapi->GetItem(0, 0, lpMessage);
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
- exit:
        RETVAL_TRUE;
+ exit:
        LOG_END();
        THROW_ON_ERROR();
        return;
@@ -7413,6 +7414,7 @@
        std::string strical("");
        std::string method("");
 
+       RETVAL_FALSE;
        MAPI_G(hr) = MAPI_E_INVALID_PARAMETER;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrra",
            &resSession, &resAddrBook, &resMessage, &resOptions) == FAILURE)
@@ -7431,11 +7433,11 @@
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
        MAPI_G(hr) = lpMtIcal->Finalize(0, &method, &strical);
+       RETVAL_STRING(strical.c_str(), sizeof(strical.c_str()));
  exit:
        delete lpMtIcal;
        LOG_END();
        THROW_ON_ERROR();
-       RETURN_STRING(strical.c_str(), sizeof(strical.c_str()));
 }
 
 ZEND_FUNCTION(mapi_vcftomapi)
@@ -7473,8 +7475,8 @@
        MAPI_G(hr) = conv->get_item(lpMessage);
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
- exit:
        RETVAL_TRUE;
+ exit:
        LOG_END();
        THROW_ON_ERROR();
        return;
@@ -7493,6 +7495,7 @@
        std::unique_ptr<mapitovcf> conv;
        std::string vcf;
 
+       RETVAL_FALSE;
        MAPI_G(hr) = MAPI_E_INVALID_PARAMETER;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrra",
            &resSession, &resAddrBook, &resMessage, &resOptions) == FAILURE)
@@ -7509,10 +7512,10 @@
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
        MAPI_G(hr) = conv->finalize(&vcf);
+       RETVAL_STRING(vcf.c_str(), vcf.size());
  exit:
        LOG_END();
        THROW_ON_ERROR();
-       RETURN_STRING(vcf.c_str(), vcf.size());
 }
 
 ZEND_FUNCTION(mapi_enable_exceptions)
@@ -7596,3 +7599,22 @@
        RETVAL_LONG(MAPI_G(hr));
        LOG_END();
 }
+
+ZEND_FUNCTION(mapi_msgstore_abortsubmit)
+{
+       PMEASURE_FUNC;
+       LOG_BEGIN();
+       zval *res;
+       IMsgStore *store = nullptr;
+       ENTRYID *eid = nullptr;
+       size_t eid_size = 0;
+
+       RETVAL_FALSE;
+       MAPI_G(hr) = MAPI_E_INVALID_PARAMETER;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s", &res, &eid, 
&eid_size) == FAILURE)
+               return;
+       ZEND_FETCH_RESOURCE_C(store, IMsgStore *, &res, -1, name_mapi_msgstore, 
le_mapi_msgstore);
+       MAPI_G(hr) = store->AbortSubmit(eid_size, eid, 0);
+       LOG_END();
+       THROW_ON_ERROR();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/php-ext/main.h 
new/kopanocore-8.4.4.0/php-ext/main.h
--- old/kopanocore-8.4.2.0/php-ext/main.h       2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/php-ext/main.h       2017-11-23 18:04:27.000000000 
+0100
@@ -133,6 +133,7 @@
 ZEND_FUNCTION(mapi_msgstore_openmultistoretable);
 ZEND_FUNCTION(mapi_msgstore_advise);
 ZEND_FUNCTION(mapi_msgstore_unadvise);
+ZEND_FUNCTION(mapi_msgstore_abortsubmit);
 
 ZEND_FUNCTION(mapi_sink_create);
 ZEND_FUNCTION(mapi_sink_timedwait);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/php7-ext/main.cpp 
new/kopanocore-8.4.4.0/php7-ext/main.cpp
--- old/kopanocore-8.4.2.0/php7-ext/main.cpp    2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/php7-ext/main.cpp    2017-11-23 18:04:27.000000000 
+0100
@@ -316,6 +316,7 @@
        ZEND_FE(mapi_msgstore_openmultistoretable, NULL)
        ZEND_FE(mapi_msgstore_advise, NULL)
        ZEND_FE(mapi_msgstore_unadvise, NULL)
+       ZEND_FE(mapi_msgstore_abortsubmit, nullptr)
        
        ZEND_FE(mapi_sink_create, NULL)
        ZEND_FE(mapi_sink_timedwait, NULL)
@@ -7435,8 +7436,8 @@
        MAPI_G(hr) = lpIcalToMapi->GetItem(0, 0, lpMessage);
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
- exit:
        RETVAL_TRUE;
+ exit:
        LOG_END();
        THROW_ON_ERROR();
        return;
@@ -7517,8 +7518,8 @@
        MAPI_G(hr) = conv->get_item(lpMessage);
        if (MAPI_G(hr) != hrSuccess)
                goto exit;
- exit:
        RETVAL_TRUE;
+ exit:
        LOG_END();
        THROW_ON_ERROR();
        return;
@@ -7537,6 +7538,7 @@
        std::unique_ptr<mapitovcf> conv;
        std::string vcf;
 
+       RETVAL_FALSE;
        MAPI_G(hr) = MAPI_E_INVALID_PARAMETER;
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrra",
            &resSession, &resAddrBook, &resMessage, &resOptions) == FAILURE)
@@ -7643,3 +7645,22 @@
        RETVAL_LONG(MAPI_G(hr));
        LOG_END();
 }
+
+ZEND_FUNCTION(mapi_msgstore_abortsubmit)
+{
+       PMEASURE_FUNC;
+       LOG_BEGIN();
+       zval *res;
+       IMsgStore *store = nullptr;
+       ENTRYID *eid = nullptr;
+       size_t eid_size = 0;
+
+       RETVAL_FALSE;
+       MAPI_G(hr) = MAPI_E_INVALID_PARAMETER;
+       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s", &res, &eid, 
&eid_size) == FAILURE)
+               return;
+       ZEND_FETCH_RESOURCE_C(store, IMsgStore *, &res, -1, name_mapi_msgstore, 
le_mapi_msgstore);
+       MAPI_G(hr) = store->AbortSubmit(eid_size, eid, 0);
+       LOG_END();
+       THROW_ON_ERROR();
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kopanocore-8.4.2.0/provider/libserver/ECDatabaseMySQL.cpp 
new/kopanocore-8.4.4.0/provider/libserver/ECDatabaseMySQL.cpp
--- old/kopanocore-8.4.2.0/provider/libserver/ECDatabaseMySQL.cpp       
2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/provider/libserver/ECDatabaseMySQL.cpp       
2017-11-23 18:04:27.000000000 +0100
@@ -758,7 +758,6 @@
 
 ECRESULT ECDatabase::Begin(void)
 {
-       Query("SET autocommit=0;");
        auto er = KDatabase::Begin();
 #ifdef DEBUG
 #if DEBUG_TRANSACTION
@@ -777,7 +776,6 @@
 ECRESULT ECDatabase::Commit(void)
 {
        auto er = KDatabase::Commit();
-       Query("SET autocommit=1;");
 #ifdef DEBUG
 #if DEBUG_TRANSACTION
        ec_log_debug("%08X: COMMIT", &m_lpMySQL);
@@ -795,7 +793,6 @@
 ECRESULT ECDatabase::Rollback(void)
 {
        auto er = KDatabase::Rollback();
-       Query("SET autocommit=1;");
 #ifdef DEBUG
 #if DEBUG_TRANSACTION
        ec_log_debug("%08X: ROLLBACK", &m_lpMySQL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/provider/libserver/ECICS.cpp 
new/kopanocore-8.4.4.0/provider/libserver/ECICS.cpp
--- old/kopanocore-8.4.2.0/provider/libserver/ECICS.cpp 2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/provider/libserver/ECICS.cpp 2017-11-23 
18:04:27.000000000 +0100
@@ -470,7 +470,7 @@
        list<unsigned int> lstChanges;
        std::unique_ptr<ECGetContentChangesHelper> lpHelper;
        
-       ec_log(EC_LOGLEVEL_ICS, "GetChanges(): sourcekey=%s, syncid=%d, 
changetype=%d, flags=%d", bin2hex(sFolderSourceKey).c_str(), ulSyncId, 
ulChangeType, ulFlags);
+       ec_log(EC_LOGLEVEL_ICS, "K-1200: sourcekey=%s, syncid=%d, 
changetype=%d, flags=%d", bin2hex(sFolderSourceKey).c_str(), ulSyncId, 
ulChangeType, ulFlags);
        auto gcache = g_lpSessionManager->GetCacheManager();
 
     // Get database object
@@ -511,16 +511,21 @@
             }
 
             lpDBRow = lpDBResult.fetch_row();
+                       if (lpDBRow == nullptr) {
+                               ec_log_err("K-1201: No row retrievable"); /* 
despite get_num_rows>0! */
+                               er = KCERR_DATABASE_ERROR;
+                               goto exit;
+                       }
             lpDBLen = lpDBResult.fetch_row_lengths();
-            if( lpDBRow == NULL || lpDBRow[0] == NULL || lpDBRow[1] == NULL || 
lpDBRow[2] == NULL){
+                       if (lpDBRow[0] == nullptr || lpDBRow[1] == nullptr || 
lpDBRow[2] == nullptr) {
                 er = KCERR_DATABASE_ERROR; // this should never happen
-                       ec_log_crit("%s:%d unexpected null pointer", 
__FUNCTION__, __LINE__);
+                               ec_log_err("K-1202: NULL values were returned 
from SQL");
                 goto exit;
             }
 
             if((dummy = atoui(lpDBRow[2])) != ulChangeType){
                        er = KCERR_COLLISION;
-                       ec_log_crit("GetChanges(): unexpected change type 
%u/%u", dummy, ulChangeType);
+                               ec_log_err("K-1203: unexpected change type 
%u/%u", dummy, ulChangeType);
                        goto exit;
             }
 
@@ -536,17 +541,20 @@
 
                        lpDBRow = lpDBResult.fetch_row();
                        lpDBLen = lpDBResult.fetch_row_lengths();
-                       if( lpDBRow == NULL || lpDBRow[0] == NULL || lpDBRow[1] 
== NULL) {
+                       if (lpDBRow == nullptr) {
                                std::string username;
 
                                er = 
lpSession->GetSecurity()->GetUsername(&username);
                                er = KCERR_DATABASE_ERROR;
-                               ec_log_warn(
-                                       "%s:%d The sync ID %u does not exist. "
-                                       "(unexpected null pointer) "
-                                       "session user name: %s.",
-                                       __FUNCTION__, __LINE__, ulSyncId,
-                                       username.c_str());
+                               ec_log_warn("K-1204: The sync ID %u does not 
exist. Session user name: %s.",
+                                       ulSyncId, username.c_str());
+                               goto exit;
+                       } else if (lpDBRow[0] == nullptr || lpDBRow[1] == 
nullptr) {
+                               std::string username;
+                               er = 
lpSession->GetSecurity()->GetUsername(&username);
+                               ec_log_warn("K-1205: Received NULL values from 
SQL for sync id %u. Session username: %s.",
+                                       ulSyncId, username.c_str());
+                               er = KCERR_DATABASE_ERROR;
                                goto exit;
                        }
                }
@@ -606,7 +614,7 @@
 
                        if (lpDBRow[icsSourceKey] == NULL || 
lpDBRow[icsParentSourceKey] == NULL) {
                                er = KCERR_DATABASE_ERROR;
-                               
ec_log_crit("ECGetContentChangesHelper::ProcessRow(): row null");
+                               ec_log_err("K-1206: Received NULL values from 
SQL");
                                goto exit;
                        }
                        db_rows.push_back(lpDBRow);
@@ -680,9 +688,9 @@
                                        goto exit;
 
                                while ((lpDBRow = lpDBResult.fetch_row()) != 
nullptr) {
-                                       if( lpDBRow == NULL || lpDBRow[0] == 
NULL){
+                                       if (lpDBRow[0] == nullptr) {
                                                er = KCERR_DATABASE_ERROR; // 
this should never happen
-                                               ec_log_crit("%s:%d unexpected 
null pointer", __FUNCTION__, __LINE__);
+                                               ec_log_err("K-1207: Received 
NULL values from SQL");
                                                goto exit;
                                        }
                                        lstChanges.push_back(atoui(lpDBRow[0]));
@@ -700,9 +708,9 @@
                     goto exit;
 
                 while ((lpDBRow = lpDBResult.fetch_row()) != nullptr) {
-                    if( lpDBRow == NULL || lpDBRow[0] == NULL){
+                                       if (lpDBRow[0] == nullptr) {
                         er = KCERR_DATABASE_ERROR; // this should never happen
-                       ec_log_crit("%s:%d unexpected null pointer", 
__FUNCTION__, __LINE__);
+                                               ec_log_err("K-1208: Received 
NULL values from SQL");
                         goto exit;
                     }
 
@@ -735,7 +743,7 @@
                        lpDBRow = lpDBResult.fetch_row();
                        if( lpDBRow == NULL){
                                er = KCERR_DATABASE_ERROR; // this should never 
happen
-                               ec_log_crit("%s:%d unexpected null pointer", 
__FUNCTION__, __LINE__);
+                               ec_log_err("K-1209: The \"changes\" table seems 
to be empty");
                                goto exit;
                        }
                        ulMaxChange = (lpDBRow[0] == NULL ? 0 : 
atoui(lpDBRow[0]));
@@ -793,9 +801,13 @@
                                        goto exit;
                                lpDBRow = lpDBResult.fetch_row();
                                lpDBLen = lpDBResult.fetch_row_lengths();
-                               if(lpDBRow == NULL || lpDBRow[0] == NULL || 
lpDBRow[1] == NULL || lpDBRow[2] == NULL || lpDBRow[3] == NULL) {
+                               if (lpDBRow == nullptr) {
+                                       ec_log_err("K-1210: changes.id %d not 
found", chg_id);
+                                       er = KCERR_DATABASE_ERROR;
+                                       goto exit;
+                               } else if (lpDBRow[0] == nullptr || lpDBRow[1] 
== nullptr || lpDBRow[2] == nullptr || lpDBRow[3] == nullptr) {
                                        er = KCERR_DATABASE_ERROR;
-                                       ec_log_crit("%s:%d unexpected null 
pointer", __FUNCTION__, __LINE__);
+                                       ec_log_err("K-1211: Received NULL 
values from SQL");
                                        goto exit;
                                }
 
@@ -845,15 +857,15 @@
 
                        while ((lpDBRow = lpDBResult.fetch_row()) != nullptr) {
                                lpDBLen = lpDBResult.fetch_row_lengths();
-                if (lpDBRow == NULL || lpDBRow[0] == NULL || lpDBRow[1] == 
NULL || lpDBRow[2] == NULL || lpDBRow[3] == NULL) {
+                               if (lpDBRow[0] == nullptr || lpDBRow[1] == 
nullptr || lpDBRow[2] == nullptr || lpDBRow[3] == nullptr) {
                     er = KCERR_DATABASE_ERROR; // this should never happen
-                       ec_log_crit("%s:%d unexpected null pointer", 
__FUNCTION__, __LINE__);
+                                       ec_log_err("K-1212: Received NULL 
values from SQL");
                     goto exit;
                 }
 
                                if (lpDBLen[1] < CbNewABEID("")) {
                     er = KCERR_DATABASE_ERROR; // this should never happen
-                                       ec_log_crit("%s:%d invalid size for ab 
entryid %lu", __FUNCTION__, __LINE__, static_cast<unsigned long>(lpDBLen[1]));
+                                       ec_log_err("K-1213: invalid size for ab 
entryid %lu", static_cast<unsigned long>(lpDBLen[1]));
                     goto exit;
                                }
 
@@ -950,7 +962,7 @@
                     
                 if(lpDBRow[0] == NULL || lpDBRow[1] == NULL || lpDBRow[2] == 
NULL) {
                     er = KCERR_DATABASE_ERROR;
-                       ec_log_crit("%s:%d unexpected null pointer", 
__FUNCTION__, __LINE__);
+                                       ec_log_err("K-1214: Received NULL 
values from SQL");
                     goto exit;
                 }
                 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kopanocore-8.4.2.0/provider/libserver/ECUserManagement.cpp 
new/kopanocore-8.4.4.0/provider/libserver/ECUserManagement.cpp
--- old/kopanocore-8.4.2.0/provider/libserver/ECUserManagement.cpp      
2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/provider/libserver/ECUserManagement.cpp      
2017-11-23 18:04:27.000000000 +0100
@@ -1615,7 +1615,7 @@
                        if (ulId == 0) {
                                ulId = ulIdTmp;
                        } else if (ulId != ulIdTmp) {
-                               
ec_log_crit("ECUserManagement::SearchObjectAndSync() unexpected id %u/%u", 
ulId, ulIdTmp);
+                               ec_log_err("K-1215: unexpected id %u/%u", ulId, 
ulIdTmp);
                                return KCERR_COLLISION;
                        }
                } else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/spooler/DAgent.cpp 
new/kopanocore-8.4.4.0/spooler/DAgent.cpp
--- old/kopanocore-8.4.2.0/spooler/DAgent.cpp   2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/spooler/DAgent.cpp   2017-11-23 18:04:27.000000000 
+0100
@@ -3345,10 +3345,6 @@
        unsigned int nMaxThreads;
        int nCloseFDs = 0, pCloseFDs[1] = {0};
        struct pollfd pollfd;
-    stack_t st;
-    struct sigaction act;
-    memset(&st, 0, sizeof(st));
-    memset(&act, 0, sizeof(act));
 
        nMaxThreads = atoui(g_lpConfig->GetSetting("lmtp_max_threads"));
        if (nMaxThreads == 0 || nMaxThreads == INT_MAX)
@@ -3375,30 +3371,7 @@
        // Setup signals
        signal(SIGTERM, sigterm);
        signal(SIGINT, sigterm);
-
-       signal(SIGHUP, sighup);         // logrotate
        signal(SIGCHLD, sigchld);
-       signal(SIGPIPE, SIG_IGN);
-
-       // SIGSEGV backtrace support
-    st.ss_sp = malloc(65536);
-    st.ss_flags = 0;
-    st.ss_size = 65536;
-       act.sa_sigaction = sigsegv;
-       act.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
-       sigemptyset(&act.sa_mask);
-       sigaltstack(&st, NULL);
-       sigaction(SIGSEGV, &act, NULL);
-       sigaction(SIGBUS, &act, NULL);
-       sigaction(SIGABRT, &act, NULL);
-
-       struct rlimit file_limit;
-       file_limit.rlim_cur = KC_DESIRED_FILEDES;
-       file_limit.rlim_max = KC_DESIRED_FILEDES;
-
-       if (setrlimit(RLIMIT_NOFILE, &file_limit) < 0)
-               ec_log_err("WARNING: setrlimit(RLIMIT_NOFILE, %d) failed, you 
will only be able to connect up to %d sockets. Either start the process as 
root, or increase user limits for open file descriptors (%s)", 
KC_DESIRED_FILEDES, getdtablesize(), strerror(errno));
-       unix_coredump_enable(g_lpConfig->GetSetting("coredump_enabled"));
 
        // fork if needed and drop privileges as requested.
        // this must be done before we do anything with pthreads
@@ -3496,7 +3469,6 @@
 
 exit:
        ECChannel::HrFreeCtx();
-       free(st.ss_sp);
        return hr;
 }
 
@@ -3664,6 +3636,11 @@
        int loglevel = EC_LOGLEVEL_WARNING;     // normally, log warnings and up
        bool strip_email = false;
        bool bIgnoreUnknownConfigOptions = false;
+       stack_t st;
+       struct sigaction act;
+       struct rlimit file_limit;
+       memset(&st, 0, sizeof(st));
+       memset(&act, 0, sizeof(act));
 
        DeliveryArgs sDeliveryArgs;
        sDeliveryArgs.strPath = "";
@@ -3946,6 +3923,27 @@
                }
        }
 
+       signal(SIGHUP, sighup);         // logrotate
+       signal(SIGPIPE, SIG_IGN);
+
+       // SIGSEGV backtrace support
+       st.ss_sp = malloc(65536);
+       st.ss_flags = 0;
+       st.ss_size = 65536;
+       act.sa_sigaction = sigsegv;
+       act.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
+       sigemptyset(&act.sa_mask);
+       sigaltstack(&st, NULL);
+       sigaction(SIGSEGV, &act, NULL);
+       sigaction(SIGBUS, &act, NULL);
+       sigaction(SIGABRT, &act, NULL);
+       file_limit.rlim_cur = KC_DESIRED_FILEDES;
+       file_limit.rlim_max = KC_DESIRED_FILEDES;
+
+       if (setrlimit(RLIMIT_NOFILE, &file_limit) < 0)
+               ec_log_err("WARNING: setrlimit(RLIMIT_NOFILE, %d) failed, you 
will only be able to connect up to %d sockets. Either start the process as 
root, or increase user limits for open file descriptors (%s)", 
KC_DESIRED_FILEDES, getdtablesize(), strerror(errno));
+       unix_coredump_enable(g_lpConfig->GetSetting("coredump_enabled"));
+
        if (bListenLMTP) {
                /* MAPIInitialize done inside running_service */
                hr = running_service(argv[0], bDaemonize, &sDeliveryArgs);
@@ -3990,7 +3988,7 @@
        DeleteLogger(g_lpLogger);
 
        delete g_lpConfig;
-
+       free(st.ss_sp);
        if (hr == hrSuccess || bListenLMTP)
                return EX_OK;                   // 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/spooler/Spooler.cpp 
new/kopanocore-8.4.4.0/spooler/Spooler.cpp
--- old/kopanocore-8.4.2.0/spooler/Spooler.cpp  2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/spooler/Spooler.cpp  2017-11-23 18:04:27.000000000 
+0100
@@ -490,7 +490,7 @@
        HRESULT         hr                              = hrSuccess;
        unsigned int ulMaxThreads       = 0;
        unsigned int ulFreeThreads      = 0;
-       ULONG           ulRowCount              = 0;
+       ULONG ulRowCount = 0, later_mails = 0;
        std::wstring strUsername;
        bool bForceReconnect = false;
 
@@ -537,9 +537,11 @@
                        time_t sendat;
                        
                        
FileTimeToUnixTime(lpsRowSet->aRow[0].lpProps[4].Value.ft, &sendat);
-                       if (now < sendat)
+                       if (now < sendat) {
                                // if we ever add logging here, it should 
trigger just once for this mail
+                               ++later_mails;
                                continue;
+                       }
                }
 
                // Check whether the row contains the entryid and store id
@@ -592,6 +594,8 @@
        }
 
 exit:
+       if (ulRowCount != 0)
+               ec_log_debug("Messages with delayed delivery: %d", later_mails);
        return bForceReconnect ? MAPI_E_NETWORK_ERROR : hr;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/spooler/rules.cpp 
new/kopanocore-8.4.4.0/spooler/rules.cpp
--- old/kopanocore-8.4.2.0/spooler/rules.cpp    2017-11-02 16:31:03.000000000 
+0100
+++ new/kopanocore-8.4.4.0/spooler/rules.cpp    2017-11-23 18:04:27.000000000 
+0100
@@ -780,8 +780,7 @@
                        return hr;
                MungeForwardBody(lpFwdMsg, lpOrigMessage);
        }
-
-       *lppMessage = lpFwdMsg;
+       *lppMessage = lpFwdMsg.release();
  exitpm:
        return hr;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/swig/python/kopano/kopano/item.py 
new/kopanocore-8.4.4.0/swig/python/kopano/kopano/item.py
--- old/kopanocore-8.4.2.0/swig/python/kopano/kopano/item.py    2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/swig/python/kopano/kopano/item.py    2017-11-23 
18:04:27.000000000 +0100
@@ -973,7 +973,7 @@
 
         for row in self.table(PR_MESSAGE_ATTACHMENTS).dict_rows(): # XXX 
should we use GetAttachmentTable?
             num = row[PR_ATTACH_NUM]
-            method = row[PR_ATTACH_METHOD] # XXX default
+            method = row.get(PR_ATTACH_METHOD, ATTACH_BY_VALUE)
             if method == ATTACH_EMBEDDED_MSG:
                 att = self.mapiobj.OpenAttach(num, IID_IAttachment, 0)
                 msg = att.OpenProperty(PR_ATTACH_DATA_OBJ, IID_IMessage, 0, 
MAPI_MODIFY | MAPI_DEFERRED_ERRORS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kopanocore-8.4.2.0/tools/describe_version 
new/kopanocore-8.4.4.0/tools/describe_version
--- old/kopanocore-8.4.2.0/tools/describe_version       2017-11-02 
16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/tools/describe_version       2017-11-23 
18:04:27.000000000 +0100
@@ -1,3 +1,3 @@
 #!/bin/sh
 which git >/dev/null 2>/dev/null && which perl >/dev/null 2>/dev/null && \
-git describe --match=$(git describe --first-parent | perl -pe 
's{-\d+-g[0-9a-f]+$}{$1}') "$@"
+git describe --match=$(git describe --first-parent "$@" | perl -pe 
's{-\d+-g[0-9a-f]+$}{$1}') "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kopanocore-8.4.2.0/tools/python-scripts/kopano-localize-folders 
new/kopanocore-8.4.4.0/tools/python-scripts/kopano-localize-folders
--- old/kopanocore-8.4.2.0/tools/python-scripts/kopano-localize-folders 
2017-11-02 16:31:03.000000000 +0100
+++ new/kopanocore-8.4.4.0/tools/python-scripts/kopano-localize-folders 
2017-11-23 18:04:27.000000000 +0100
@@ -2,18 +2,18 @@
 # -*- coding: utf-8 -*-
 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
 #
-import kopano
-from MAPI.Util import *
 import gettext
+import kopano
 import locale
 import sys
+from MAPI.Util import *
 
 
 def opt_args():
-    parser = kopano.parser('skpfucm')
+    parser = kopano.parser('skpfuc')
 
     parser.add_option("--lang", dest="lang", action="store", help="A <lang> 
could be: nl_NL.UTF-8")
-    parser.add_option("--reset", dest="reset", action="store_true", 
help="Reset the folder names to default: English")
+    parser.add_option("--reset", dest="reset", action="store_true", 
help="Reset the folder names to Default English")
     parser.add_option("--dry-run", dest="dryrun", action="store_true", 
help="Run script without making modifications")
     parser.add_option("--verbose", dest="verbose", action="store_true", 
help="Run script with output")
 
@@ -39,7 +39,7 @@
         try:
             locale.setlocale(locale.LC_ALL, lang)
         except locale.Error:
-            print 'Error: %s is not a language pack or is not installed' % lang
+            print 'Error: %s Is not a language pack or is not installed' % lang
             sys.exit(1)
 
         encoding = locale.getlocale()[1]
@@ -82,9 +82,9 @@
     for user in kopano.Server(options).users(options.users):
         print user.name
         if options.reset:
-            print '%s: Changing localized folder names to \"en_GB.UTF-8\"' % 
user.name
+            print '%s: Changing localized folder names to \"en_GB.UTF-8\"' % 
user.name.decode('utf-8')
         else:
-            print '%s: Changing localized folder names to \"%s\"' % 
(user.name, options.lang)
+            print '%s: Changing localized folder names to \"%s\"' % 
(user.name.decode('utf-8'), options.lang)
 
         if options.verbose:
             print 'Running in verbose mode'
@@ -95,17 +95,17 @@
             try:
                 folderobject = getattr(user.store, mapifolder)
             except AttributeError as e:
-                print 'Warning: Cannot find MAPI folder %s, error code: %s' % 
(mapifolder, e)
+                print 'Warning: Cannot find MAPI folder %s, error code: %s' % 
(mapifolder.decode('utf-8'), e)
                 continue
 
             localizedname = trans[mapifolder]
             if options.verbose or options.dryrun:
-                print 'Changing MAPI "%s" -> Renaming "%s" to "%s"' % 
(mapifolder, folderobject.name, localizedname)
+                print 'Changing MAPI "%s" -> Renaming "%s" to "%s"' % 
(mapifolder.decode('utf-8'), folderobject.name.decode('utf-8'), 
localizedname.decode('utf-8'))
             if not options.dryrun:
                 try:
                     folderobject.prop(PR_DISPLAY_NAME).set_value(localizedname)
                 except MAPI.Struct.MAPIErrorCollision:
-                    print '%s is already being used' % localizedname
+                    print '%s is already being used' % 
localizedname.decode('utf-8')
                     sys.exit(1)
 
 


Reply via email to