Giter Site home page Giter Site logo

php-push-2's Introduction

PHP-Push-2

PHP-Push-2 is a modiefied version of Z-Push-2, an open source ActiveSync implementation, with CalDAV and CardDAV support.

Features

Using the "combined backend" PHP-Push-2 supports the following features:

  • Mail - IMAP
  • Calendar - CalDAV
  • Contacts - LDAP
  • Contacts - CardDAV

Requirements

  • A supported CalDAV/CardDAV server (e.g. SOGo, ownCloud, SabreDAV)
    • Did not test other than SOGo but it should work with any caldav/cardav groupware, feedback are welcome
  • An ActiveSync compatible mobile device
  • PHP5 with the following libraries are required:
    • php5-curl
    • php5-ldap for LDAP support
    • libawl-php for CardDAV and CalDAV support
    • php5-imap and php-mail for IMAP support

Debian/Ubuntu systems

    $ apt-get install php5-curl php5-ldap php5-imap php-mail libawl-php

Redhat systems

    $ yum install php-curl php-common php-ldap php-imap php-imap libawl-php

Thanks

PHP-Push-2 is possible thanks to the following projects:

See also

Libraries used

Donate

PayPal - Donate

We are building PHP-Push-2 in our spare time, so if you want to buy us a coke, that would be awesome!

Installation

Clone from Github:

$ cd /var/www
$ git clone https://github.com/dupondje/PHP-Push-2.git
$ cd PHP-Push-2

Read the Z-Push install instructions in the INSTALL file, or this document: Configure Z-Push (Remote ActiveSync for Mobile Devices).

Note: Z-Push is meant to be used with mod_php. If you want to use it with FastCGI additional configuration is needed for the Apache web server. Please refer to the wiki.

Configuration

Deploy a PHP-Push-2 instance for the SOGo Online Demo

The following guide sets up your PHP-Push-2 instance for the SOGo Online Demo.

$ cp config.inc.php config.php
$ cp backend/combined/config.inc.php backend/combined/config.php
  • Permissions

    $ mkdir -p /var/lib/z-push/ /var/log/z-push/

  • Debian system

      $ chown -R www-data:www-data /var/log/z-push/ /var/lib/z-push/
    
  • RedHat system

      $ chown -R apache:apache /var/log/z-push/ /var/lib/z-push/
    

Edit config.php

  • Set TimeZone
  • Configure the BackendIMAP settings section
  • Configure the BackendCARDDAV setting section
  • Configure the BackendCALDAV setting section

Edit backend/searchldap/config.php

  • This file allows you to enable GAL search support from your LDAP tree.

Test

Using a browser login to https://fqdn/Microsoft-Server-ActiveSync. You should see a webpage that says "Z-Push - Open Source ActiveSync" stating "GET not supported."

If this page is not displayed, please READ the wiki.

Update

To update to the latest version pull from the Git repository:

$ cd /var/www/PHP-Push-2
$ git pull

Contributing

  1. Fork
  2. Create a branch (git checkout -b my_markup)
  3. Commit your changes (git commit -am "Added Snarkdown")
  4. Push to the branch (git push origin my_markup)
  5. Create an Issue with a link to your branch
  6. Or Send me a Pull Request

php-push-2's People

Contributors

cisiqo avatar dupondje avatar fmbiete avatar liob avatar mikeheasercom avatar onecrayon avatar xbgmsharp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-push-2's Issues

Unmet condition in object from type SyncAppointment

When doing a sync i do have a lot of this warning then error in the log.

07/06/2012 16:45:19 [20741] [sogo1] [ WARN] [Appl879409CX3NQ] SyncObject->Check(): Unmet condition in object from type
SyncAppointment: parameter 'starttime' can not be compared, as the comparable is not set. Check failed!
07/06/2012 16:45:19 [20741] [sogo1] [ERROR] [Appl879409CX3NQ] Ignored broken message (SyncAppointment). Reason: '4' Folderid: 'c/Csogo3_personal' message id '6763-4C11ED00-4B-33D231C0.ics'
07/06/2012 16:45:19 [20741] [sogo1] [DEBUG] [Appl879409CX3NQ] ImportChangesStream->ImportMessageChange('6763-4C11ED00-4B-33D231C0.ics'): message ignored and requested to be removed from mobile

The vcard is as following:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Inverse inc./SOGo 1.0//EN
BEGIN:VEVENT
UID:6763-4C11ED00-4B-33D231C0
SUMMARY:Every month
CREATED:20100611T080001Z
DTSTAMP:20100611T080001Z
LAST-MODIFIED:20100611T080956Z
DTSTART;TZID=/inverse.ca/20091015_1/Europe/Madrid:20100618T180000
DTEND;TZID=/inverse.ca/20091015_1/Europe/Madrid:20990617T210000
TRANSP:OPAQUE
SEQUENCE:2
RRULE:INTERVAL=1;FREQ=MONTHLY
END:VEVENT
BEGIN:VTIMEZONE
TZID:/inverse.ca/20091015_1/Europe/Madrid
X-LIC-LOCATION:Europe/Madrid
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
END:VCALENDAR

diffbackend/diffstate.php:257 Invalid argument supplied for foreach() (2)

Not sure it is link to my preious issue but i do get a php error.
Did you update to the latest z-push-2 version or do you maintain your own branch?

16/06/2012 12:51:30 [ 1637] [user] [ WARN] [Appl879409CX3NQ] SyncAppointment->Check(): Parameter 'organizername' and 'organizeremail' should be set for a meeting request
16/06/2012 12:51:30 [ 1637] [user] [DEBUG] [Appl879409CX3NQ] BackendCalDAV->StatMessage('Cpersonal','97101d90-1bce-4b1d-9902-8c7034701489.ics')
16/06/2012 12:51:31 [ 1637] [user] [ WARN] [Appl879409CX3NQ] /var/www/sogosync/lib/default/diffbackend/diffstate.php:257 Invalid argument supplied for foreach() (2)

Combine of CardDAV and LDAP backend together

It's continuation of #49

You wrote:
"If you want to use BackendLDAP (l) for SYNC_FOLDER_TYPE_CONTACT for example, then you use:
SYNC_FOLDER_TYPE_CONTACT => 'l'

Its easy as that!"

When I use together:

            SYNC_FOLDER_TYPE_CONTACT => 'l',
            SYNC_FOLDER_TYPE_USER_CONTACT => 'v',

            'l' => array('name' => 'BackendLDAP', ...
            'v' => array( 'name' => 'BackendCardDAV', ...

BackendCardDAV does not return contacts (I've got only LDAP). I can send log file to you...

Any suggestions?

Regards,
Maxim

403 in ChangeMessage

When i update an calendar entry.
the PUT method return a 403 which i don't undestand as i can fetch the calendar and all other method works fine.

$etag_new = $this->_caldav->DoPUTRequest($url, $data, $etag);

However as there is no return code check, the mobile think it is ok but it is not.
From caldav-client-v2.php the value $etag_new return is empty and should be check.

Use correct LDAP protocol and user dn in backend/ldap.php

Fix backend/ldap.php to use the correct LDAP protocol and user dn (which is usually not $username as in imap or caldav):

Also: enable %u substitution (and others if required):

    public function Logon($username, $domain, $password)
    {
    $my_LDAP_USER_DN = str_replace('%u', $username, LDAP_USER_DN);
    $this->ldap_link = ldap_connect(LDAP_SERVER, LDAP_PORT);
    ldap_set_option($this->ldap_link, LDAP_OPT_PROTOCOL_VERSION, 3);
    if (ldap_bind($this->ldap_link, $my_LDAP_USER_DN, $password))
    {

Without this, I cannot even connect to slapd on Ubuntu. With this change, I can connect successfully, but now getmessage etc required LDAP_BASE_DNS (see the other issue) which I cannot figure out.

Use IMAP backend for Notes/Journal

With iOS 4+, you can store notes on a regular IMAP account in a special folder called "Notes".

Could a similar setup be used to offer Notes/Journal functionality with the IMAP backend? At the moment, this only seems to work with Zarafa, but using IMAP should be straight forward.

Thanks!

ldap.php and searchldap.php configuration use same variable name

Turns out that searchldap.php backend for GAL is useful, as it searches with a more generic filter (|(cn=SEARCHVALUE)(mail=SEARCHVALUE)) for hits than the default "Contacts" section which only does (cn=SEARCHVALUE*).

In the corresponding config file backend/searchldap/config.php, the following variables are defined:

LDAP_HOST
LDAP_PORT
LDAP_BIND_USER
LDAP_BIND_PASSWORD
LDAP_SEARCH_BASE
LDAP_SEARCH_FILTER

Since we use LDAP_PORT also in config.php for ldap.php, the following warning appears:

backend/searchldap/config.php:47 Constant LDAP_PORT already defined (8)

We should possibly rename LDAP_PORT in ldap.php to avoid potential conflicts in the future when using both backends with different settings such as 389 and 689 for different servers, for instance? The hostname is specified via LDAP_HOST and LDAP_SERVER respectively, so there are no side effects there!

Missing file?

Hi,
it seems there is a file missing:
caldav-client-v2.php -> require_once(XMLDocument.php)

/r

Tipo in _ParseASEventToVEvent

There is tipo in _ParseASEventToVEvent

  •                           $att_str = sprinf("CN=%s:MAILTO:%s", $att->name, $att->email);
    
  •                           $att_str = sprintf("CN=%s:MAILTO:%s", $att->name, $att->email);
    

Pasre timezone

There is still an timezone parse issue in _MakeUTCDate

  •                   $tz = timezone_open($timezone);
    
  •                   $tz = timezone_open($this->_ParseTimezone($timezone));
    

LDAP ChangeMessage implementation

This implementation from php-push v1 works perfectly for LDAP. Perhaps there is a way to reuse the logic and replace the function calls with their newer version from php-push-v2?

function ChangeMessage( $folderid, $id, $message ) {

     debugLog('LdapContacts::ChangeMessage('.$folderid.', '.$id.')');

        // disabled until fully functional
        //return false;
        // ldap_mod_del
        // ldap_mod_replace
        // ldap_mod_add

        debugLog( "LdapContacts:: Message body equals: " . $message->body );
        debugLog( "LdapContacts:: Body truncated?      " . $message->bodytruncated );

        $message_entry = $this->GetMessageEntry( $folderid, $id );

        if ( $message_entry ) {
             list( $result_id, $entry_id ) = $message_entry;
            $message_dn = ldap_get_dn( $this->_link_id, $entry_id );

            debugLog( "LdapContacts::Found Record:: dn is " . $message_dn );

            $ldap_array = $this->MessageToArray( $message );

            debugLog( "LdapContacts:: \n" .print_r( $ldap_array, 1 ) );

            return ldap_modify( $this->_link_id, $message_dn, $ldap_array );

        }
        else {
            # No matching record so we need to create it...
            # First we need a new dn value. Methodology respectfully pinched from Contagged Project.
            # Only problem with this is that it can lead to duplicates as 'time' is only seconds.
            $NewContactFolderName = "LDAP_" .$this->_config['LDAP_NEW_CONTACT_FOLDER'] ."_CONTACTS";
            $NewContactFolder = $this->_config[$NewContactFolderName];

            $new_uid = time() .str_pad(mt_rand(0,999999),6,"0", STR_PAD_LEFT);
            $new_dn = "uid=" .$new_uid ."," .$NewContactFolder;
            debugLog("LdapContacts::New Record:: dn will be " .$new_dn );

            $ldap_array = $this->MessageToArray( $message );

            # Make sure we have something in the surname field, as it is required.
            # if ( !$ldap_array['sn'] || $ldap_array['sn'] == "" ) $ldap_array['sn'] = "Unknown";
            # Know done in MessageToArray function

            debugLog( "LdapContacts::Array Dump: \n" .print_r( $ldap_array, 1 ) );


            if ( ldap_add( $this->_link_id, $new_dn, $ldap_array ) ) {
                debugLog("LdapContacts::Record sucessfully added. LDAP said: " .ldap_error($this->_link_id) );
                # Get the new UUID so that we can return it
                $result_id = ldap_list( $this->_link_id, $NewContactFolder, "(uid=" .$new_uid .")", array( "entryUUID", "sn"),0,1);

                # Bit of debugging code
                # $info = ldap_get_entries( $this->_link_id, $result_id);

                if ( ldap_count_entries( $this->_link_id, $result_id ) > 0 ) {
                    debugLog("LdapContacts:: Got " .ldap_count_entries( $this->_link_id, $result_id )  ." match for new record");
                    $new_info = ldap_get_entries( $this->_link_id, $result_id );
                    for ( $i=0; $i<$new_info['count']; $i++ ) {
                        $newid = $new_info[$i]["entryuuid"][0];
                        debugLog("LdapContacts::entryUUID " .$newid);
                    }
                    debugLog("LdapContacts:: New id is " .$newid );
                }
                return $this->StatMessage($folderid, $newid);
            }
            else return false;
        }

        return false;
    }                

VALARM not handle correctly

When i sync from the caldav server to the mobile there is an with the ALARM.
In a result there is an reminder on the phone set to 'at the time of the event' but it was not.
When sync back to the server the entry does not have any more any reminder set.

BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT1H
ACTION:DISPLAY
END:VALARM
SEQUENCE:1

Or this one
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT5M
DESCRIPTION:Mozilla Standardbeschreibung
END:VALARM

BEGIN:VALARM
TRIGGER;VALUE=DURATION:-PT10M
ACTION:DISPLAY
END:VALARM

ActiveSync only support alarm in minutes
DateInterval does not convert time in minutes.

The log show:
CaldavBackend: _ParseVEventToSyncObject[_ParseVEventToSyncObject(): 'VALARM': [DURATION] [-PT5M].]
CaldavBackend: _ParseVEventToSyncObject[_ParseVEventToSyncObject(): 'VALARM': [PT5M].]
CaldavBackend: _ParseVEventToSyncObject[_ParseVEventToSyncObject(): 'VALARM': [5].]

To make it work, replace:
$message->reminder = $interval->format("i");
by:
$message->reminder = $interval->format("%i");
However it won't convert hours in minutes

Only one calendar

With the change made into the handling, i now can see only one calendar.
It is fine for android has only is supported however iOS does support multiple Addressbook via ActiveSync.

BackendCombined requires php5-mapi?

I'm trying to setup PHP-Push-2 however for some reason it requires php5-mapi?
Ofcourse I can just install it but it requires almost a complete zarafa setup...

Using iRedMail for the mail server setup and SOGo for everything else.

Here is my config.php:

"SYSTEM", 'folderid' => "", 'name' => "Public Contacts", 'type' => SYNC_FOLDER_TYPE_USER_CONTACT, ), */ ); ?>

CardDAV support

Is there any CardDAV support??

I can get to work my calendar with the CalDAV backend and my DAVICAL server. But in the same DaviCal instance the user has another collection with contacts.

Is it possible? Or do I need to search for another backend and load it from the BackendCombined???

Thank you very much

Don't query all backends for every user

Even when I disable "Mail" for an Exchange/Z-Push inside iOS after adding a new account (just enabling e.g. Calendars and Reminders), BackendIMAP still runs and syncs everything, even though the phone is not going to show any email messages because we disabled that part...
Even though I have 2 backends enabled (imap & caldav), shouldn't we just provide the data that the phone asks for, instead of always running all backends?

This is because in BackendCombined->Logon() we always iterate over all availble (i.e. enabled in combined/config.php) backends, independent of what the user enabled or disabled on her device:

foreach ($this->backends as $i => $b){
[..]
if($this->backends[$i]->Logon($u, $d, $p) == false){

Ideal would be: Depending on the users choice, we only call Logon for those Backends that are active! For instance:

  • All users have IMAP accounts
  • Some users have CalDAV accounts
  • Few users have LDAP accounts

At the moment, this scenario is not possible because if LDAP is enabled and fails (e.g. user does not have an account), not even the IMAP functionality works because the Backend->Logon throws an error.

Implement "Real Names", perhaps via IMAP_USERNAME_FULLNAME

The AS12.1 branch of php-push has an interesting feature to avoid using "[email protected]" as the "From:" as it is now the case:

// Define username => fullname changes here
define('IMAP_USERNAME_FULLNAME', serialize(array(
        'user1'=>'Lastname1, Firstname1',
        'user2'=>'Lastname2, Firstname2',
        )));

Is something like this planned, perhaps even via z-push-2?

See also these related posts, perhaps the authors of those post would like to contribute:

http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=1642&start=10#p6091
http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=2005#p7121

Don't offer backends that don't exist

why does z-push "offer" Mail (on by default), Contacts (off by default), Calendars (on by default) and Reminders (on by default) even when I have caldav and imap backends disabled in backend/config.php?

Not all (few in fact) events are synced

Not all (few in fact) events are synced, perhaps due to the "time bug" on line 545/546?

PHP-Push-2/backend/caldav.php:546 date_diff() expects parameter 2 to be DateTime, integer given (2)

Roundcube plugin to offer remote wipe GUI

Implement a RC plugin that offers the user to select any of his devices to remove wipe, as shown here for Zarafa:

Functionality:
http://z-push.sourceforge.net/phpbb/viewtopic.php?f=4&t=802

Screenshot:
http://z-push.sourceforge.net/phpbb/download/file.php?id=1&sid=962a7bf85c23a9ee8c30501f711c17d2

z-push-admin.php -a list -u [email protected]

shows a list of all devices for a specific user. Show the resulting output nicely formatted in a list for the user to pick the device:

Synchronized devices of user: [email protected]
-----------------------------------------------------
DeviceId:               ApplXXXXXXXXXX
Device type:            iPhone
UserAgent:              Apple-iPhone3C1/11.222
ActiveSync version:     2.5
First sync:             2012-01-03 09:36
Last sync:              2012-04-03 17:05
Total folders:          129
Synchronized folders:   4
Synchronized data:      Emails Tasks Calendars Contacts 
Status:                 OK
WipeRequest on:         not set
WipeRequest by:         not set
Wiped on:               not set
Attention needed:       No errors known

Caldav Reminder lost from mobile to caldav.

Syncing from mobile to caldav disables reminders, for changed events as well as for events newly created on the mobile.

After a sync the entry is like this:
BEGIN:VALARM
TRIGGER:-PT0H60M0S
END:VALARM

However it does not seen to undestand by caldav server.

the entry was:
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT5M
DESCRIPTION:Description
END:VALARM

This should do the trick

--- a/backend/caldav.php
+++ b/backend/caldav.php
@@ -815,7 +815,7 @@ class BackendCalDAV extends BackendDiff {
{
$valarm = new iCalComponent();
$valarm->SetType("VALARM");

  •                   $trigger = "-PT0H" . $data->reminder . "M0S";
    
  •                   $trigger = "VALUE=DURATION:-PT" . $data->reminder . "M";
                    $valarm->AddProperty("TRIGGER", $trigger);
                    $vevent->AddComponent($valarm);
            }
    

BackendIMAP->getImapIdFromFolderId fails for INBOX all of a sudden

After working for days, BackendIMAP->getImapIdFromFolderId fails for INBOX all of a sudden as you can see from the logs below.

The only change I made before this started was that I added another z-push account on the same device, for another user. Is there a limitation for one z-push account per device, perhaps in the way that the state is recorded per device ID?

07/06/2012 20:39:33 [13134] [[email protected]] [DEBUG] BackendIMAP->GetMessageList('97b592c8','1338835173')
07/06/2012 20:39:33 [13134] [[email protected]] [DEBUG] BackendIMAP->getImapIdFromFolderId('97b592c8') = not found
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:39:38 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:40:10 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:40:10 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:40:10 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'
07/06/2012 20:40:10 [26697] [[email protected]] [DEBUG] LoopDetection->ProcessLoopDetectionIsHierarchyResyncRequired(): seen command with Exception or folderid 'i/97b592c8' and code '12'


turns out that that folder ID is INBOX (when it still worked):

04/06/2012 21:38:31 [ 8783] [[email protected]] [DEBUG] BackendIMAP->GetMessageList('97b592c8','1338579511')
04/06/2012 21:38:31 [ 8783] [[email protected]] [DEBUG] BackendIMAP->getImapIdFromFolderId('97b592c8') = INBOX
04/06/2012 21:39:06 [ 8783] [[email protected]] [DEBUG] Combined->GetExporter('i/97b592c8')
04/06/2012 21:39:06 [ 8783] [[email protected]] [DEBUG] BackendIMAP->GetMessageList('97b592c8','1338579546')


And this is from WBXML:

07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/ApplYYYYYYYYYYY-bs-XXXXXXXXXX'
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] BackendIMAP->getImapIdFromFolderId('97b592c8') = not found
07/06/2012 20:41:58 [26647] [[email protected]] [ INFO] StatusException: Folderid not found in cache - code: 12
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O  <Synchronize>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O   <Folders>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O    <Folder>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     <FolderType>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     Email
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     </FolderType>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     <FolderId>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     i/97b592c8
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     </FolderId>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     <Status>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     12
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O     </Status>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O    </Folder>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O   </Folders>
07/06/2012 20:41:58 [26647] [[email protected]] [WBXML] O  </Synchronize>
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] Combined->Logoff()
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] BackendIMAP->Logoff(): IMAP connection closed
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] FileStateMachine->SetState() written 9998 bytes on file: '/var/lib/z-push/s/4/ApplYYYYYYYYYYY-bs-XXXXXXXXXX'
07/06/2012 20:41:58 [26647] [[email protected]] [ INFO] BackendLDAP->Logoff(): Disconnection successfull.
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] Combined->Logoff() success
07/06/2012 20:41:58 [26647] [[email protected]] [DEBUG] -------- End 

GAL SEARCH_PROVIDER fails

I just set

define('SEARCH_PROVIDER', 'BackendLDAP');

but the search always fails after a few seconds, even if I set timeout to 30 seconds or more.

Is this supposed to work "out of the box"?

Is there an installation doc?

Sorry for the naive question, but I can figure out how to get BackendIMAP to work - but how to I get IMAP&CalDAV&LDAP working in the same z-push? I assume it's something to do with BackendCombined?

Also, the caldav section looks like it refers to a separate server - but one that looks like it contains the same php files as z-push? Is that a separate product or the z-push one?

I'm confused how all this hangs together :-)

Jason

Calendar items appear and disappear on iOS

Showing all calendars (with 1 AS calendar) works with colors.
Disabling all other cals still shows AS cal fine (with color).
After adding an event to AS calendar all events disappear. When re-enabling all calendars (including AS), everthing shows again.
And on top of it all, the event is NOT created in AS calendar!

backend/imap.php:980 Invalid argument supplied for foreach()

i have an error on the imap backend.

17/06/2012 12:32:18 [ 5623] [myuser] [ERROR] [androidc259148960] z_RFC822 error: Empty group.
17/06/2012 12:32:18 [ 5623] [myuser] [ WARN] [androidc259148960] /var/www/sogosync/backend/imap.php:980 Invalid argument supplied for foreach() (2)
17/06/2012 12:32:18 [ 5623] [myuser] [DEBUG] [androidc259148960] LoopDetection->IgnoreNextMessage(): Loop mode, potential broken message id '17889'

The email id 17889 has an attachement.

Exceptions of recurring events not working

Hello,

the ics from the mobile looks like this:
BEGIN:VEVENT
UID:w47NyBF44F3TX73HBAFbn3
SUMMARY:Test handy
DESCRIPTION;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:t=C3=A4glich=20mit=20einer=20ausnahme
DTSTART:20120627T080000Z
DTEND:20120627T090000Z
X-EPOCAGENDAENTRYTYPE:APPOINTMENT
CLASS:PUBLIC
SEQUENCE:0
X-METHOD:NONE
RRULE:D1 20120702T100000
EXDATE:20120628T080000Z
AALARM;TYPE=X-EPOCSOUND:20120627T074500Z;;;
LAST-MODIFIED:20120626T183350Z
PRIORITY:5
X-SYMBIAN-LUID:16740
END:VEVENT

When transferring it to SOGo, the exception (from EXDATE) is lost.

In z-push.log, I can see the following line:
26/06/2012 20:35:11 [27415][user][DEBUG] BackendCalDAV->ChangeMessage('VCalendar[BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//php-push//NONSGML PHP-Push Calendar//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20120626T183509Z
LAST-MODIFIED:20120626T183509Z
DTSTART:20120627T080000Z
SUMMARY:Test handy
DTEND:20120627T090000Z
RRULE:FREQ=DAILY;COUNT=6;INTERVAL=1
CLASS:PUBLIC
TRANSP:OPAQUE
DESCRIPTION:täglich mit einer ausnahme
UID:20120626T183511Z-0dffa643c69fa56b3870820aa87e9b8f
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
]

This seems to be missing the EXDATE entry.

Use ldap_v1 for php-push-2?

I got the old LDAP backend in php-push-1 to work perfectly, with adding/removing contacts, with good mapping of LDAP and AS attributes, and even private and public contacts via 2 different LDAP DNs.

What is your plan with LDAP, as this is a critical component: are you actively developing this, and therefore there is this loop? Can we reuse the LDAPv1 backend, even though it is limited to two collections?

Multiple calendars with sogo

you've done a good work with PHP-Push-2, and it works with sogo;)

can you tell me how to sync all my SOGo calendars via activesync ?
i have only my personal calendar
I use an android 4.0.3

I used this configuration
thank you

in config.php
define('BACKEND_PROVIDER', "BackendCombined");
define('IMAP_SERVER', 'sogo.sebad.fr');
define('CALDAV_SERVER', 'http://sogo.sebad.fr');
define('CALDAV_PORT', '80');
define('CALDAV_PATH', '/SOGo/dav/%u/Calendar/');
define('CALDAV_PERSONAL', '');

in backend/combined/config.php
'folderbackend' => array(
SYNC_FOLDER_TYPE_INBOX => 'i',
SYNC_FOLDER_TYPE_DRAFTS => 'i',
SYNC_FOLDER_TYPE_WASTEBASKET => 'i',
SYNC_FOLDER_TYPE_SENTMAIL => 'i',
SYNC_FOLDER_TYPE_OUTBOX => 'i',
SYNC_FOLDER_TYPE_TASK => 'z',
SYNC_FOLDER_TYPE_APPOINTMENT => 'c',
SYNC_FOLDER_TYPE_CONTACT => 'z',
SYNC_FOLDER_TYPE_NOTE => 'z',
SYNC_FOLDER_TYPE_JOURNAL => 'z',
SYNC_FOLDER_TYPE_OTHER => 'i',
SYNC_FOLDER_TYPE_USER_MAIL => 'i',
SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'c',
SYNC_FOLDER_TYPE_USER_CONTACT => 'z',
SYNC_FOLDER_TYPE_USER_TASK => 'z',
SYNC_FOLDER_TYPE_USER_JOURNAL => 'z',
SYNC_FOLDER_TYPE_USER_NOTE => 'z',
SYNC_FOLDER_TYPE_UNKNOWN => 'z',
),

FIX: More categories for synchronisation

Below I include the patch to update ldap.php to sync all (iOS) relevant fields from the LDAP schemata

  • Person
  • organizationalPerson
  • inetOrgPerson

Adding this to ldap.php fills up almost all available iOS fields from a corresponding LDAP entry.

--- ldap.php 2012-06-02 02:09:07.017471276 +0200
+++ ldap.php.ORIG 2012-06-02 01:47:24.981471693 +0200
@@ -212,7 +212,7 @@
case "pager":
$contact->pagernumber = $value;
break;

  •                           case "assistantName":
    
  •                           case "secretary":
                                    $contact->assistantname = $value;
                                    break;
                            //organizationalPerson  
    
    @@ -229,8 +229,7 @@
    $contact->businesspostalcode = $value;
    break;
    case "st":
  •                                   $contact->businessstate = $value;
    
  •                                   break;
    
  •                                   $contact->businessstate = $value;  
                            case "street":
                                    $contact->businessstreet = $value;
                                    break;
    
    @@ -244,48 +243,11 @@
    case "title":
    $contact->title = $value;
    break;
  •                           case "note":
    
  •                           case "description":
                                    $contact->body = $value;
                                    $contact->bodysize = strlen($value);
                                    $contact->bodytruncated = "0";
                                    break;
    
  •                           //other
    
  •                            case "anniversary":
    
  •                                    $contact->anniversary = $value;
    
  •                                    break;
    
  •                            case "assistantPhone":
    
  •                                    $contact->assistnamephonenumber = $value;
    
  •                                    break;
    
  •                            case "birthDate":
    
  •                                    $contact->birthday = $value;
    
  •                                    break;
    
  •                            case "businessRole":
    
  •                                    $contact->jobtitle = $value;
    
  •                                    break;
    
  •                            case "carPhone":
    
  •                                    $contact->carphonenumber = $value;
    
  •                                    break;
    
  •                            case "facsimileTelephoneNumber":
    
  •                                    $contact->businessfaxnumber = $value;
    
  •                                    break;
    
  •                            case "homeFacsimileTelephoneNumber":
    
  •                                    $contact->homefaxnumber = $value;
    
  •                                    break;
    
  •                            case "initials":
    
  •                                    $contact->middlename = $value;
    
  •                                    break;
    
  •                            case "internationaliSDNNumber":
    
  •                                    $contact->business2phonenumber = $value;
    
  •                                    break;
    
  •                            case "managerName":
    
  •                                    $contact->managername = $value;
    
  •                                    break;
    
  •                            case "otherPhone":
    
  •                                    $contact->home2phonenumber = $value;
    
  •                                    break;
    
  •                            case "spouseName":
    
  •                                    $contact->spouse = $value;
    
  •                                    break;
                    }
            }
            return $contact;
    

Invalid argument supplied for foreach() (2)

04/06/2012 17:36:15 [  921] [user] [DEBUG] -------- Start
04/06/2012 17:36:15 [  921] [user] [ INFO] Version='2.0beta5-1261' method='POST' from='95.19.91.179' cmd='Sync' getUser='user' devId='Appl790312PRA4S' devType='iPhone'
04/06/2012 17:36:15 [  921] [user] [DEBUG] Used timezone 'Europe/Berlin'
04/06/2012 17:36:15 [  921] [user] [DEBUG] Including backend file: 'z-push/backend/combined/combined.php'
04/06/2012 17:36:15 [  921] [user] [DEBUG] Including backend file: 'z-push/backend/imap.php'
04/06/2012 17:36:15 [  921] [user] [DEBUG] Including backend file: 'z-push/backend/caldav.php'
04/06/2012 17:36:15 [  921] [user] [DEBUG] Including backend file: 'z-push/backend/ldap.php'
04/06/2012 17:36:15 [  921] [user] [ INFO] Combined 3 backends loaded.
04/06/2012 17:36:15 [  921] [user] [DEBUG] Request::ProcessHeaders() ASVersion: 2.5
04/06/2012 17:36:15 [  921] [user] [DEBUG] ZPush::CommandNeedsProvisioning(0): true
04/06/2012 17:36:15 [  921] [user] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-devicedata'
04/06/2012 17:36:15 [  921] [user] [DEBUG] ASDevice data loaded for user: 'user'
04/06/2012 17:36:15 [  921] [user] [DEBUG] TopCollector(): Initialized mutexid Resource id #121 and memid Resource id #122.
04/06/2012 17:36:15 [  921] [user] [DEBUG] LoopDetection(): Initialized mutexid Resource id #124 and memid Resource id #125.
04/06/2012 17:36:15 [  921] [user] [DEBUG] ZPush::HierarchyCommand(0): false
04/06/2012 17:36:15 [  921] [user] [DEBUG] DeviceManager->ProvisioningRequired('710056429') saved device key '710056429': false
04/06/2012 17:36:15 [  921] [user] [DEBUG] ZPush::CommandNeedsAuthentication(0): true
04/06/2012 17:36:15 [  921] [user] [DEBUG] Combined->Logon('user', '',***))
04/06/2012 17:36:18 [  921] [user] [ INFO] BackendIMAP->Logon(): User 'user' is authenticated on IMAP
04/06/2012 17:36:20 [  921] [user] [ INFO] BackendCalDAV->Logon(): User 'user' is authenticated on CalDAV
04/06/2012 17:36:20 [  921] [user] [ INFO] BackendLDAP->Logon(): User 'user' is authenticated on LDAP
04/06/2012 17:36:20 [  921] [user] [ INFO] Combined->Logon() success
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->Setup('user', 'true', '')
04/06/2012 17:36:20 [  921] [user] [ INFO] Combined->Setup() success
04/06/2012 17:36:20 [  921] [user] [DEBUG] ZPush::CommandNeedsPlainInput(0): false
04/06/2012 17:36:20 [  921] [user] [DEBUG] Sync folder: 'Contacts'
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-fd'
04/06/2012 17:36:20 [  921] [user] [DEBUG] SyncParameters->UseCPO('DEFAULT')
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-69'
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-fs-69'
04/06/2012 17:36:20 [  921] [user] [DEBUG] ZPush::GetAdditionalSyncFolderStore('l/Private Contacts'): 'false'
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->Setup('', 'false', '')
04/06/2012 17:36:20 [  921] [user] [ INFO] Combined->Setup() success
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->GetImporter() Content: ImportChangesCombined:('l/Private Contacts')
04/06/2012 17:36:20 [  921] [user] [DEBUG] ImportChangesCombined->Config(...)
04/06/2012 17:36:20 [  921] [user] [DEBUG] ImportChangesCombined->Config() success
04/06/2012 17:36:20 [  921] [user] [DEBUG] Supported variables to be unset: anniversary,birthday,businesscountry,email2address,email3address,businessfaxnumber,homecity,homecountry,homefaxnumber,home2phonenumber,homepostalcode,homestate,homestreet,middlename,suffix,othercity,othercountry,carphonenumber,otherpostalcode,otherstate,otherstreet,assistantname,assistnamephonenumber,spouse,business2phonenumber,jobtitle,yomifirstname,yomilastname,radiophonenumber,imaddress,imaddress2,imaddress3,managername,companymainphone,nickname
04/06/2012 17:36:20 [  921] [user] [ WARN] PHP-Push-2/lib/default/diffbackend/diffstate.php:257 Invalid argument supplied for foreach() (2)
04/06/2012 17:36:20 [  921] [user] [ INFO] StatusException: ImportChangesDiff->ImportMessageChange('1586d8b8-1f3c-1031-9f73-e1f285e81745','SyncContact'): unknown error in backend - code: 9
04/06/2012 17:36:20 [  921] [user] [ INFO] Processed '1' incoming changes
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->SetState() written 6803 bytes on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-fs-69'
04/06/2012 17:36:20 [  921] [user] [DEBUG] HandleSync(): Start Output
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->GetExporter('l/Private Contacts')
04/06/2012 17:36:20 [  921] [user] [DEBUG] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '56' messages in state
04/06/2012 17:36:20 [  921] [user] [DEBUG] BackendLDAP->GetMessageList('Private Contacts','0')
04/06/2012 17:36:20 [  921] [user] [DEBUG] BackendLDAP->GetMessageList(): Got 56 contacts in base_dn 'cn=user,ou=private,ou=rcabook,dc=qustodium,dc=net'.
04/06/2012 17:36:20 [  921] [user] [ INFO] ExportChangesDiff->InitializeExporter(): Found '1' changes
04/06/2012 17:36:20 [  921] [user] [DEBUG] BackendLDAP->GetMessage('Private Contacts','1586d8b8-1f3c-1031-9f73-e1f285e81745')
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->SetState() written 6549 bytes on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-70'
04/06/2012 17:36:20 [  921] [user] [DEBUG] SyncCollections->SaveCollection(): Data of folder 'l/Private Contacts' changed
04/06/2012 17:36:20 [  921] [user] [DEBUG] FileStateMachine->SetState() written 676 bytes on file: '/var/lib/z-push/s/4/Appl790312PRA4S-e5782d20-6c6d-421e-b486-86550456240b-fd'
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->Logoff()
04/06/2012 17:36:20 [  921] [user] [DEBUG] BackendIMAP->Logoff(): IMAP connection closed
04/06/2012 17:36:20 [  921] [user] [ INFO] BackendLDAP->Logoff(): Disconnection successfull.
04/06/2012 17:36:20 [  921] [user] [DEBUG] Combined->Logoff() success
04/06/2012 17:36:20 [  921] [user] [DEBUG] -------- End

Setting Free, Busy, Tentative, or Out of Office status not working

The mapping for Free, Busy, Tentative, or Out of Office [1] seems to be broken in some places. When creating a new event with a certain availability, that availability is not stored as part of the event. After inviting another person to the event, availability automatically becomes (correctly) updated to the previous selection.

Without invitees no availability information, it appears.

Also, "busy" on iOS shows up as "tentative" in Lightning with DAViCal backend, "tentative" reverts back to free, and "out of office" becomes "busy". There seems to be a mapping mixup somewhere between from and to device/caldav.

[1] http://msdn.microsoft.com/en-us/library/ms526656%28v=exchg.10%29.aspx

SYNC_FOLDER_TYPE_XXX VS SYNC_FOLDER_TYPE_USER_XXX

In GetFolder I add additional Folder type.
I am not about the difference but according to the name it does make sense.
What do you think?

  •                   $folder->type = SYNC_FOLDER_TYPE_APPOINTMENT;
    
  •                    if (substr($id, 1) == "personal")
    
  •                            $folder->type = SYNC_FOLDER_TYPE_APPOINTMENT;
    
  •                    else
    
  •                            $folder->type = SYNC_FOLDER_TYPE_USER_APPOINTMENT;
            }
            else
            {
    
  •                   $folder->type = SYNC_FOLDER_TYPE_TASK;
    
  •                    if (substr($id, 1) == "personal")
    
  •                            $folder->type = SYNC_FOLDER_TYPE_TASK;
    
  •                    else
    
  •                            $folder->type = SYNC_FOLDER_TYPE_USER_TASK;
    

Missing timezone parsing format

While testing i found additional timezone format, which generate warning

timezone_open(): Unknown or bad timezone (Helsinki, Kiev, Riika, Tallinna, Sofia, Vilna) (2)
TZID:Helsinki, Kiev, Riika, Tallinna, Sofia, Vilna

TZID:/inverse.ca/20101018_1/America/Argentina/Buenos_Aires
timezone_open(): Unknown or bad timezone (America/Argentina) (2)

DTSTART;TZID="Europe/Budapest":20110903T000000
timezone_open(): Unknown or bad timezone ("Europe/Budapest") (2)

TZID:UTC +0100 (Standard) / UTC +0200 (Daylight)

Multiple BASE_DN, different names, permissions

Using multiple BASE_DN separated by the pipe symbol '|' works fine to use several directories: great job.

However, all entries from the various directories (most likely: "Personal"/"Private" and "Public") are shown combined under one "Contacts" root folder on iOS:

$folder->displayname = "Contacts";

define('LDAP_BASE_DNS', 'cn=%u,ou=private,ou=abook,dc=domain,dc=tld|ou=public,ou=abook,dc=domain,dc=tld');

Would it make sense to (optionally) be able to offer different directories under different names by expanding the variable:

define('LDAP_BASE_DNS', 'Personal#cn=%u,ou=private,ou=abook,dc=domain,dc=tld|Public#ou=public,ou=abook,dc=domain,dc=tld');

In this example, '#' splits Name and DN, '|' splits the various Name/DN definitions. If no separate names are given, all directories are grouped under one root folder "Contacts" (as it is now), otherwise the names specified by the user are used. This would also allow for easy i18n of the "single" folder name, which is now hardcoded in ldap.php as "Contacts".

This would also make sense for a future when we can add contacts on the phone, depending on the permissions per Directory.

Adding a contact in the distinct "Personal" category would work and is intuitive for the user, just like it makes sense that "Public" would be read-only for the "normal" user.

Combine of CardDAV and LDAP backend for GAL

Hi,

I gues that in: PHP-Push-2 / backend / combined / config.php

in section:

        'folderbackend' => array(
            SYNC_FOLDER_TYPE_INBOX => 'i',
            SYNC_FOLDER_TYPE_DRAFTS => 'i',
            SYNC_FOLDER_TYPE_WASTEBASKET => 'i',
            SYNC_FOLDER_TYPE_SENTMAIL => 'i',
            SYNC_FOLDER_TYPE_OUTBOX => 'i',
            SYNC_FOLDER_TYPE_TASK => 'z',
            SYNC_FOLDER_TYPE_APPOINTMENT => 'z',
            SYNC_FOLDER_TYPE_CONTACT => 'z',
            SYNC_FOLDER_TYPE_NOTE => 'z',
            SYNC_FOLDER_TYPE_JOURNAL => 'z',
            SYNC_FOLDER_TYPE_OTHER => 'i',
            SYNC_FOLDER_TYPE_USER_MAIL => 'i',
            SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'z',
            SYNC_FOLDER_TYPE_USER_CONTACT => 'z',
            SYNC_FOLDER_TYPE_USER_TASK => 'z',
            SYNC_FOLDER_TYPE_USER_JOURNAL => 'z',
            SYNC_FOLDER_TYPE_USER_NOTE => 'z',
            SYNC_FOLDER_TYPE_UNKNOWN => 'z',
        ),

is missing 'L" character for

            'l' => array(
                'name' => 'BackendLDAP',
                'config' => self::$BackendLDAP_config,
            ),

Could you help to suggest how I should add it in addition to 'Z', but not instead of 'Z'?

Regards,
Maxim

Folder management not working

Trying to create a folder fails. I don't see an error or warning in the logs, but here you go:

03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] Combined->Setup('[email protected]', 'true', '')
03/06/2012 01:43:39 [16633] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ZPush::CommandNeedsPlainInput(10): false
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I  <FolderHierarchy:FolderCreate>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   <FolderHierarchy:SyncKey>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I    {ee4002b2-bc5a-4b29-8364-19a8e30ec04e}2
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   </FolderHierarchy:SyncKey>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   <FolderHierarchy:ParentId>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I    i/b1ceca1f
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   </FolderHierarchy:ParentId>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   <FolderHierarchy:DisplayName>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I    Test2
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   </FolderHierarchy:DisplayName>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   <FolderHierarchy:Type>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I    12
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I   </FolderHierarchy:Type>
03/06/2012 01:43:39 [16633] [[email protected]] [WBXML] I  </FolderHierarchy:FolderCreate>
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] StateManager->loadHierarchyCache(): 'Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-hc-2'
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-hc-2'
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-2'
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ASDevice->GetHierarchyCache(): HierarchyCache is up - Cached objects: 129
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ZPush::GetAdditionalSyncFolderStore('i/b1ceca1f'): 'false'
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] Combined->Setup('', 'false', '')
03/06/2012 01:43:39 [16633] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] Combined->GetImporter() -> Hierarchy: ImportChangesCombined()
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ImportChangesCombined->Config(...)
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ImportChangesCombined->Config() success
03/06/2012 01:43:39 [16633] [[email protected]] [DEBUG] ImportChangesCombined->ImportFolderChange() SyncFolder Object
(
    [serverid] =>
    [parentid] => i/b1ceca1f
    [displayname] => Test2
    [type] => 12
    [Store] =>
    [unsetVars:protected] => Array
        (
        )

    [mapping:protected] => Array
        (  
            [FolderHierarchy:ServerEntryId] => Array
                (  
                    [1] => serverid
                    [6] => Array
                        (  
                            [7] =>
                        )

                )

            [FolderHierarchy:ParentId] => Array
                (  
                    [1] => parentid
                    [6] => Array
                        (  
                            [7] => setToValue0
                        )

                )

            [FolderHierarchy:DisplayName] => Array
                (  
                    [1] => displayname
                    [6] => Array
                        (  
                            [7] => setToValueEmpty
                        )

                )

            [FolderHierarchy:Type] => Array
                (  
                    [1] => type
                    [6] => Array
                        (  
                            [7] => 18
                            [14] => 0
                            [13] => 20
                        )

                )

            [FolderHierarchy:IgnoreStore] => Array
                (  
                    [1] => Store
                    [3] => 5
                )

        )

    [flags] =>
    [content] =>
)

03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] Combined->Setup('[email protected]', 'true', '')
03/06/2012 01:43:44 [18556] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ZPush::CommandNeedsPlainInput(10): false
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I  <FolderHierarchy:FolderCreate>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   <FolderHierarchy:SyncKey>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I    {ee4002b2-bc5a-4b29-8364-19a8e30ec04e}2
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   </FolderHierarchy:SyncKey>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   <FolderHierarchy:ParentId>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I    i/b1ceca1f
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   </FolderHierarchy:ParentId>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   <FolderHierarchy:DisplayName>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I    Test2
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   </FolderHierarchy:DisplayName>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   <FolderHierarchy:Type>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I    12
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I   </FolderHierarchy:Type>
03/06/2012 01:43:44 [18556] [[email protected]] [WBXML] I  </FolderHierarchy:FolderCreate>
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] StateManager->loadHierarchyCache(): 'Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-hc-2'
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-hc-2'
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-ee4002b2-bc5a-4b29-8364-19a8e30ec04e-2'
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ASDevice->GetHierarchyCache(): HierarchyCache is up - Cached objects: 129
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ZPush::GetAdditionalSyncFolderStore('i/b1ceca1f'): 'false'
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] Combined->Setup('', 'false', '')
03/06/2012 01:43:44 [18556] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] Combined->GetImporter() -> Hierarchy: ImportChangesCombined()
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ImportChangesCombined->Config(...)
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ImportChangesCombined->Config() success
03/06/2012 01:43:44 [18556] [[email protected]] [DEBUG] ImportChangesCombined->ImportFolderChange() SyncFolder Object
(
    [serverid] =>
    [parentid] => i/b1ceca1f
    [displayname] => Test2
    [type] => 12
    [Store] =>
    [unsetVars:protected] => Array
        (
        )

    [mapping:protected] => Array
        (  
            [FolderHierarchy:ServerEntryId] => Array
                (  
                    [1] => serverid
                    [6] => Array
                        (  
                            [7] =>
                        )

                )

            [FolderHierarchy:ParentId] => Array
                (  
                    [1] => parentid
                    [6] => Array
                        (  
                            [7] => setToValue0
                        )

                )

            [FolderHierarchy:DisplayName] => Array
                (  
                    [1] => displayname
                    [6] => Array
                        (  
                            [7] => setToValueEmpty
                        )

                )

            [FolderHierarchy:Type] => Array
                (  
                    [1] => type
                    [6] => Array
                        (  
                            [7] => 18
                            [14] => 0
                            [13] => 20
                        )

                )

            [FolderHierarchy:IgnoreStore] => Array
                (  
                    [1] => Store
                    [3] => 5
                )

        )

    [flags] =>
    [content] =>
)

03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] Combined->Setup('[email protected]', 'true', '')
03/06/2012 01:43:49 [ 3578] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ZPush::CommandNeedsPlainInput(9): false
03/06/2012 01:43:49 [ 3578] [[email protected]] [WBXML] I  <FolderHierarchy:FolderSync>
03/06/2012 01:43:49 [ 3578] [[email protected]] [WBXML] I   <FolderHierarchy:SyncKey>
03/06/2012 01:43:49 [ 3578] [[email protected]] [WBXML] I    0
03/06/2012 01:43:49 [ 3578] [[email protected]] [WBXML] I   </FolderHierarchy:SyncKey>
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ASDevice->GetHierarchyCache(): HierarchyCache is up - Cached objects: 0
03/06/2012 01:43:49 [ 3578] [[email protected]] [WBXML] I  </FolderHierarchy:FolderSync>
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] Combined->GetExporter('')
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined constructed
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined->Config(...)
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined->Config() success
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined->InitializeExporter(...)
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ImportHierarchyChangesCombinedWrap->ImportHierarchyChangesCombinedWrap('i',...)
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] Initializing folder diff engine
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesDiff->InitializeExporter(): Initializing folder diff engine
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/s/4/Appl790312PRA4S-bs-1333583073'
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] BackendIMAP->getFolderIdFromImapId('INBOX') = 9359a9a0
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] BackendIMAP->convertImapId('INBOX') = 9359a9a0
...
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] BackendIMAP->convertImapId('HR') = 972fda43
03/06/2012 01:43:49 [ 3578] [[email protected]] [ INFO] ExportChangesDiff->InitializeExporter(): Found '126' changes
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ImportHierarchyChangesCombinedWrap->ImportHierarchyChangesCombinedWrap('c',...)
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] Initializing folder diff engine
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] ExportChangesDiff->InitializeExporter(): Initializing folder diff engine
03/06/2012 01:43:49 [ 3578] [[email protected]] [DEBUG] BackendCalDAV->GetFolderList(): Getting all folders.
03/06/2012 01:43:53 [ 3578] [[email protected]] [DEBUG] BackendCalDAV->StatFolder('Chome')
03/06/2012 01:43:53 [ 3578] [[email protected]] [DEBUG] BackendCalDAV->GetFolder('Chome')
03/06/2012 01:43:56 [ 3578] [[email protected]] [DEBUG] BackendCalDAV->StatFolder('Thome')
03/06/2012 01:43:56 [ 3578] [[email protected]] [DEBUG] BackendCalDAV->GetFolder('Thome')
03/06/2012 01:43:56 [ 2893] [[email protected]] [DEBUG] Combined->Setup('', 'false', '')
03/06/2012 01:43:56 [ 2893] [[email protected]] [ INFO] Combined->Setup() success
03/06/2012 01:43:56 [ 2893] [[email protected]] [DEBUG] Combined->GetExporter('c/Thome')
03/06/2012 01:43:56 [ 2893] [[email protected]] [DEBUG] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '219' messages in state
03/06/2012 01:43:56 [ 2893] [[email protected]] [DEBUG] BackendCalDAV->GetMessageList('Thome','0')
03/06/2012 01:43:57 [ 3578] [[email protected]] [ INFO] ExportChangesDiff->InitializeExporter(): Found '2' changes
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] ImportHierarchyChangesCombinedWrap->ImportHierarchyChangesCombinedWrap('l',...)
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] Initializing folder diff engine
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] ExportChangesDiff->InitializeExporter(): Initializing folder diff engine
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendLDAP->GetFolderList(): Getting all folders.
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendLDAP->StatFolder('contacts')
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendLDAP->GetFolder('contacts')
03/06/2012 01:43:57 [ 3578] [[email protected]] [ INFO] ExportChangesDiff->InitializeExporter(): Found '1' changes
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined->InitializeExporter(...) success
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] ExportChangesCombined->Synchronize()
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendIMAP->getImapIdFromFolderId('fdcf6253') = other.folder
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendIMAP->getFolderIdFromImapId('clients') = 78779fd7
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendIMAP->convertImapId('clients') = 78779fd7
03/06/2012 01:43:57 [ 3578] [[email protected]] [DEBUG] BackendIMAP->GetFolder('fdcf6253'): 'SyncFolder (
        (S) serverid => fdcf6253
        (S) parentid => 78779fd7
        (S) displayname => folder
        (S) type => 1
        (S) Store => null
        unsetVars(Array) size: 0
        flags => false


Caldav ASV 12 and 14 support

Hi,
I'm adding in my fork (developing branch) support for the EAS 12 and 14 tags. That fix some problems when using with the last version of IMAP/Combined/Caldav and Android.

Are you thought of pushing your backend into Z-Push??

Additional IMAP functionality

In the AS12.1 branch, the following settings exist that would be very useful:

        // Additionally you have to have a Sent Items folder in case you plan to sync with Nokia MfE Built in client / certain HTC Adnroid devices!
    define('IMAP_SENTFOLDER', 'Sent'); // already exists in PHP-Push

        // You have to have a Deleted Items folder in case you plan to sync with Nokia MfE Built in client / certain HTC Adnroid devices!
    define('IMAP_DELETEDITEMSFOLDER', 'Trash');

        // You have to have a Draft folder in case you plan to sync with Nokia MfE Built in client / certain HTC Adnroid devices!
    define('IMAP_DRAFTSFOLDER', 'Drafts');

    // forward messages inline (default off - as attachment)
    define('IMAP_INLINE_FORWARD', false);

    // Define username => fullname changes here
    define('IMAP_USERNAME_FULLNAME', serialize(array(
            '[email protected]'=>'Last, First M.',
            'user2'=>'Lastname2, Firstname2',
            )));

Sending invites to contacts with names throws error, mangles "To:" header

Creating a new appointment from within a PHP-Push2 calendar works sometimes:

WORKS: When entering just an email (no contact!) the invitations via email work but the resulting email has a mangled To: header (see below for details).

BROKEN: When using a known contact with additional information (eg. name is set to "First M. Last"), the To: header gets mangled as well, but due to the extra spaces from "First M. Last" in the contact information, it results in an invalid email address and as a result, no email invitation is sent:

[ERROR] z_RFC822 error: Validation failed for: "[email protected]:[email protected]:[email protected]:[email protected]" <[email protected]:[email protected]:[email protected]:[email protected]>
[ WARN] PHP-Push-2/backend/imap.php:447 imap_mail(): No to field in mail command (2)
[ INFO] StatusException: BackendIMAP->SendMail(): The email could not be sent. Last IMAP-error:  - code: 120
[ WARN] HTTPReturnCodeException: BackendIMAP->SendMail(): The email could not be sent. Last IMAP-error:  - code: 500

LDAP_BASE_DNS variable

Can you please give me an example of how to specify the LDAP_BASE_DNS correctly in config.php to get at least basic LDAP testing going?

I already fixed the login as per the other issue

Now the search/stat/getmessage relies on LDAP_BASE_DNS which I cannot seem to figure out how to specify.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.