Commit Graph

1129 Commits (459b183a42314d99d4a9a20bd17fa46e6ed2fe4c)

Author SHA1 Message Date
Enrique J. Hernández Blasco 532105f1fa oc-task: Save tasks from Outlook
It was not working because we try to save as component the
full calendar and its parent was nil. We have to save the calendar
itself to save the task in the personal calendar.
2015-09-14 12:55:26 -04:00
Ludovic Marcotte 18a300ca5b (fix) appplied fix from Zentyal - PR#102
Original commit: 33a1d2c397
2015-09-09 08:22:33 -04:00
Ludovic Marcotte f515106bcc (fix) added patch from PR93 2015-08-03 09:16:55 -04:00
Ludovic Marcotte 8650492989 Applied PR90 as a patch due to too-many merge conflicts when cherry-picking 2015-07-22 09:05:17 -04:00
extrafu 30103532ae Merge pull request #84 from Zentyal/master
sogo-openchange fixes
2015-05-21 08:46:21 -04:00
Enrique J. Hernández Blasco e2ef0103c4 oc-calendar: Fix regression on AppointmentTimeZoneDefinitionStartDisplay
Introduced by ebe2a466e7 in PR #132 when the event is not
all day neither recurrent one.

The fix is just to initialise to nil when it is a normal event
and it returns NOT_FOUND for this property.
2015-05-19 00:26:42 +02:00
Julio J. García Martín e6d1a00928 Merge pull request #135 from Zentyal/jvalles/reply-requested-return-values
oc-calendar: Fix property values of invitation responses
2015-05-18 12:48:37 +02:00
Juan Vallés 0a285eedec oc-calendar: Fix property values of invitation responses
The value of `PidTagResponseRequested` property in the invitation mail
wasn't being set properly, while the `PidTagReplyRequested` property
wasn't being set at all. This caused invitation response mails not to be
sent. Both properties are expected to be `true`.
2015-05-11 12:58:06 +02:00
Julio J. García Martín 582c24afc5 Merge pull request #133 from Zentyal/ejhernandez/flush-cache
oc-mail: Flush IMAP hierarchy cache to update Outlook folders
2015-05-07 09:53:49 +02:00
Enrique J. Hernández 92ab267db5 Merge pull request #131 from Zentyal/ejhernandez/set-restriction-on-name-for-mail-folders
oc-mail: Support restricitions on name for MAPIStoreMailFolderTable
2015-05-07 02:03:39 +02:00
Enrique J. Hernández Blasco 15f95c4956 oc-mail: Support restricitions on name for MAPIStoreMailFolderTable
This allows us to search for a subfolder in a mail
folder successfully. This is happening, for instance, on folder creation.
2015-05-05 23:34:09 +02:00
Enrique J. Hernández Blasco 2d65b75b56 oc-mail: Flush IMAP hierarchy cache to update Outlook folders
This fixes two scenarios:

* An IMAP subfolder has updated its hierarchy when it is asked
  to be synchronised
* An IMAP root folder is created on Outlook when you logon. OpenChange
  changes are required to be refreshed on synchronisation.
2015-05-05 23:30:12 +02:00
Juan Vallés ebe2a466e7 oc-calendar: Compute PidLidAppointmentDefinitionStartWhole for all-day events 2015-05-05 10:29:24 +02:00
Juan Vallés 7e89c43919 oc-calendar: Compute time offset in floating time in all-day recurring events 2015-05-05 10:29:24 +02:00
Julio J. García Martín dc5237e92e Merge pull request #123 from Zentyal/ejhernandez/no-mapping-creation-root-folder
oc: Do not create indexing entry for a root folder
2015-05-04 11:10:47 +02:00
Ludovic Marcotte f2b5f5917b Fixed dot notation 2015-04-27 15:02:00 -04:00
Ludovic Marcotte dfb960eac4 Disabled -Werr for now 2015-04-27 14:57:44 -04:00
Julio García 08501dacaa Merge branch 'master' into contribute-back
Conflicts:
	NEWS
2015-04-24 16:53:05 +02:00
Jesús García Sáez b7907d654d Merge pull request #127 from Zentyal/jkerihuel/asynchronous-notifications
[oxcnotif] Delete deprecated notification code
2015-04-22 12:45:20 +02:00
Julio García 78f5f60b16 Revert "oc: monkeypatched NGImap4Connection class from sope"
This reverts commit 24e35103ff.
2015-04-20 13:15:22 +02:00
Julio García 255b3d2d00 Revert "oc: NGImap4Connection:fetchUids don't delete RawResponse"
This reverts commit c410a9fc3f.
2015-04-20 13:15:13 +02:00
Julio García 1d9e085658 Revert "oc: NGImap4Connection:fetchUids changed error messages"
This reverts commit 41320a4813.
2015-04-20 13:15:04 +02:00
Enrique J. Hernández Blasco 8fce211172 Merge pull request #125 from Zentyal/jgarcia/multidomain-outlook-entryId
All this basically is to make it work on multidomain environment
the Reply all functionality of emails but I'm sure there are more use cases
as an Outlook client that don't work nowadays without this patch.

More info on commit message but basically it was that we were using user
instead of user@domain.com in several places.
2015-04-17 11:33:21 +02:00
Enrique J. Hernández Blasco 030d343432 oc: Do not create indexing entry for a root folder
This is done by OpenChange after this patchset is merged:

https://github.com/openchange/openchange/pull/273
2015-04-16 23:23:32 +02:00
Jesús García Sáez 58449076a3 Merge branch 'jacalvo/fix-optional-rec-type' 2015-04-16 19:55:19 +02:00
José Antonio Calvo 539060d252 oc-calendar: Fix recipient type for invitations
Take into account optional attendees setting the recipient
type to MAPI_CC when they have the iCal role set to OPT-PARTICIPANT
instead of harding always MAPI_TO (required) as was done before.

This is a complementary fix for: https://github.com/Zentyal/sogo/pull/108
2015-04-16 19:47:47 +02:00
Jesús García Sáez d3bf3dcd8f Merge pull request #122 from Zentyal/ejhernandez/enforce-mapping-subfolder
oc: Enforce the folder creation mapping when the FID exists
2015-04-16 18:05:29 +02:00
Julien Kerihuel d4930a7960 oc: Remove deprecated notification code. 2015-04-16 16:04:47 +02:00
Jesús García Sáez 49ee0850e1 Merge pull request #118 from Zentyal/ejhernandez/return-sorted-events
oc: return last modified messages when sorted by PidMessageTagDeliveryTime

This change is required as oxcfxics is asking for sorting
using this property.

We fake this property on GCS folders (Tasks, Calendar, Contacts)
using c_lastmodified column.
2015-04-16 12:50:20 +02:00
Jesús García Sáez 0f432b654f oc: Fix internal EntryIds properties on multidomain
PidTag*EntryId properties were not being generated (which contain
the email address and so on). Functionality on Outlook clients like
"Reply All" were not working because of this (probably a lot more
stuff related with email addresses).

With multidomain support enabled outlook clients will use full email
address (e.g. user@domain.com) as login.

This change is needed because we were performing ldap queries on samdb
using (sAMAccountName=UIDFieldName), being UIDFieldName the parameter
configured in sogo.conf for that source. In multidomain environment
this field could be `sAMAccountName` but it could not. Actually the
more logical scenario will be to use `uid` field here (which will be
just `user`, without the `@domain.com` part).

SOGoUserManager will return `sAMAccountName` if the contact has it
(in Outlook environment that means always) so it can (and must) be
used to query samdb in MAPIStoreSamDBUtils properly.

TL;DR: use sAMAccoutName instead of uid to query samdb
2015-04-16 11:32:24 +02:00
Jesús García Sáez 1d6f1a83af use full login for sogo_cache_folder tables
So when multidomain is enabled we will have tables like
sogo_cache_folder_user_A_domain_D_com instead of just
sogo_cache_folder_user

If multidomain is disabled the folders will still be like
sogo_cache_folder_user
2015-04-14 13:18:23 +02:00
Enrique J. Hernández Blasco bddd67fb93 oc: Enforce the folder creation mapping when the FID exists
We believe the folder ID OpenChange is sending us is new
and we keep the indexing database properly updated.

Although the solution is not elegant, this could avoid
inconsistencies between what the client stores and the
relation in the MAPIStore backend.
2015-04-13 11:48:42 +02:00
Julio García 479bbce7d0 Merge pull request #116 from Zentyal/ejhernandez/soft-deleted-sync
Soft deleted mail messages sync
2015-04-10 10:27:48 +02:00
Julio J. García Martín 69b06d3c7a Merge pull request #113 from Zentyal/jag/show-internet-headers
Support for PidTagTransportMessageHeaders property
2015-04-10 10:02:00 +02:00
Enrique J. Hernández Blasco 95a8a9316a oc: Use new OC_DEBUG macro
Avoiding the usage of __FUNCTION__ and __LINE__
and more related with the logging system is being in place
for OpenChange.

As well as set the proper level to some debug messages.
2015-03-27 11:12:40 +01:00
Enrique J. Hernández Blasco 1ee47b1ee2 oc: return last modified messages when sorted by PidMessageTagDeliveryTime
This change is required as oxcfxics is asking for sorting
using this property.

We fake this property on GCS folders (Tasks, Calendar, Contacts)
using c_lastmodified column.
2015-03-27 10:27:16 +01:00
Enrique J. Hernández Blasco dfde498b7c oc-mail: Include Deleted flagged messages on syncing cache
This gives an accurate value for SyncLastDeletedMessage
2015-03-26 22:45:13 +01:00
Enrique J. Hernández Blasco 06476abdf7 oc-mail: return soft-deleted mails while syncing
As well as hard deleted

As explained in [MS-OXCFXICS] Section 2.2.1.3.1, the
property MetaTagIdsetDeleted must include both types
of messages and this idset is filled with the return
value of this message.
2015-03-26 22:05:43 +01:00
Jesús García Sáez dc869ce106 oc-mail: Support for PidTagTransportMessageHeaders property
This property is needed to show the 'Internet Headers' in Outlook.
Outlook 2010 shows them in the properties dialog of a message.
Outlook 2007 show them in message options section from context menu
of a mail message.

The property is defined in [MS-OXOMSG] section 2.2.1.61.

The property is formed concatenating the mail message headers
properly mime encoded.

The headers are appended in no defined order.
2015-03-26 19:26:48 +01:00
Enrique J. Hernández Blasco a47f1de607 oc-mail: Update place for Sharing Flavour prop values
It has been moved in OpenChange
2015-03-26 14:18:34 +01:00
Jesús García Sáez 09aed26f10 Merge pull request #114 from Zentyal/ejhernandez/fix-interleaving-creating-folder
As it happened with dba17fb if we interleave requests
from different users while creating a folder we can
create the folder in other user's mailbox as latest
activeUser is the one from latest sogo_context_get_root_folder
call.

This is for me a lack of right design and a workaround
only fixing this issue but not the root cause.
2015-03-25 17:15:05 +01:00
Enrique J. Hernández Blasco 82fb03b67b oc-mail: Ensure we are creating folder to the right user
As it happened with dba17fb if we interleave requests
from different users while creating a folder we can
create the folder in other user's mailbox as latest
activeUser is the one from latest sogo_context_get_root_folder
call.

This is for me a lack of right design and a workaround
only fixing this issue but not the root cause.
2015-03-25 16:53:42 +01:00
Enrique J. Hernández Blasco f9c8661fe6 oc-mail: Use constant names in props value
This gives to the developer more information about
the property values for PidLidSharingFlavor and
PidLidSharingCapabilities.
2015-03-25 10:12:15 +01:00
Enrique J. Hernández Blasco 661b6694af oc-mail: Fix several sharing properties managing
* PidNameXSharingFlavor is used by Outlook 2010 so we have
  to store it
* 0x5100 is used although it is not in spec as Sharing Flavour
  value when the request is denied from a message where
  Request + Invitation was sent.
* Return properly PidNameXSharingCapabilities and PidNameXSharingFlavor
  as it is an string representation of a hex number
* Try to guess proper sharing flavour value when it is missing
2015-03-25 10:12:15 +01:00
Enrique J. Hernández Blasco 514b1c03be oc-mail: Store request properties
Save them in extra properties from folder container.

This is required because the client once a request is accepted
or denied sets these two properties and save the message again.
As we cannot modify an IMAP message, we use this utility.

See [MS-OXSHARE] Section 3.1.4.3 for details.
2015-03-25 10:12:15 +01:00
Enrique J. Hernández Blasco a663fdd260 oc-mail: Give support to store extra properties in versions message
This is handy when you want to store properties once a mail
has hit the server and thus cannot be changed.
2015-03-25 10:12:15 +01:00
Jesús García Sáez 0db16aedb1 Merge pull request #112 from Zentyal/ejhernandez/fix-crash-invalid-ics
A failure in parsing an ICS makes return a nil calendar
object. Instead of creating an appointment with nil
information which can lead to crashes like the one
generated creating PidLidCleanGlobalObjectId property.

We return an empty message with no information which is
taken into account in Outlook but not displayed like
in SOGo webmail does.
2015-03-24 19:15:05 +01:00
Enrique J. Hernández Blasco 6204aebf2c oc-calendar: do not crash with invalid events
A failure in parsing an ICS makes return a nil calendar
object. Instead of creating an appointment with nil
information which can lead to crashes like the one
generated creating PidLidCleanGlobalObjectId property.

We return an empty message with no information which is
taken into account in Outlook but not displayed like
in SOGo webmail does.
2015-03-23 23:57:33 +01:00
Enrique J. Hernández Blasco 8ee2303e78 oc: Empty ACL from a folder works with several users
The `[SOGoFolder:aclUsers]` returns a reference to a `NSArray`
which is being modified in the `for` loop making fail when
more than one user is in the ACL with `NSRangeException`.
2015-03-19 00:06:14 +01:00
José Antonio Calvo 2668bc313c oc-calendar: Fix event invitations for optional attendees
Outlook sets recipient type of Required attendees as MAPI_TO and
optional ones as MAPI_CC, so the fix is just to not only iterate
over the "to" list of recipients but also the "cc" one. We're
also setting the proper iCal value for this case (OPT-PARTICIPANT
instead of REQ-PARTICIPANT)

In [MS-OXOCAL] Section 2.2.4.10.7 says the recipient type is 0x01
as Required and 0x02 as Optional and other documents such as
[MS-OXCMSG] 2.2.3.1.2 indicates that MAPI_TO is 0x01 and MAPI_CC
is 0x02, that's why is stored in 'to' and 'cc' respectively.
2015-03-18 18:18:46 +01:00