Three questions on 2.3.8 w/non-Kopano backends
-
Using the IMAP back end I get the following in the log when sending via SMTP:
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace error: /usr/local/share/z-push-zarafa/backend/imap/Mail/smtp.php:280 Only variables should be assigned by reference (2048) - backtrace: 6 steps
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 1:/usr/local/share/z-push-zarafa/backend/imap/imap.php:2488 - Mail_smtp->send()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 2:/usr/local/share/z-push-zarafa/backend/imap/imap.php:314 - BackendIMAP->sendMessage()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 3:/usr/local/share/z-push-zarafa/backend/combined/combined.php:268 - BackendIMAP->SendMail()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 4:/usr/local/share/z-push-zarafa/lib/request/sendmail.php:127 - BackendCombined->SendMail()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 5:/usr/local/share/z-push-zarafa/lib/request/requestprocessor.php:112 - SendMail->Handle()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 6:/usr/local/share/z-push-zarafa/index.php:107 - RequestProcessor::HandleRequest()The offending line referenced is:
$result = &$this->getSMTPObject();
I presume it’s complaining that the return can be modified by the function… it doesn’t prevent the email from being sent, however.
The other issue is that in the caldav backend if there is no organizer email set (which will be true for an event with no attendees by default) some mobiles will not match it. There’s a workaround in the code for this but the username is not set. A diff to fix this, which then requires you sign into Exchange with “domain\user” (e.g. “denninger.net\karl”) so the domain is picked up is:
root@NewFS:/disk/develop.new/zarafa/z-push/src # diff -c backend/caldav/caldav.php /usr/local/share/z-push-zarafa/backend/caldav/caldav.php *** backend/caldav/caldav.php Thu Aug 24 09:07:04 2017 --- /usr/local/share/z-push-zarafa/backend/caldav/caldav.php Thu Aug 24 10:01:31 2017 *************** *** 63,68 **** --- 63,69 ---- $this->_caldav = new CalDAVClient($url, $username, $password); if ($connected = $this->_caldav->CheckConnection()) { ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendCalDAV->Logon(): User '%s' is authenticated on CalDAV '%s'", $username, $url)); + $this->originalUsername = $username . '@' . $domain; } else { ZLog::Write(LOGLEVEL_WARN, sprintf("BackendCalDAV->Logon(): User '%s' is not authenticated on CalDAV '%s'", $username, $url)); *************** *** 1454,1457 **** $blob = TimezoneUtil::GetSyncBlobFromTZ($tz); return base64_encode($blob); } ! } \ No newline at end of file --- 1455,1458 ---- $blob = TimezoneUtil::GetSyncBlobFromTZ($tz); return base64_encode($blob); } ! }
Finally, has anyone implemented notes via other than a Kopana backend?
-
Hi tickerguy,
@tickerguy said in Three questions on 2.3.8 w/non-Kopano backends:
Using the IMAP back end I get the following in the log when sending via SMTP:
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace error: /usr/local/share/z-push-zarafa/backend/imap/Mail/smtp.php:280 Only variables should be assigned by reference (2048) - backtrace: 6 steps
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 1:/usr/local/share/z-push-zarafa/backend/imap/imap.php:2488 - Mail_smtp->send()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 2:/usr/local/share/z-push-zarafa/backend/imap/imap.php:314 - BackendIMAP->sendMessage()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 3:/usr/local/share/z-push-zarafa/backend/combined/combined.php:268 - BackendIMAP->SendMail()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 4:/usr/local/share/z-push-zarafa/lib/request/sendmail.php:127 - BackendCombined->SendMail()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 5:/usr/local/share/z-push-zarafa/lib/request/requestprocessor.php:112 - SendMail->Handle()
24/08/2017 10:23:31 [70495] [ERROR] [karl] trace: 6:/usr/local/share/z-push-zarafa/index.php:107 - RequestProcessor::HandleRequest()The offending line referenced is:
$result = &$this->getSMTPObject();
I presume it’s complaining that the return can be modified by the function… it doesn’t prevent the email from being sent, however.
There’s a JIRA ticket for this issue: https://jira.z-hub.io/browse/ZP-1276. I already approved the pull request for it, and we’ll merge it into the next Z-Push version.
@tickerguy said in Three questions on 2.3.8 w/non-Kopano backends:
The other issue is that in the caldav backend if there is no organizer email set (which will be true for an event with no attendees by default) some mobiles will not match it. There’s a workaround in the code for this but the username is not set. A diff to fix this, which then requires you sign into Exchange with “domain\user” (e.g. “denninger.net\karl”) so the domain is picked up is:
root@NewFS:/disk/develop.new/zarafa/z-push/src # diff -c backend/caldav/caldav.php /usr/local/share/z-push-zarafa/backend/caldav/caldav.php *** backend/caldav/caldav.php Thu Aug 24 09:07:04 2017 --- /usr/local/share/z-push-zarafa/backend/caldav/caldav.php Thu Aug 24 10:01:31 2017 *************** *** 63,68 **** --- 63,69 ---- $this->_caldav = new CalDAVClient($url, $username, $password); if ($connected = $this->_caldav->CheckConnection()) { ZLog::Write(LOGLEVEL_DEBUG, sprintf("BackendCalDAV->Logon(): User '%s' is authenticated on CalDAV '%s'", $username, $url)); + $this->originalUsername = $username . '@' . $domain; } else { ZLog::Write(LOGLEVEL_WARN, sprintf("BackendCalDAV->Logon(): User '%s' is not authenticated on CalDAV '%s'", $username, $url)); *************** *** 1454,1457 **** $blob = TimezoneUtil::GetSyncBlobFromTZ($tz); return base64_encode($blob); } ! } \ No newline at end of file --- 1455,1458 ---- $blob = TimezoneUtil::GetSyncBlobFromTZ($tz); return base64_encode($blob); } ! }
Caldav backend is a community contribution, so fixes and improvements are always welcome. If you’d like to contribute this code, please take a look at https://wiki.z-hub.io/display/ZP/Development+guidelines. That would get the code into the release faster.
@tickerguy said in Three questions on 2.3.8 w/non-Kopano backends:
Finally, has anyone implemented notes via other than a Kopana backend?
I think zimbra backend has them as well. @liverpoolfcfan knows it for sure.
Manfred
-
Thanks… I will look at contributing the caldav fix.
There’s a further problem I’ve found - the IMAP backend doesn’t support subfolders at all, and my server does – which makes them inaccessible. The “forked” version of Z-push (fmbete’s) which I am running right now does support them properly; I also have some other contributions to that codebase that I’d be happy to bring over here too; the most-important is a change so a “delete” command only actually deletes if in the Trash folder; it otherwise moves to the Trash and marks it read.
This is critical for IMAP backend connections because IMAP as a protocol on a delete command doesn’t actually delete – it just sets the deleted flag. The “expunge” command to the server then removes everything in the current folder with the delete flag set. So what happens if you do a “delete/expunge” the way the code currently sits is that if you have, say, a Thunderbird PC client connected to the same IMAP server, and you have marked several messages for deletion, they’re not actually gone yet. Now you delete one email on your phone and BANG – everything you marked is permanently expunged. That is never what you want to happen… It doesn’t bite you of course if you’re never on anything but an Exchange client, but in a multi-client environment you’ll get nailed by that one and it will result in much crying because Expunge really IS expunge…
So if I can figure out how to get IMAP folders to work properly on this rev then I’ll also contribute the change to fix that, which is sorta important for anyone with an IMAP backend (e.g. someone using Dovecot / Postfix in a multi-client environment, etc.)
Thanks in advance for any further pointers you can provide.
-
Hi tickerguy,
Francisco (fmbiete) contributed his changes to the imap backend and we merged them into Z-Push for 2.3.0. I don’t know though if there are more changes which haven’t made into the code and how different this forked version is from the current Z-Push.
Feel free to open pull requests with the changes and we’ll review them.
Manfred
-
The delete change is definitely not there…
I sent the request in for approval of my Jira account and will send in the patch for that once it’s set up. I started the issue and posted a cdiff as an attachment, but don’t see a “create branch” link (which I assume means I’m not yet approved?)
-
Hi tickerguy,
I’ve added your user to the Z-Push project. Please check if you are able to change ticket’s status and also create a branch (you might have to login into stash.z-hub.io once for that - the credentials are the same as for JIRA).
Manfred
-
First one done - can I email you somehow or can you toss me one? (there’s an error in my profile I cannot edit) – Thanks
-
Hi tickerguy,
sorry, I don’t get it. What kind of error do you have?
Manfred
-
(Fixed, thanks)
-
That’s easy. Fixed your profile in JIRA. You can alter your previous post if you don’t want to leave your last name exposed.
Manfred