fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
135 stars 62 forks source link

Reply to messages doesn't work... Anyone else? #32

Closed ddblack closed 10 years ago

ddblack commented 10 years ago

I don't have the 'latest' release... but I think its from December or so.

Anyone else had problems with replying to a message in your Inbox? I think it's doing a smart reply; but, I haven't traced it, yet. (I HAVE HAD MANY OTHERS SAY THIS, TOO... BUT, I'M JUST GETTING AROUND TO LOOKING AT IT.)

I can compose a new message and it sends just fine.

Logs say it can't find the folder id (hex)... Get's lost there.

THE FOLLOWING SEQUENCE SHOWS THAT WE HAVE A FOLDER ID...

13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList('a6bca8ca','1394414294')
13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-bs-1394673453'
13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList(): searching with sequence '1,2,3,4,5'
13/03/2014 01:18:14 [19501] [ INFO] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Found '0' changes
13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] Folder type: Email
13/03/2014 01:18:14 [19501] [DEBUG] [test22@domain.net] SyncCollections->SaveCollection(): Data of folder 'i/a6bca8ca' changed

THEN... WE LOSE THE FOLDER ID WHEN PRESSING REPLY ON PHONE.

3/03/2014 01:20:02 [19737] [DEBUG] [test22@domain.net] Combined->Logon('test22', '',***))
13/03/2014 01:20:02 [19737] [ INFO] [test22@domain.net] BackendIMAP->Logon(): imap_open {mail.lan.local:143/imap/tls/norsh}, test22, ***
13/03/2014 01:20:02 [19737] [DEBUG] [test22@domain.net] BackendIMAP->Logon(): User 'test22' is authenticated on '{mail.lan.local:143/imap/tls/norsh}'
13/03/2014 01:20:02 [19737] [DEBUG] [test22@domain.net] BackendCalDAV->Logon(): User 'test22' is authenticated on CalDAV
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] BackendCardDAV->Logon(): User 'test22' is authenticated on 'https://mail.lan.local:8443/caldav.php/test22/addresses/'
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] Combined->Logon() success
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] Combined->Setup('test22@domain.net', 'true', '')
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] ZPush::CommandNeedsPlainInput(3): false
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] Combined->SendMail()
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] BackendIMAP->SendMail(): RFC822: 431 bytes  forward-id: '' reply-id: 'true' parent-id: 'false' SaveInSent: 'true' ReplaceMIME: 'false'
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] BackendIMAP->SendMail(): We have a source message and we try to fetch it
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-bs-1394673453'
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('') = not found  <<<<<<<<<<<<<<<<<<<---------
13/03/2014 01:20:03 [19737] [ INFO] [test22@domain.net] StatusException: BackendIMAP->SendMail(): Could not get imapid from source folderid ' - code: 150
13/03/2014 01:20:03 [19737] [ WARN] [test22@domain.net] HTTPReturnCodeException: BackendIMAP->SendMail(): Could not get imapid from source folderid ' - code: 500
13/03/2014 01:20:03 [19737] [ INFO] [test22@domain.net] User-agent: 'Android/0.3'
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] DeviceManager->Save(): Device data changed
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] FileStateMachine->SetState() written 1197 bytes on file: '/var/lib/z-push/1/4/androidc1678713341-devicedata'
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] DeviceManager->Save(): Device data saved
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] LoopDetection->ProcessLoopDetectionTerminate()
13/03/2014 01:20:03 [19737] [DEBUG] [test22@domain.net] -------- End
13/03/2014 01:20:05 [19735] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink - Calling in 'BackendCardDAV' with 15
13/03/2014 01:20:21 [19735] [DEBUG] [test22@domain.net] DeviceManager->loadDeviceData(): Device data was changed, reloading
13/03/2014 01:20:21 [19735] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-devicedata'
13/03/2014 01:20:21 [19735] [DEBUG] [test22@domain.net] ASDevice data loaded for user: 'test22@domain.net'
13/03/2014 01:20:21 [19735] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink(30)
13/03/2014 01:20:21 [19735] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink - Calling in 'BackendIMAP' with 15
ddblack commented 10 years ago

THESE ARE THE PROBLEM FUNCTIONS...

NOTE THAT THE F%CKUP PART IS THAT MANY OTHER FUNCTIONS IN COMBINED.PHP RELY ON GetBackendFolder()...

SO... ??? (The return value of false in absence of the delimIter is messing up the works. And, I haven't followed the trail of spagetti to determine consequences of doing a butcher job on SendMail.)

 public function SendMail($sm) {
        ZLog::Write(LOGLEVEL_DEBUG, "Combined->SendMail()");
        // Convert source folderid
            ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() BEFORE->GetBackendFolder(%s)", $sm->source->folderid));
        if (isset($sm->source->folderid)) {
            $sm->source->folderid = $this->GetBackendFolder($sm->source->folderid);
            ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() AFTER->GetBackendFolder()='%s'", $sm->source->folderid));
         }
        foreach ($this->backends as $i => $b){
            if($this->backends[$i]->SendMail($sm) == true){
                return true;
            }
        }
        return false;
    }
    /**
     * Returns an understandable folderid for the backend
     *
     * @param string        $folderid       combinedid of the folder
     *
     * @access public
     * @return string
     */
    public function GetBackendFolder($folderid){
        $pos = strpos($folderid, $this->config['delimiter']);
        if($pos === false)
            return false;
        return substr($folderid,$pos + strlen($this->config['delimiter']));
    }
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] LoopDetection(): Initialized mutexid Resource id #137 and memid Resource id #138.
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] ZPush::HierarchyCommand(0): false
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] DeviceManager->ProvisioningRequired('762322894') saved device key '762322894': false
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] ZPush::CommandNeedsAuthentication(0): true
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] Combined->Logon('test22', '',***))
13/03/2014 03:51:20 [22680] [ INFO] [test22@domain.net] BackendIMAP->Logon(): imap_open {mail.lan.local:143/imap/tls/norsh}, test22, test22
13/03/2014 03:51:20 [22755] [DEBUG] [test22@domain.net] BackendCalDAV->Logon(): User 'test22' is authenticated on CalDAV
13/03/2014 03:51:20 [22673] [DEBUG] [test22@domain.net] BackendIMAP->Logon(): User 'test22' is authenticated on '{mail.lan.local:143/imap/tls/norsh}'
13/03/2014 03:51:20 [22680] [DEBUG] [test22@domain.net] BackendIMAP->Logon(): User 'test22' is authenticated on '{mail.lan.local:143/imap/tls/norsh}'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendCardDAV->Logon(): User 'test22' is authenticated on 'https://mail.lan.local:8443/caldav.php/test22/addresses/'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Logon() success
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup('test22@domain.net', 'true', '')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] ZPush::CommandNeedsPlainInput(0): false
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Sync folder: 'Email'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] SyncCollections->AddCollection(): Folder id 'i.a6bca8ca' : ref. PolicyKey '1', ref. Lifetime '10', last sync at ''
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] SyncParameters->UseCPO('DEFAULT')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] HandleSync(): Start Output
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] WBXMLEncoder->startWBXML() type: vnd.ms-sync.wbxml
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Sync->loadStates(): loading states for folder 'i.a6bca8ca'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-ef4a16e3-7c81-4840-b52c-16575ece4d2e-1'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] ZPush::GetAdditionalSyncFolderStore('i.a6bca8ca'): 'false'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup('', 'false', '')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] ZPush::GetAdditionalSyncFolderStore('i.a6bca8ca'): 'false'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup('', 'false', '')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Combined->GetExporter('i.a6bca8ca')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '0' messages in state
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList('a6bca8ca','1394423481')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-bs-1394673453'
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList(): searching with sequence '1,2,3,4,5'
13/03/2014 03:51:21 [22755] [ INFO] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Found '5' changes
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] Folder type: Email
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','5')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage('a6bca8ca','5')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','5')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','4')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage('a6bca8ca','4')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','4')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22673] [DEBUG] [test22@domain.net] BackendCalDAV->Logon(): User 'test22' is authenticated on CalDAV
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','3')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage('a6bca8ca','3')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','3')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2
13/03/2014 03:51:21 [22680] [DEBUG] [test22@domain.net] BackendCalDAV->Logon(): User 'test22' is authenticated on CalDAV
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','2')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage('a6bca8ca','2')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','2')
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2

***NO FOLDER PREFIX HERE...******

* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','1')
* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage('a6bca8ca','1')
* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->StatMessage('a6bca8ca','1')
* 13/03/2014 03:51:21 [22755] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
* 13/03/2014 03:51:22 [22755] [DEBUG] [test22@domain.net] BackendIMAP->GetMessage - getBodyPreferenceBestMatch: 2
* 13/03/2014 03:51:22 [22755] [DEBUG] [test22@domain.net] HandleSync(): Exported maxItems of messages: 5 / 5
* 13/03/2014 03:51:22 [22755] [DEBUG] [test22@domain.net] StateManager::linkState(#ASDevice, 'ef4a16e3-7c81-4840-b52c-16575ece4d2e','i.a6bca8ca'): linked to uuid 'ef4a16e3-7c81-4840-b52c-16575ece4d2e'.
* 13/03/2014 03:51:22 [22755] [DEBUG] [test22@domain.net] FileStateMachine->SetState() written 521 bytes on file: '/var/lib/z-push/1/4/androidc1678713341-ef4a16e3-7c81-4840-b52c-16575ece4d2e-2'
* 13/03/2014 03:51:22 [22755] [DEBUG] [test22@domain.net] SyncCollections->SaveCollection(): Data of folder 'i.a6bca8ca' changed

\ THEN IT SHOWS UP AGAIN... **

\ THIS IS STARING WHEN I PRESS SEND TO REPLY TO A DISPLAYED MESSAGE **

13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] -------- Start
13/03/2014 03:56:33 [22672] [ INFO] [test22@domain.net] Version='SVN-trunk-r1751' method='POST' from='70.167.70.8' cmd='SmartReply' getUser='test22@domain.net' devId='androidc1678713341' devType='Android'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Used timezone 'Etc/UTC'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Including backend file: '/usr/share/z-push/backend/combined/combined.php'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Including backend file: '/usr/share/z-push/backend/imap/imap.php'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Including backend file: '/usr/share/z-push/backend/caldav/caldav.php'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Including backend file: '/usr/share/z-push/backend/carddav/carddav.php'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Combined 3 backends loaded.
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Request::ProcessHeaders() ASVersion: 12.0
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] ZPush::CommandNeedsProvisioning(3): true
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-devicedata'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] ASDevice data loaded for user: 'test22@domain.net'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] TopCollector(): Initialized mutexid Resource id #134 and memid Resource id #135.
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] LoopDetection(): Initialized mutexid Resource id #137 and memid Resource id #138.
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] ZPush::HierarchyCommand(3): false
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] DeviceManager->ProvisioningRequired('762322894') saved device key '762322894': false
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] ZPush::CommandNeedsAuthentication(3): true
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] Combined->Logon('test22', '',***))
13/03/2014 03:56:33 [22672] [ INFO] [test22@domain.net] BackendIMAP->Logon(): imap_open {mail.lan.local:143/imap/tls/norsh}, test22, test22
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] BackendIMAP->Logon(): User 'test22' is authenticated on '{mail.lan.local:143/imap/tls/norsh}'
13/03/2014 03:56:33 [22672] [DEBUG] [test22@domain.net] BackendCalDAV->Logon(): User 'test22' is authenticated on CalDAV
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] BackendCardDAV->Logon(): User 'test22' is authenticated on 'https://mail.lan.local:8443/caldav.php/test22/addresses/'
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->Logon() success
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->Setup('test22@domain.net', 'true', '')
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] ZPush::CommandNeedsPlainInput(3): false

**** LOSING FOLDER DURING CALL TO Combined->GetBackendFolder(xxxx) DUE TO NO DELIMITER ***

* 13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->SendMail()
* 13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->SendMail() BEFORE->GetBackendFolder(a6bca8ca)
* 13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] Combined->SendMail() AFTER->GetBackendFolderid()=''

13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] BackendIMAP->SendMail(): RFC822: 431 bytes  forward-id: '' reply-id: 'true' parent-id: 'false' SaveInSent: 'true' ReplaceMIME: 'false'
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] BackendIMAP->SendMail(): We have a source message and we try to fetch it
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-bs-1394673453'

*** AND THE CONSEQUENCE OF NO DELIMITER ****

* 13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('') = not found
* 13/03/2014 03:56:34 [22672] [ INFO] [test22@domain.net] StatusException: BackendIMAP->SendMail(): Could not get imapid from source folderid ' - code: 150
* 13/03/2014 03:56:34 [22672] [ WARN] [test22@domain.net] HTTPReturnCodeException: BackendIMAP->SendMail(): Could not get imapid from source folderid ' - code: 500
* 13/03/2014 03:56:34 [22672] [ INFO] [test22@domain.net] User-agent: 'Android/0.3'

13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] DeviceManager->Save(): Device data changed
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] FileStateMachine->SetState() written 1197 bytes on file: '/var/lib/z-push/1/4/androidc1678713341-devicedata'
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] DeviceManager->Save(): Device data saved
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] LoopDetection->ProcessLoopDetectionTerminate()
13/03/2014 03:56:34 [22672] [DEBUG] [test22@domain.net] -------- End
13/03/2014 03:56:46 [22671] [DEBUG] [test22@domain.net] DeviceManager->loadDeviceData(): Device data was changed, reloading
13/03/2014 03:56:46 [22671] [DEBUG] [test22@domain.net] FileStateMachine->GetState() on file: '/var/lib/z-push/1/4/androidc1678713341-devicedata'
13/03/2014 03:56:46 [22671] [DEBUG] [test22@domain.net] ASDevice data loaded for user: 'test22@domain.net'
13/03/2014 03:56:46 [22671] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink(30)
13/03/2014 03:56:46 [22671] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink - Calling in 'BackendIMAP' with 15
13/03/2014 03:57:01 [22671] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink - Calling in 'BackendCardDAV' with 15
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->Setup('', 'false', '')
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->GetExporter('i.a6bca8ca')

13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '5' messages in state
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList('a6bca8ca','1394423837')
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] BackendIMAP->getImapIdFromFolderId('a6bca8ca') = INBOX
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] BackendIMAP->GetMessageList(): searching with sequence '1,2,3,4,5'
13/03/2014 03:57:17 [22671] [ INFO] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Found '0' changes
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->Setup('', 'false', '')
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] Combined->GetExporter('c.Ccalendar')
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '0' messages in state
13/03/2014 03:57:17 [22671] [DEBUG] [test22@domain.net] BackendCalDAV->GetMessageList('Ccalendar','1393473437')
13/03/2014 03:57:18 [22671] [ INFO] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Found '0' changes
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] Combined->Setup('', 'false', '')
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] Combined->Setup() success
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] Combined->GetExporter('d.contacts')
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '0' messages in state
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] BackendCardDAV->GetMessageList('contacts', '0')
13/03/2014 03:57:18 [22671] [ INFO] [test22@domain.net] ExportChangesDiff->InitializeExporter(): Found '0' changes
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink(30)
13/03/2014 03:57:18 [22671] [DEBUG] [test22@domain.net] BackendCombined->ChangesSink - Calling in 'BackendIMAP' with 15
ddblack commented 10 years ago

LOOKS LIKE A MESS...

1 PROBLEM TO ME IS THIS: There are dozens (if not hundreds) of places in the code where a function call is made to test , or return a value that will modify the passed parameter/argument.

For example,

function testthis( $myoldname ) {
     $myoldname = $myoldname == "good as gold" ? $myoldname : false;   *** WTF?
     return $myoldname;
}

$name = "mud";
$name = testthis( $name );

What's $name now? FALSE.

It's not even a name anymore -- it even changed type!

That's the # 1 potential bug producer I can detect in this code... return boolean values (error coditions) end up being assigned to a member of a data structure in the caller....

We should just rename the function called "test this" to "modify this"...

In the meantime... I'm testing a HACK to see if it gets us by. Fortunately, SendMail is basically a do-nothing method in the subclasses. IMAP sends mail; CalDAV and CardDAV do not. The hack should be harmless.

ddblack commented 10 years ago

THIS HACK SEEMS TO MAKE EVERYTHING WORK BETTER... Roll it into your distro. (It leaves folderid's intact... it doesn't clobber an otherwise valid id.)

/**
 * Sends an e-mail
 * This messages needs to be saved into the 'sent items' folder
 *
 * @param SyncSendMail  $sm     SyncSendMail object
 *
 * @access public
 * @return boolean
 * @throws StatusException
 */
public function SendMail($sm) {
    ZLog::Write(LOGLEVEL_DEBUG, "Combined->SendMail()");
    // Convert source folderid
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() BEFORE->GetBackendFolder(%s)", $sm->source->folderid));
    if (isset($sm->source->folderid)) {
        //  BEGIN DDBLACK
        $tmp = $this->GetBackendFolder($sm->source->folderid);    #new line
        $sm->source->folderid = $tmp ? $tmp : $sm->source->folderid;  
        ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() AFTER->GetBackendFolderid()='%s'", $sm->source->folderid));
       // END DDBLACK
     }
    foreach ($this->backends as $i => $b){
        if($this->backends[$i]->SendMail($sm) == true){
            return true;
        }
    }
    return false;
}
fmbiete commented 10 years ago

Put your log into WBXML mode. Look at this trace (I'm using Android 4.4 in a Nexus 4):

15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I  <ComposeMail:SmartReply>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   <ComposeMail:ClientId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    SendMail-167432031782836
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   </ComposeMail:ClientId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   <ComposeMail:SaveInSentItems/>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   <ComposeMail:Source>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    <ComposeMail:ItemId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I     38315
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    </ComposeMail:ItemId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    <ComposeMail:FolderId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I     i/c493d9fb
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    </ComposeMail:FolderId>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   </ComposeMail:Source>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I   <ComposeMail:MIME>
15/03/2014 17:52:12 [  326] [WBXML] [fmbiete] [androidXXXXXX] I    Date: Sat, 15 Mar 2014 17:51:54 +0100

This is the important bit ComposeMail:FolderId i/c493d9fb /ComposeMail:FolderId

The forlder ID always comes with the backend identifier. What are you using? Android, iOS, native mail application, model device...

Did you start using only the BackendIMAP and changed after to the BackendCombined?

GetBackendFolder returns false in the official z-push, to signal an error. That error is not catched after it, so it becomes a problem. I think this would be a workaround, but I want to know how it's possible your device is sending a wrong folderid.

    /**
     * Returns an understandable folderid for the backend
     *
     * @param string        $folderid       combinedid of the folder
     *
     * @access public
     * @return string
     */
    public function GetBackendFolder($folderid){
        $pos = strpos($folderid, $this->config['delimiter']);
        if($pos === false) {
            ZLog::Write(LOGLEVEL_ERROR, sprintf("BackendCombined->GetBackendFolder - No backend delimiter found in the sent folderid '%s'. This is wrong!!!", $folderid));
            return $folderid;
        }
        else {
            return substr($folderid,$pos + strlen($this->config['delimiter']));
        }
    }
ddblack commented 10 years ago

Did you start using only the BackendIMAP and changed after to the BackendCombined? <<<

No. Always used Combined.

ddblack commented 10 years ago

You might want to double-check the logic surrounding the uses and rvals of function GetBackendId(), too.

GetBackendId and GetBackendFolder perform almost identical functions. Seems that usage context is the only real difference between the two.

root@mail:/usr/share/z-push/backend/combined# vi combined.php
root@mail:/usr/share/z-push/backend/combined# grep GetBackendFolder *.php
combined.php:            $importer = $backend->GetImporter($this->GetBackendFolder($folderid));
combined.php:            return $backend->GetExporter($this->GetBackendFolder($folderid));
combined.php:            ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() BEFORE->GetBackendFolder(%s)", $sm->source->folderid));
combined.php:            $tmp = $this->GetBackendFolder($sm->source->folderid);
combined.php:            ZLog::Write(LOGLEVEL_DEBUG, sprintf("Combined->SendMail() AFTER->GetBackendFolderid()='%s'", $sm->source->folderid));
combined.php:        return $backend->Fetch($this->GetBackendFolder($folderid), $id, $contentparameters);
combined.php:        return $backend->MeetingResponse($requestid, $this->GetBackendFolder($folderid), $error);
combined.php:        return $backend->EmptyFolder($this->GetBackendFolder($folderid), $includeSubfolders);
combined.php:            return $backend->ChangesSinkInitialize($this->GetBackendFolder($folderid));
combined.php:    public function GetBackendFolder($folderid){
combined.php: $cpo->SetSearchFolderid($this->GetBackendFolder($cpo->GetSearchFolderid()));
importer.php:        return $this->icc->ImportMessageMove($id, $this->backend->GetBackendFolder($newfolder));
importer.php:            $parent = $this->backend->GetBackendFolder($parent);
importer.php:            $id = $this->backend->GetBackendFolder($id);
importer.php:        $id = $this->backend->GetBackendFolder($id);
importer.php:            $parent = $this->backend->GetBackendFolder($parent);

root@mail:/usr/share/z-push/backend/combined# vi combined.php
root@mail:/usr/share/z-push/backend/combined# grep GetBackendId *.php
combined.php:    public function GetBackendId($folderid){
importer.php:        if($this->backend->GetBackendId($this->folderid) != $this->backend->GetBackendId($newfolder)){
importer.php:                $backendid = $this->backend->GetBackendId($id);
importer.php:            $backendid = $this->backend->GetBackendId($parent);
importer.php:            if($backendid != $this->backend->GetBackendId($id)) {
importer.php:        $backendid = $this->backend->GetBackendId($id);

    /**
     * Returns an understandable folderid for the backend
     *
     * @param string        $folderid       combinedid of the folder
     *
     * @access public
     * @return string
     */
    public function GetBackendFolder($folderid){
        $pos = strpos($folderid, $this->config['delimiter']);
        if($pos === false)
            return $folderid;
        return substr($folderid,$pos + strlen($this->config['delimiter']));
    }

    /**
     * Returns backend id for a folder
     *
     * @param string        $folderid       combinedid of the folder
     *
     * @access public
     * @return object
     */
    public function GetBackendId($folderid){
        $pos = strpos($folderid, $this->config['delimiter']);
        if($pos === false)
            return false;
        return substr($folderid, 0, $pos);
    }
ddblack commented 10 years ago

FYI... Just wanna report in...

I SAID... >>> NEEDED BECAUSE Z-PUSH DOES NOT ACCOUNT FOR APACHE [or whatever] BASIC AUTH WITH LDAP TRANSLATION OF EMAIL ADDRESS TO LDAP AUTHENTICATION UID. Microsoft insists on Webserver basic authentication/authorization and even checks for cert-based auth. This is also important for SASL. I haven't fully analyzed the effects of this change.<<<

Seems that I was right. MAJOR ISSUE with the Z-Push core implementation.

Authentication/Authorization... Different clients may or may not authenticate before continuing forward and onward. I replaced all occurrences of PHP_AUTH_USER with AUTHENTICATE_UID (Apache)

The spec calls for Webserver Authentication. We live in the middle of NSA territory. Anonymous Auth ??? Makes about as much sense as an root ssh account with a blank password.

If the Zarafa crew had been thinking... using the webserver authentication mechanisms would ELIMINATE a LOT of error prone code. Why don't they just rewrite the webserver while they are at it? The Sync module is an absolute mess. It's a giant, never ending if-then-else statement. I don't think Microsoft's code is that ugly. Why? C/C++/Win32 software engineeers are not prone to write code like PHP programmers.

The problem even exists in ZLog.

    // should we write this into the user log?
    if ($loglevel <= LOGUSERLEVEL && self::$userLog) {
        // padd level for better reading
        $data = str_replace(self::getLogLevelString($loglevel),

self::getLogLevelString($loglevel,true), $data);

        // is the user authenticated?
        if (self::logToUserFile()) {
            // something was logged before the user was

authenticated, write this to the log if (!empty(self::$unAuthCache)) { @file_put_contents(LOGFILEDIR . self::logToUserFile() . ".log", implode('', self::$unAuthCache), FILE_APPEND); self::$unAuthCache = array(); } // only use plain old a-z characters for the generic log file @file_put_contents(LOGFILEDIR . self::logToUserFile() . ".log", $data, FILE_APPEND); } // the user is not authenticated yet, we save the log into memory for now else { self::$unAuthCache[] = $data; }

Outlook 2013 and Windows 8 Mail produce two different sets of results... For example:

Off2013... 21/03/2014 01:36:57 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:02 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:07 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:11 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:16 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:21 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:26 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:31 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:36 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:41 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:46 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:51 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:37:55 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:00 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:05 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:11 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:17 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:22 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:27 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:31 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:37 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:40 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:47 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:50 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:38:57 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:00 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:07 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:10 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:17 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:20 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:27 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:29 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:36 [30854] [DEBUG] [test22@domain.net] Combined->GetExporter('') 21/03/2014 01:39:39 [30856] [DEBUG] [test22@domain.net] Combined->GetExporter('')

WINDOWS 8... 21/03/2014 01:40:13 [31115] [DEBUG] [test22] Combined->GetExporter('') 21/03/2014 01:40:20 [30857] [DEBUG] [test22] Combined->GetExporter('i/b759c172') 21/03/2014 01:40:20 [30857] [DEBUG] [test22] Combined->GetExporter('i/3077e5bd') 21/03/2014 01:40:21 [30856] [DEBUG] [test22] Combined->GetExporter('i/b759c172') 21/03/2014 01:40:22 [30856] [DEBUG] [test22] Combined->GetExporter('i/3077e5bd') 21/03/2014 01:40:27 [30854] [DEBUG] [test22] Combined->GetExporter('i/b759c172') 21/03/2014 01:40:27 [30854] [DEBUG] [test22] Combined->GetExporter('c/Ccalendar') 21/03/2014 01:40:27 [30854] [DEBUG] [test22] Combined->GetExporter('d/contacts') 21/03/2014 01:40:29 [31305] [DEBUG] [test22] Combined->GetExporter('c/Ccalendar') 21/03/2014 01:40:30 [31305] [DEBUG] [test22] Combined->GetExporter('d/contacts') 21/03/2014 01:40:37 [31103] [DEBUG] [test22] Combined->GetExporter('i/b759c172') 21/03/2014 01:40:37 [31103] [DEBUG] [test22] Combined->GetExporter('c/Ccalendar') 21/03/2014 01:40:37 [31103] [DEBUG] [test22] Combined->GetExporter('d/contacts') 21/03/2014 01:40:38 [31103] [DEBUG] [test22] Combined->GetExporter('i/3077e5bd') 21/03/2014 01:40:41 [30856] [DEBUG] [test22] Combined->GetExporter('c/Ccalendar') 21/03/2014 01:40:42 [30856] [DEBUG] [test22] Combined->GetExporter('d/contacts') 21/03/2014 01:40:45 [31305] [DEBUG] [test22] Combined->GetExporter('')

fmbiete commented 10 years ago

@ddblack

GetBackendFolder and GetBackendId never should hit the === false condition. That would mean that the folderid provided by the device is wrong, because it doesn't contain the backend part. So, please, if you are hitting it, post a useful log in WBXML level so I can assist you to find and fix the real issue.

PHP_AUTH_USER and AUTHENTICATE_UID Do you want to replace the late authentication inside the backend with an earlier authentication against ldap? And with an apache only approach? Why?

You can also join the Z-Push/Zarafa forum and provide your insight about this

Regards

fmbiete commented 10 years ago

Also, I'm editing your comments to format them, but not changing the content... this has become too hard to read

ddblack commented 10 years ago

We could almost create two threads on this subject. But, for brevity I won't.

RE: >>> GetBackendFolder and GetBackendId never should hit the === false condition. That would mean that the folderid provided by the device is wrong, because it doesn't contain the backend part. So, please, if you are hitting it, post a useful log in WBXML level so I can assist you to find and fix the real issue. <<<

Correct. HOWEVER, I think the root cause is the updates to device state during processing (basically, reprovisioning occurs). I haven't specifically identified the line(s) of code, yet. I think there is a bug {SOMEWHERE} caused by improper use/assignment of either the "user" (aka "alias") or the "authUser" (aka the "principal" -- not "alias")

WHEN THAT HAPPENS, TWO DEVICE STATE FILES GET CREATED FOR THE DEVICE.

By changing all occurences of PHP_AUTH_USER to the actual webserver authenticated user... the problem of two state files goes away. Because the user should naturally be authenticated by the webserver before even reaching the AS code, I also removed all the conditional logic asking ourselves whether or not the user is authenticated. (NATURALLY, THEY ARE AUTHENTICATED, because the webserver said so.) It's a DEEP SUBJECT because it happens everywhere else, too.

It's particularly important here, in "combined" backend, to let the webserver admin figure out what user ID will be used to authenticate to each backend.

NOTE: Email Addresses are mere aliases to a unique principal. (SASL comes to mind, here.)

As I was saying, this can become a rather deep subject ESPECIALLY in the context of multiple backends.

RE: >>> PHP_AUTH_USER and AUTHENTICATE_UID Do you want to replace the late authentication inside the backend with an earlier authentication against ldap? And with an apache only approach? Why? <<<

No... I say there shouldn't be any "late" authentication at all. The only thing that is "late" is Authorization; not Authentication. But, Authorization is the ultimate responsibility of the system behind the backend; not AS/ZPush; per se.

What I do think needs to happen is this: "authUser" would be the ONLY value used within the Z-Push core instead of juggling the "getUser" with either value -- e.g. email address or real UID or whatever. This IS the HEART of the problem.

fmbiete commented 10 years ago

Yeah... but all of this is not useful.

You are proposing to fully change Z-Push so the authorization is made within the webserver (apache + ldap or + ), and ripped from the code. As said before, please join the Zarafa/Z-Push forum and share your point of view with every developer there. I won't change it here, without the aprovation of the developer team. That's final.

And about your problem:

Are you using Windows 8 mail or Outlook 2013 with ActiveSync? Are you viewing that sometimes your client sends the full email address and sometimes only the username part? Are you willing to help me, help you with your problems?

fmbiete commented 10 years ago

FYI http://z-push.sourceforge.net/phpbb/viewtopic.php?f=5&t=2469

fmbiete commented 10 years ago

[Z-Push-contrib] Totally unbelievable. Suppression of the hardcore truth. (#38) ddblack notifications@github.com 26 mar to fmbiete/Z-Push. I can't believe you deleted it.

I told the truth. Should I post my "fork"????

ddblack notifications@github.com 26 mar to fmbiete/Z-Push. Sorry... for some bizarre reason... I replied into the wrong place.

Kill this thread.

ddblack notifications@github.com 26 mar to fmbiete/Z-Push. Closed #38.

About #38 I won't remove comments, ever. Neither will edit user reviews for censure, though I could not share your point of view. In this issue I have edited some of your post, alerting you in the same, trying to give some format. Because it has become unreadable. Use format in the future and reduce the use of block caps, it's considered as shouting.

You are free to create your fork if you don't like the way I am doing the things. You can also share your code with the rest of users and contrib it to Z-Push, or talk with the Z-Push developers... This code is AGPL licensed, so you only need to publish your changes somewhere to comply with their terms.

But, if you want to be listened here learn a bit of netiquette.

ddblack commented 10 years ago

The msg was posted to your github by mistake. I was tired and foggy eyed at the time.

I'd created another branch on a different project (not even at github) and it got deleted. Then, I told them why I created the branch and and both got deleted.

Misunderstanding, here.

(I agree with the "hard to read" part of your msg. Cut and paste to

github is a bugger.)

As to forking, I'm not interested. IMHO, ZP needs an overhaul. From what I can see, it's become so patched and hacked that it's time for it to go. I'm just trying to make this work for the interim. The initial version wasn't engineered properly -- the perpetual if-then-else statements. I even saw some reference to breaking progress bars in there last night. That's typically what happens with 'agile' development environments. The immediate short-term objective usually overrides good maintainable design goals.

THIRDLY, The thread about Windows 8 Loop Issue #24 is directly related to the discovery I described, above.

QUOTE FROM #24: I repeated test with a "blank" Win 8. It receives contacts from server, but then goes in some kind of loop. Extended log doesn't provide errors or other "strange" data. However I confirm that it first creates in users table a row with username "myuser@domain.com" and a minute later an other row with username "myser". Mobiles devices haven't this problem and create always a row with "myuser@mydomain.com". Log doesn't refer to "myser" but always to "myuser@mydomain.com" so I cannot find when and why it creates a different state row.

SEE MS DOCS: IT'S PRETTY STRAIGHT FORWARD. No if-then-elses required. http://msdn.microsoft.com/en-us/library/jj127441%28v=exchg.140%29.aspx http://msdn.microsoft.com/en-us/library/hh531590%28v=exchg.140%29.aspx http://msdn.microsoft.com/en-us/library/hh509085%28v=exchg.140%29.aspx http://msdn.microsoft.com/en-us/library/hh361570%28v=exchg.140%29.aspx http://msdn.microsoft.com/en-us/library/jj899829%28v=exchg.140%29.aspx

fmbiete commented 10 years ago

But that's an extension to EAS that only work with outlook.com. An Exchange Server doesn't understand that tag.

Outlook 2013 connects to Hotmail (Outlook.com) service using ActiveSync protocol.  Hotmail has extended the ActiveSync protocol with the code page 0xfe (254).   It should be noted that Exchange Server does not support the code page 0xfe and will return a parsing error.

http://social.msdn.microsoft.com/Forums/en-US/75562e26-158c-45d3-b114-b2b82928c3a7/undocumented-activesync-codepage

Why are you adding it?

ddblack commented 10 years ago

Recognizing the hocus-pocus politics and the technical situation for what they really are -- is the first step to a real solution.

fmbiete commented 10 years ago

Outlook 2013 doesn't support connecting to a real Exchange server using ActiveSync. That's official and final. The only supported way is the classical Exchange way http://support.microsoft.com/kb/2859522

Outlook 2013 supports connecting to outlook.com using a custom, modified version of EAS.

Z-Push tries to replace a real Exchange server, since for Outlook there is MAPI available.

That's the offical approach.

Let's see your changes. Only with that Outlook 2013 will be happy and make the initial sync? If you can answer yes to this simple question it would be useful to add, only to check that goes wrong later...

fmbiete commented 10 years ago

@ddblack Read again this comment: https://github.com/fmbiete/Z-Push-contrib/issues/32#issuecomment-38945560 It's like you are trying to start a flame war. And this is not the place for it.

Easy question. The proposed code will help Outlook 2013 to work with z-push? Yes, I will commit it, and plan some tests to see if the functionality is enough or not. But as I have already told you, If you use Outlook MAPI is the supported way to go.

if you are willing to make z-push better you are welcome, if you only want to me to say "oh yes, Microsoft is evil, NSA is evil, they want to steal my freedom", THAT DOESN'T MATTER HERE. ONLY TECNICAL STUFF. PROBLEM A, SOLUTION TO A, I don't need and I don't want any discussion about how Microsoft is trying to get over the market.

fmbiete commented 10 years ago

Maybe, I'm not clear enough. From your last comment only this is useful:

I don't want you to just "commit" the code... because there is still a lot more work to do.

The rest is your opinion, or your debate. Look at this issue, it's huge and over and over again, I don't need it, I had enough of it.

fmbiete commented 10 years ago

ddblack wrote and removed these comments. I will repost them and close this issue, as it's not going anywhere.

ddblack notifications@github.com 20:16 Just remember... there are three types of people. 1) Those who MAKE THINGS HAPPEN... 2) Those who WATCH others make things happen. 3) Those who say, "WTF JUST HAPPENED?"


ddblack notifications@github.com 20:48 https://www.google.com/patents/US7644376 http://www.google.com/patents/US6370566 http://www.google.com/patents/US6578054

Good luck.

I'm moving on.


ddblack notifications@github.com 21:34 Read your own words... and the answer:...

https://github.com/dupondje/PHP-Push-2/issues/93

So that means the CODE ISN'T PROPERTY OF ZARAFA ANYMORE when you commit it?

Yes, the copyright of your code will remain yours, you are only licensing it as AGPL.

Why is that? ANSWER: Zarafa is afraid of the big bad wolf. You should be, too.