Instead of treating all the message either as alternative or mixed with
this changeset the MIME type of the parent part is used.
This allows a correct disposition of the message in the cases when
nested multiparts elements are used.
Also in mixed parts we convert between plain text and HTML as needed.
If we have multiple parts with different encodings we recode
all HTML parts to UTF-8 and we use it as message charset.
This is neccesary because Outlook assummessa single charset
for all the message.
Also we convert the end of line in text/plain to <br/> tag
when showing them as HTML in multipart/mixed parts.
This specifies a little the scope of the variable to make it
more realistic with the actual values it may have. We do have
a static typed compiled language, why don't we use it?
If the event was created by the MAPI client, the client's time zone (if
present) is assigned to the event's calendar in iCalEvent+MAPIStore.
This way, we can use it to deliver the event's properties correctly.
SOGo event notification mails add information to the event name in their
subject (e.g. _Event invitation: "foo"_). The client uses the mail
subject to create a copy of the event on the attendee's calendar, so we
need to strip out that extra information if we want the event to have
the proper name.
And perform the real IMAP operation on save method as described by
[MS-OXCFXICS] and [MS-OXCMSG] Section 2.2.3.3, these operations must be
committed when SaveChangesMessage is called.
As it is expected by Outlook to increase the change number when
performing the `SetMessageReadFlag` ROP, if it is not done, the client
tries indefinitely to store that.
The attachments which used a extended parameter for their filename
('filename*=') where silently dropped.
This was because MAPIStore was only looking for no-extended filename
parameter.
The solution is using the 'filename' from the
SOGOExtension of the NSDictionary interface.
It is required when you are using SynchronizeImportReadStateChanges ROP
to update the MetaTagCnsetRead meta property.
See [MS-OXCFXICS] Section 3.2.5.9.4.6
This could lead to sync issues.
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`.
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
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.
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.
In this way, we do not modify the flags (\Seen) on preloading.
The IMAP server returns the content without .peek section so
it is removed.
This also performs the modification intended by the following
Pull Request:
https://github.com/Zentyal/sogo/pull/50
That tried to avoid set \Seen flag when preloading message bodies
on synchronisation. But in this case we are not incrementing the
modseq as we are not modifying any messages flags.
It acts as a proxy of MAPIStoreMailMessage and it manages the properties
defined in [MS-OXSHARE] Section 2.2 by storing them in the mail message
as eXtensible MIME headers which starts with X-MS-Sharing.
This is happening when the lastModSeq is greater than the modseq
from an old message and that message is not in cache.
This is used as last resort before crashing and it is only used
in objectVersion as it is the first place to call on sync. Other
related properties would work.