Compare commits

..
592 Commits
Author SHA1 Message Date
Ludovic Marcotte c5526bb70a Fixed NEWS file 2016-05-12 15:09:21 -04:00
Francis Lachapelle 0f9dce8bb2 Update ChangeLog 2016-05-12 13:53:22 -04:00
Francis Lachapelle e35f9c4fad Preparation for release 2.3.11 2016-05-12 13:52:50 -04:00
Francis Lachapelle e830900a5f Fix sensitive range of checkboxes in event editor
Fixes #3665
2016-05-12 09:38:00 -04:00
Ludovic Marcotte 9438685299 Updated NEWS file 2016-05-11 12:30:25 -04:00
Ludovic Marcotte a8574d8e75 (fix) handle multi-value org units 2016-05-11 11:44:46 -04:00
Ludovic Marcotte 11844283d1 (fix) don't use removeItemAtPath - it is not available on Precise
Conflicts:

	SoObjects/Mailer/SOGoDraftObject.m
2016-05-10 15:54:02 -04:00
Ludovic Marcotte af85f4dd92 Updated NEWS 2016-05-10 08:53:41 -04:00
Ludovic Marcotte d601608024 (fix) fixed bogus headers generation when stripping folded bcc headers (fixes #3664) 2016-05-10 08:51:59 -04:00
Ludovic Marcotte f425d61dc7 Updated NEWS 2016-05-09 15:16:14 -04:00
Ludovic Marcotte a4c69215db (fix) use uid and not always-nil login value at this point 2016-05-09 15:14:48 -04:00
Ludovic Marcotte a26b2ec9ef (fix) make sure we don't double-append domain part (fixes #3614) 2016-05-06 13:48:59 -04:00
Ludovic Marcotte fbd2f1511b (fix) make sure found tag is always defined 2016-05-06 08:15:02 -04:00
Ludovic Marcotte 2fb2485b12 (fix) improvement for #3518 2016-05-06 08:02:40 -04:00
Ludovic Marcotte 4ac2811caf Fixed typo 2016-05-03 09:57:22 -04:00
Ludovic Marcotte 83c464f051 Updated NEWS 2016-05-03 09:06:19 -04:00
Ludovic Marcotte da489c6499 (fix) correctly write the content on disk before zipping it 2016-05-03 09:04:36 -04:00
Ludovic Marcotte c1c44b8996 Updated NEWS file 2016-05-02 10:14:30 -04:00
Ludovic Marcotte 92a7cc6b95 (fix) don't mark calendar invitations as read when using EAS and fetching mesasges 2016-05-02 10:09:53 -04:00
Ludovic Marcotte 20d8fde945 (fix) correctly set flags when replying/forwarding emails using EAS 2016-05-02 09:43:13 -04:00
Ludovic Marcotte 3c11c6ac4e Updated NEWS 2016-04-28 00:51:46 -04:00
Ludovic Marcotte a2cec25543 (fix) create cookie after password change using ppolicy 2016-04-28 00:50:57 -04:00
Ludovic Marcotte 04f2002feb (fix) return correct response 2016-04-27 17:04:22 -04:00
Ludovic Marcotte 2c01cb7a0a (fix) ppolicy password change should now work on login page 2016-04-27 16:24:49 -04:00
Ludovic Marcotte 05505eb3e5 (doc) improve the doc regarding non-alpha characters in password (fixes #1059) 2016-04-21 16:01:09 -04:00
Ludovic Marcotte b064f94f03 Updated NEWS file 2016-04-14 15:23:58 -04:00
Ludovic Marcotte 012ac98b31 (fix) encore CR for EAS (fixes #3626) 2016-04-14 15:23:09 -04:00
Patrice Levesque 8d166dd80c Add missing EOF that got lost somewhere 2016-04-13 09:39:50 -04:00
Ludovic Marcotte 065f8478e6 (fix) ported v3 fix to v2 for search+classification (fixes #3629) 2016-04-12 16:11:21 -04:00
Ludovic Marcotte e6ed07879c Fixed typo 2016-04-12 14:31:22 -04:00
Patrice Levesque 3ab9fb481c Port two recent debian packaging commits to debian-multiarch
Add a post-install/upgrade note on DB schema upgrade.
commit 9d7a21883a

Make example scripts in documentation executable.
commit 1f029c9c70
2016-04-12 13:22:31 -04:00
Patrice Levesque 431fe3406f Wrap RequestHeader in conditional for safety.
Prevent breaking users' Apache configuration (and prevent frightening
error message) when mod_headers is not turned on at SOGo installation.
2016-04-12 13:22:21 -04:00
Patrice Levesque 33565bce6a Add a post-install/upgrade note on DB schema upgrade. 2016-04-12 13:21:58 -04:00
Ludovic Marcotte 181f1ec22d Updated NEWS 2016-04-12 13:18:31 -04:00
Ludovic Marcotte fc86e60acc (fix) avoid double-appending domain in cache (fixes #3614) 2016-04-12 13:17:04 -04:00
Ludovic Marcotte c091c05185 (fix) adjust offset datatype to avoid int overflows (fixes #3628) 2016-04-11 15:56:02 -04:00
Patrice Levesque 7432145347 Make example scripts in documentation executable (RHEL).
Addresses bug #3053 at http://sogo.nu/bugs/view.php?id=3053
2016-04-11 14:23:55 -04:00
Patrice Levesque 57fc2082b2 Make example scripts in documentation executable.
Addresses bug #3053 at http://sogo.nu/bugs/view.php?id=3053
2016-04-11 11:37:22 -04:00
Ludovic Marcotte 7f6211ae4a (fix) avoid going to far when checking logins if no login is defined 2016-04-11 10:18:09 -04:00
Francis Lachapelle f9d2acded7 (fix) Calendars list in component editor 2016-04-07 20:00:30 -04:00
Ludovic Marcotte 2115c46fbb (fix) rename the start var to avoid potential SOPE confusion 2016-04-07 14:23:28 -04:00
Ludovic Marcotte 1615545584 (fix) don't escape \r 2016-04-07 09:27:26 -04:00
Ludovic Marcotte 76d39f21f2 Updated NEWS file 2016-04-06 11:21:13 -04:00
Ludovic Marcotte 2b137d6bc0 (fix) properly XML escape wide characters (fixes #3616) 2016-04-06 11:20:46 -04:00
Ludovic Marcotte 5ac42d79a8 Updated NEWS file 2016-04-05 15:24:55 -04:00
Ludovic Marcotte 40b040f26e (fix) Make sure we escape the organizer name over EAS (fixes #3615) 2016-04-05 15:23:09 -04:00
Ludovic Marcotte e931b141bf Release preparation 2016-04-05 12:31:35 -04:00
Francis Lachapelle 1e491d45a5 (i18n) Update translations 2016-04-05 11:54:23 -04:00
Francis Lachapelle 5fbb40a8ae (doc) Improve formatting 2016-04-05 11:01:50 -04:00
Jens Erat 2b13db1d0e (doc) Add caveat on using a database host alias 2016-04-05 11:01:15 -04:00
Ludovic Marcotte 35ed24511d (fix) rename sig handler 2016-04-04 08:35:44 -04:00
Ludovic Marcotte afa71a186c Updated NEWS 2016-04-04 08:31:28 -04:00
Ludovic Marcotte a9dc1c03ce (fix) sanitize non-us-ascii 7bit emails 2016-04-04 08:29:37 -04:00
Ludovic Marcotte aade18eec2 Updated NEWS 2016-04-01 14:54:17 -04:00
Ludovic Marcotte 38ddc0b69a (fix) now cache heartbeat and folders during EAS ping ops (fixes #3606) 2016-04-01 14:53:28 -04:00
Ludovic Marcotte afc4552cb0 (fix) set minimal interval (fixes #3605) 2016-03-30 14:32:32 -04:00
Ludovic Marcotte f2086b76c7 (fix) added missing header 2016-03-30 08:45:50 -04:00
Ludovic Marcotte aaf3e292be Updated NEWS 2016-03-29 11:39:02 -04:00
Ludovic Marcotte 33583ea872 (fix) use PEEK when archiving messages (fixes #2792) 2016-03-29 11:38:30 -04:00
Ludovic Marcotte 1d56a9256a (fix) fixed broken code after commit 663c4a44 2016-03-29 10:38:37 -04:00
Ludovic Marcotte 920b1aea32 Updated NEWS file 2016-03-29 10:35:25 -04:00
Ludovic Marcotte 44d8b63136 (fix) handle EAS termination when SOGo is being shutdown (fixes #3604)
Conflicts:

	ActiveSync/SOGoActiveSyncDispatcher.m
2016-03-29 10:34:59 -04:00
Ludovic Marcotte 5a2676f91b Updated NEWS 2016-03-28 17:38:54 -04:00
Ludovic Marcotte 821b9d1f3c (fix) prevent double Sync ops from same device (fixes #3603) 2016-03-28 17:38:33 -04:00
Ludovic Marcotte feca4ca3a5 (fix) memory leak 2016-03-28 15:10:41 -04:00
Ludovic Marcotte 7c814add25 Updated NEWS file 2016-03-28 11:19:54 -04:00
Ludovic Marcotte 663c4a44a2 (fix) handle Dovecot's mail_shared_explicit_inbox when using EAS
Conflicts:

	ActiveSync/SOGoActiveSyncDispatcher.m
	SoObjects/Mailer/SOGoMailAccount.m
2016-03-28 11:18:35 -04:00
Ludovic Marcotte c885aaeb88 Updated NEWS file 2016-03-28 08:46:49 -04:00
Ludovic Marcotte d047822eb5 (fix) handle FilterType changes using EAS (fixes #3543) 2016-03-28 08:46:22 -04:00
Ludovic Marcotte 50cb8772c4 (fix) small performance optimization 2016-03-23 15:10:18 -04:00
Ludovic Marcotte a13a72aff1 Updated NEWS 2016-03-23 13:43:09 -04:00
Ludovic Marcotte cfddf147c4 (fix) handle default classification for tasks (fixes #3541) 2016-03-23 13:42:21 -04:00
Ludovic Marcotte 44ee450fd7 (doc) documented WOMaxUploadSize 2016-03-21 13:07:02 -04:00
Francis Lachapelle dcf246ab54 (i18n) Restore missing strings
Fixes #3593
2016-03-21 11:19:32 -04:00
Francis Lachapelle 3a75491e0f Update NEWS file 2016-03-21 09:25:15 -04:00
Ludovic Marcotte b115f26834 (fix) make sure we don't consider SOGoMaximumRequestCount when it is 0 2016-03-21 08:19:40 -04:00
Ludovic Marcotte 69d90e1fad Updated NEWS 2016-03-18 13:02:04 -04:00
Ludovic Marcotte 9621527414 (fix) use the correct message class for S/MIME mails 2016-03-18 13:00:02 -04:00
Ludovic Marcotte 01499a9315 Updated NEWS 2016-03-18 12:56:20 -04:00
Ludovic Marcotte f16cc609ea (fix) handle empty body data correctly (fixes #3581) 2016-03-18 12:54:00 -04:00
Ludovic Marcotte a87c276b6b (fix) handle "username" as path 2016-03-18 12:50:09 -04:00
Ludovic Marcotte 599f00a571 Updated NEWS file 2016-03-18 12:38:20 -04:00
Ludovic Marcotte 5ae40a02ec (fix) respect the LDAP attributes mapping in the list view 2016-03-18 12:37:21 -04:00
Ludovic Marcotte 7d383639b9 Updated NEWS file 2016-03-18 11:07:13 -04:00
Ludovic Marcotte 766d0ff64e (feat) user rate-limiting support for all SOGo requests 2016-03-18 11:03:45 -04:00
Francis Lachapelle 30b08941f6 Add Lithuanian translation 2016-03-16 11:34:11 -04:00
Francis Lachapelle e5b42c5e98 Update ChangeLog 2016-03-16 10:59:31 -04:00
Francis Lachapelle ed5d922ea4 Preparation for release 2.3.9 2016-03-16 10:59:15 -04:00
Francis Lachapelle 82b919e7ee Update translations
Added Lithuanian
2016-03-16 10:50:01 -04:00
Ludovic Marcotte 821b7c19ce Updated NEWS file. 2016-03-16 08:59:05 -04:00
Ludovic Marcotte bed5175a74 (fix) properly split long headers (fixes #3152) 2016-03-16 08:55:21 -04:00
Francis Lachapelle 188328d5d7 (js) Prefer RefreshViewCheck to MailMessageCheck
Fixes #3465
2016-03-15 16:00:13 -04:00
Ludovic Marcotte 17afe7c077 (fix) avoid escaping values that are quoted (fixes #3296) 2016-03-15 10:38:38 -04:00
Ludovic Marcotte bfb7fa2e14 (fix) don't skip last identity 2016-03-14 13:18:24 -04:00
Ludovic Marcotte e8ff3dc539 (fix) avoid compilation warning from previous commit 2016-03-13 13:47:03 -04:00
Ludovic Marcotte 20b1d3c0e9 Use GMT tz when setting birthday (fixes #3579) 2016-03-13 13:46:53 -04:00
RaphWeyman 3a66e54bd0 Update SOGoActiveSyncDispatcher.m
Add local memory pool so as to restrict memory consumption while waiting in the ping cycle.
Consumption can otherwise grow quite large while if the SOGoMaximumPingInterval and SOGoMaximumSyncInterval have been increased to allow for push ActiveSync.
2016-03-13 09:01:52 -04:00
Ludovic Marcotte d1c3327d47 (fix) avoid truncating the MIME content when fetching the whole message 2016-03-09 08:49:17 -05:00
Ludovic Marcotte 100841efbd (fix) remove unnecessary error message 2016-03-08 08:24:51 -05:00
Francis Lachapelle 8617ddc05e Review order of ProxyPass directives
Fixes #3461
2016-02-23 11:56:28 -05:00
Ludovic Marcotte 8e94c33a0f (fix) avoid truncating XML entities 2016-02-19 09:08:24 -05:00
Ludovic Marcotte 32bb1456e2 (feat) attachment size upload using WOMaxUploadSize (fixes #3510 and #3135) 2016-02-16 16:28:11 -05:00
Francis Lachapelle d01f5d36fa (css) Fix overlap of elements in preferences 2016-02-16 14:31:34 -05:00
Ludovic Marcotte 6de15edb9c (fix) don't mark content as truncated if it's not 2016-02-16 08:32:40 -05:00
Ludovic Marcotte a2078da5f0 Updated NEWS file regarding cherry-picked commits 2016-02-15 17:39:42 -05:00
Ludovic Marcotte 2193dbb678 Make sure we don't go overbounds 2016-02-15 17:39:15 -05:00
Ludovic Marcotte cb9f26cc1f (fix) support EAS MIMETruncation 2016-02-15 17:39:01 -05:00
Ludovic Marcotte e4473a656b (fix) make sure our heartbeat interval is always greater than the internal one 2016-02-12 13:08:17 -05:00
Ludovic Marcotte 7cbf019742 Updated NEWS file regarding previous commit 2016-02-11 15:07:01 -05:00
Ludovic Marcotte 456ff7d5a3 (fix) avoid EAS bday offset (fixes #3518) + small fix in previous commit 2016-02-11 15:05:26 -05:00
Ludovic Marcotte 5f0061205f Updated NEWS file regarding previous commit 2016-02-11 14:35:50 -05:00
Ludovic Marcotte 11a2bcfffd (fix) EAS issue with attachments in 2nd-level mailboxes (fixes #3505) 2016-02-11 14:35:01 -05:00
Ludovic Marcotte 0b1fbf0dee Updated NEWS file regarding previous commit. 2016-02-10 15:05:47 -05:00
Ludovic Marcotte 499dbf68ae (fix) allow resources to prevent invitations (fixes #3410) 2016-02-10 15:05:00 -05:00
Francis Lachapelle 4c6c0a3644 Update ChangeLog 2016-02-05 12:16:34 -05:00
Francis Lachapelle 1c65424242 Preparation for release 2.3.8 2016-02-05 12:16:13 -05:00
Francis Lachapelle 08bf6d528b Update translations 2016-02-05 12:14:48 -05:00
Francis Lachapelle a9083004ef Update CKEditor to version 4.5.7 2016-02-05 12:11:36 -05:00
Ludovic Marcotte ec02c41d9b Updated NEWS file 2016-02-05 10:09:47 -05:00
Ludovic Marcotte 07e3c48ed0 (fix) added local memory pool 2016-02-05 10:04:25 -05:00
Ludovic Marcotte 920bfba8b8 (fix) add shared/public namespaces in the list or returned folders 2016-02-05 10:02:05 -05:00
Ludovic Marcotte bc2e46cda7 Updated NEWS file regarding PR#196 2016-02-04 10:41:21 -05:00
Ludovic Marcotte e9d24fe0e6 (fix) correctly encode filename of attachments over EAS (#3491) 2016-02-04 10:37:44 -05:00
Francis Lachapelle 24d32ae220 Merge pull request #196 from gilcn/SOGo-issue-0003321
(fix) Folders with square brackets error

Fixes #3321
2016-02-04 10:32:42 -05:00
gilcn 8baf8731b7 (fix) Bug #3321: Folders with square brackets error
http://sogo.nu/bugs/view.php?id=3321
2016-02-04 11:34:07 +01:00
Francis Lachapelle b9cdc437eb Update translations 2016-01-27 13:13:14 -05:00
Francis Lachapelle a451a1120b Preparation for release 2.3.7a 2016-01-26 11:41:59 -05:00
Francis Lachapelle 6cfed4eb67 Update translations 2016-01-26 11:14:53 -05:00
Francis Lachapelle a55c98b98d Update French translation 2016-01-26 09:19:13 -05:00
Ludovic Marcotte 7c0649efcf (fix) small i18n fixes 2016-01-26 09:07:26 -05:00
Ludovic Marcotte 0ca6512617 (fix) added missing icon + localization 2016-01-26 08:16:19 -05:00
Francis Lachapelle 3ee29c0b71 Update ChangeLog 2016-01-25 11:19:20 -05:00
Francis Lachapelle 7b4c6346f8 Preparation for release 2.3.7 2016-01-25 11:19:06 -05:00
Ludovic Marcotte d5fd719212 (doc) missing SOGoMailKeepDraftsAfterSend documentation 2016-01-25 11:08:33 -05:00
Francis Lachapelle be7971ceef Add Croatian translation 2016-01-25 10:51:09 -05:00
Ludovic Marcotte 3f0c2b647c (fix) do not try to decode non-wbxml responses for debug output (#3444) 2016-01-25 10:25:54 -05:00
Ludovic Marcotte 155acfa9a6 (feat) newly created folders using EAS are always sync'ed by default (#3454) 2016-01-25 10:21:23 -05:00
extrafu 57901b8469 Merge pull request #187 from ethoms/patch-1
fix (revised) for issue with CardDAV sync with the DAVDroid sync client.
2016-01-25 09:19:16 -05:00
ethoms 5ba476789c fix (revised) for issue with CardDAV sync with the DAVDroid sync client.
This is a revised fix for the issue raiased in sogo bug tracker 3370 and 3373. It supercedes the fix in commit  2c723070c6 .

The fix was noted in NEWS with the comment "we now return all cards when we receive an empty addressbook-query REPORT". However it did not work for me and at least two others, as can be seen in the commit comments. In summary, only contacts with email addresses were synced. The suggested change from kwirk fixes the regular address book sync, but it completely breaks syncing of the read-only Group Directory (Corporate Directory). My suggested changes work in full (as far as I'm able to test).

I have done some fairly extensive testing of CardDAV sync (with DAVDroid only) and it seems to work 100% now. In addition to the obvious tests, I have tested with contacts that only have one field of data entered. The feilds I've tested (with all other fields empty) are as follows:

First name
Last name
Display name
email address
Work (telephone)
Home (telephone)
Fax (telephone)
Mobile (telephone)

Additionally, I tested syncing of a contact with only the Work Address fully populated. In the webmail, since the name fields are all missing, the "Organization" field of the Work Address takes the place of the name field in the 'Name' column. This does get synced to my phone and it also appears my Android contact list with 'Name' set to the 'Organization' field data. The address, organization and website fields being in tact also.

In addition, I tested a Group Directory (Corporate Directory) [SOGoUserSources->isAddressBook] sync. It seems contacts without email addresses do not sync. This seems to be the behaviour across the board with a "." search filter. This happens despite the filter in SOGoUserSources including ldap entries without a mail attribute. Nothing I can do to patch this in SOGoFolder+CardDAV.m, that would have to be fixed in the code that deals with the special "." search filter (I guess).

I think the contact search system needs some looking into, particularly the "." search filter behaviour. There is another bug related to contact search in the webmail address book view. I will make a bug report on that soon. It's a shame there isn't an "all" search filter, it would seem it would make various parts of SOGo easier to get the right behaviour.
2016-01-24 03:43:24 +08:00
Ludovic Marcotte 49d5a72d65 (fix) rewrote the string sanitization to be 32-bit Unicode safe 2016-01-22 20:30:40 -05:00
Ludovic Marcotte f34aa2996d (fix) more fix regarding recurrence exceptions and body tags 2016-01-22 14:02:05 -05:00
Ludovic Marcotte 5686e086cd (fix) now always generate invitation updates when using EAS 2016-01-22 13:35:02 -05:00
Ludovic Marcotte ed9ec04669 (fix) make sure we escape control chars 2016-01-22 12:37:00 -05:00
Ludovic Marcotte 737d2ffccc (feat) UI for previously commited new feature (junk/not junk) 2016-01-22 10:32:13 -05:00
Ludovic Marcotte 7ca66b4078 (feat) new junk/not junk capability with generic SMTP integration 2016-01-22 10:30:27 -05:00
Francis Lachapelle 04c68e0674 Localization 2016-01-21 10:10:13 -05:00
Francis Lachapelle bf7f5e8be7 Localization 2016-01-20 15:09:22 -05:00
Francis Lachapelle f1d0f770df Revert "Request all contacts when no filter"
This reverts commit 1c8b693656.
2016-01-20 13:59:13 -05:00
Francis Lachapelle 596c22d828 Update ChangeLog 2016-01-18 14:17:36 -05:00
Ludovic Marcotte e223d064d9 (fix) disabled test for now since it fails on squeeze 2016-01-18 14:13:25 -05:00
Ludovic Marcotte dbf6426449 (fix) don't use false, but use NO 2016-01-18 14:05:30 -05:00
Francis Lachapelle 7fc6eec157 Update ChangeLog 2016-01-18 11:24:23 -05:00
Ludovic Marcotte f48b3405d7 (fix) old case with gcc 2016-01-18 11:14:25 -05:00
Ludovic Marcotte 52bc589ab8 (fix) re-enabled test 2016-01-18 10:50:48 -05:00
Ludovic Marcotte 03f879433b (fix) let the test compile on older gcc 2016-01-18 10:23:19 -05:00
Francis Lachapelle ad141295ed Update ChangeLog 2016-01-18 09:55:36 -05:00
Francis Lachapelle 5fef815191 Preparation for release 2.3.6 2016-01-18 09:55:21 -05:00
Francis Lachapelle ec28fdc8d0 Update ChangeLog 2016-01-18 09:51:58 -05:00
Francis Lachapelle b1590f6b2e Update translations 2016-01-18 09:51:22 -05:00
Ludovic Marcotte 800d143a35 Update NEWS file regarding PR#184 2016-01-18 09:20:41 -05:00
extrafu a503b34d7a Merge pull request #184 from zentyal/master
Fixes from Zentyal since 2015/12/30
2016-01-18 09:10:35 -05:00
Jesús García Sáez 65670027cb Merge pull request #231 from zentyal/ejhernandez/calendar-perm
Calendar folder permission roles
2016-01-18 13:49:39 +01:00
Ludovic Marcotte d5bf661cf1 (fix) avoid generating empty ConversationId which can break Android EAS 2016-01-17 06:30:02 -05:00
Ludovic Marcotte dc2878b5e2 (fix) don't generate dual Body tag for event exceptions 2016-01-16 08:33:55 -05:00
Ludovic Marcotte f9aab0de75 (fix) correctly remove the event/task 2016-01-14 14:50:58 -05:00
Francis Lachapelle 5c58299458 Update Russian translation 2016-01-14 09:10:56 -05:00
Enrique J. Hernández Blasco 57fad470fb oc-calendar: Detail limitations on setting permissions
As MAPI permission flags are much more detailed that SOGo ones.
2016-01-13 17:52:49 +01:00
Enrique J. Hernández Blasco e0b7efbbbf oc-calendar: Set simple and Detailed Free/Busy permission level
By restricting when FolderVisible right is set to the following rights:

* ReadAny
* EditAny
* DeleteAny

This goes beyond what specs says about when FolderVisible right is
mandatory but there is no more information stored in SOGo
(no possibility to set FolderVisible specific right)

See [MS-OXCPERM] Section 2.2.6 for more details
2016-01-13 17:52:48 +01:00
Enrique J. Hernández Blasco 4278e417a7 oc-calendar: Enable editor role
When Outlook sets the editor role, the FreeBusyDetailed and FreeBusySimple
right flags are set as Full Details are available.

When we store this information in SOGo, the SOGoCalendarRole_PublicModifier,
SOGoCalendarRole_PrivateModifier and SOGoCalendarRole_ConfidentialModifier
are stored as well as the free busy related roles, but as
[SOGoAppointmentFolder aclsForUser:forObjectAtPath] only returns the highest
access rights, we have to set as well the FreeBusy flags.

More details on [MS-OXCPERM] Section 2.2.6
2016-01-13 17:52:48 +01:00
Ludovic Marcotte 230688bf4e (fix) adjusted JS files regarding translation updates 2016-01-13 11:29:41 -05:00
Francis Lachapelle 1a1f74b5d0 (fix) Remove non-localized languages names 2016-01-13 10:52:36 -05:00
Francis Lachapelle 93d1c3d4e7 verify_translations.py: fix syntax error 2016-01-13 10:49:29 -05:00
Francis Lachapelle ea37a9cd29 verify_translations.py: handle JavaScript files 2016-01-13 10:48:17 -05:00
Francis Lachapelle 8e8e19666a Localization 2016-01-13 09:45:03 -05:00
Francis Lachapelle 76b4563b2f verify_translations.py: handle toolbars 2016-01-13 09:41:03 -05:00
Francis Lachapelle 4ce3947e60 Fix localizable strings (templates, JavaScript) 2016-01-13 09:26:21 -05:00
Francis Lachapelle 0a8f52ce7d Update Russian translation 2016-01-13 09:17:20 -05:00
Enrique J. Hernández 9bb2473c8e Merge pull request #233 from zentyal/jgarcia/delete-attach-after-fail
Do not include failure attachments (really long filenames)
2016-01-13 12:08:58 +01:00
Jesús García Sáez 2d5995a8f4 Merge pull request #213 from zentyal/jamor/unittest-merge
Add RTFHandler unittest
2016-01-12 18:35:43 +01:00
Jesús García Sáez cee83df085 Merge pull request #232 from zentyal/ejhernandez/junit-output
Give support to JUnit output format for sogo-tests
2016-01-12 18:29:49 +01:00
Enrique J. Hernández Blasco 0c5f4edb36 Give support to JUnit output format for sogo-tests
To integrate with CI system.

sogo-tests now accepts a flag (-f) to determine the output format:

  * text : Current behaviour and default value
  * junit: XML output suitable for CI system such as Jenkins
2016-01-12 16:14:30 +01:00
Jesús García Sáez 90378b76eb draft: remove attachment on failure
Attachment creation can succeed and attachment mime file could fail

This can happen, e.g., when the filename's length is close to the maximum
allowed but your filesystem and then mime file will exceed that limit
(because it has a prefix).
2016-01-12 16:10:39 +01:00
Enrique J. Hernández 6aeb13ba65 Merge pull request #227 from zentyal/jgarcia/qp-encode-subjects
Fix encoding of subjects of emails with non-ascii characters
2016-01-12 16:04:42 +01:00
Francis Lachapelle 216371fd80 Russian localization
Fixes #3383
2016-01-11 09:47:27 -05:00
Jesús García Sáez 5927d3303c Merge pull request #230 from zentyal/ejhernandez/debug-rc
oc: Print retval on high debug for library interface
2016-01-11 09:33:29 +01:00
Ludovic Marcotte 6a3e64f849 (fix) when deleting an event using EAS, properly invoke the auto-scheduling code 2016-01-08 13:12:00 -05:00
Ludovic Marcotte 490043b2e1 (fix) we now follow 301 redirects when fetching ICS calendars 2016-01-08 12:02:33 -05:00
Ludovic Marcotte 210d6908b8 (fix) Fixed DomainLessLogin logins in multi-domain 2016-01-08 11:39:19 -05:00
Ludovic Marcotte ca7f093155 (fix) properly escape the UID too 2016-01-07 11:12:33 -05:00
Enrique J. Hernández 2ad00f8cef Merge pull request #229 from zentyal/jvalles/missing-appointment-notifications
Add the domain in the `uidInDomain` method
2016-01-07 16:42:03 +01:00
Ludovic Marcotte b5780357cb (fix) updated NEWS file 2016-01-07 10:00:45 -05:00
Ludovic Marcotte 67f38e1127 (fix) don't escape twice (#3423) 2016-01-07 09:58:44 -05:00
Ludovic Marcotte 36985a19e9 (feat) UI for previous commit 2016-01-07 09:17:46 -05:00
Ludovic Marcotte 06cbe527e8 (feat) Now able to sync only default mail folders when using EAS 2016-01-07 09:17:35 -05:00
Francis Lachapelle 51dbfaba15 Improve verification of SOGoLoginDomains array 2016-01-06 09:52:15 -05:00
Francis Lachapelle 3d55396661 Update ChangeLog 2016-01-05 14:33:12 -05:00
Francis Lachapelle 2c97b680a8 Preparation for release 2.3.5 2016-01-05 14:33:01 -05:00
Francis Lachapelle f9cb896f92 Update Russian translation
Fixes #3383
2016-01-05 14:08:05 -05:00
Francis Lachapelle 46edcce1d5 Don't try to translate "SOGo" 2016-01-05 14:01:27 -05:00
Francis Lachapelle 1b14fee96e Localization 2016-01-05 13:56:40 -05:00
Francis Lachapelle 0777e9fe67 Fix Danish localization
Fixes #3422
2016-01-05 13:44:20 -05:00
Enrique J. Hernández Blasco 8b078817e2 oc: Print retval on high debug for library interface
When exiting a library function
2016-01-04 09:38:10 +01:00
Ludovic Marcotte dd56d5e85c Updated NEWS file regarding the merge of PR #180 2015-12-30 09:08:38 -05:00
Ludovic Marcotte e009af6864 Merge branch 'v2' of https://github.com/inverse-inc/sogo into v2 2015-12-30 09:06:13 -05:00
extrafu 673db179b1 Merge pull request #180 from zentyal/master
Fixes from Zentyal since 2015/10/29
2015-12-30 09:06:15 -05:00
Ludovic Marcotte fd0f1499b1 Merge branch 'v2' of https://github.com/inverse-inc/sogo into v2 2015-12-30 08:57:08 -05:00
Jesús García Sáez 20575226b8 Merge pull request #221 from zentyal/jvalles/time-shifts-in-events
oc-calendar: Use the time zone provided by the client
2015-12-30 11:24:39 +01:00
Enrique J. Hernández 8b04a468c2 Merge pull request #223 from inverse-inc/v2
SOGo v2.3.4
2015-12-29 22:41:02 +01:00
Juan Vallés ccd9e385a0 Add the domain in the uidInDomain method
This method is used to get the login and we weren't returning
the domain, which led to problems when creating appointments
on multidomain environments like, for instance, not sending
the invitation mails.
2015-12-29 12:19:07 +01:00
Juan Vallés 376e717f45 oc-calendar: Use the calendar's time zone if it is present
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.
2015-12-23 17:27:10 +01:00
Jesús García Sáez 5b25f85c02 Merge pull request #228 from zentyal/ejhernandez/fix-editor-perm
oc: Set Editor as role is now possible in Outlook
2015-12-23 15:54:56 +01:00
Jesús García Sáez 63b8c3ed5e Merge pull request #226 from zentyal/ejhernandez/return-rc-message-submit
oc-mail: Return error when delivery was not successful
2015-12-23 15:43:54 +01:00
Jesús García Sáez c76c48fb0c Merge pull request #225 from zentyal/ejhernandez/sogo-oc-samba-4.1
oc: Do compile with Samba 4.1
2015-12-23 15:37:03 +01:00
Enrique J. Hernández Blasco 7fe1b5f046 oc: Do compile with Samba 4.1
As requested by @extrafu to maintain sogo packages for a little while
2015-12-23 15:34:17 +01:00
Jesús García Sáez 2a25675b3a Merge pull request #220 from zentyal/ejhernandez/improve-dbmsgreader
oc: Dump property canonical name in dbmsgreader
2015-12-23 15:05:37 +01:00
Enrique J. Hernández Blasco dbfd86db04 oc: Set Editor as role is now possible in Outlook
According to [MS-OXCPERM] Section 2.2.7 in PidTagMemberRights possible
values, once we set the DeleteAny flag, the DeleteOwned flag must be set.
Likewise EditOwned must be set when EditAny is set. In this way,
the rights sent by the MAPI client are equal to the returned by the
server when Editor is set.

In real world practice, makes more strict Outlook 2013 work with editor permissions
the sharing of user's defined calendars, tasks or contacts folders as
the recipients can be editors of that folder.
2015-12-23 00:27:09 +01:00
Francis Lachapelle 135535e00e Update NEWS file 2015-12-22 14:25:00 -05:00
Francis Lachapelle e386404b0a Properly compute the last week number for the year
Fixes #1010
2015-12-22 14:21:37 -05:00
Jesús García Sáez 966d13c5b6 Merge pull request #219 from zentyal/ejhernandez/mult-cn-restriction
Manage multiple Change Number restrictions
2015-12-22 17:14:53 +01:00
Juan Vallés 4ae5feb131 oc-calendar: Extract time zone from TimeZoneDefinition
All-day and recurrent events have a binary property that describes the
time zone they take place in. We were using the user's time zone in
the webmail, but it may not be equal to the one in the client. This
difference eventually leads to time shifts in events.
2015-12-22 16:05:23 +01:00
Jesús García Sáez db213c2b73 unittest: just reformat and indentation
no real changes
2015-12-22 11:48:35 +01:00
Jesús García Sáez c2922e2a26 unittest: QP encode function from NGMimeHeaderFieldGenerator 2015-12-22 11:48:34 +01:00
Jesús García Sáez 1529e7ec4e unittest: compare properly decimal numbers 2015-12-22 11:48:34 +01:00
Juan Vallés 332508e2db oc-calendar: Use signed integer for time zone biases
This change adapts the bias fields in the TimeZoneStruct and TZRule
structures to the changes in openchange that allow this offsets to be
negative (zentyal/openchange bba372faea29d942b9471e6bed90bf425dc4b231)
2015-12-22 11:40:59 +01:00
Juan Vallés d2ea6fef2e oc-calendar: Initialise NSCalendarDate with a SYSTEMTIME struct
The method computes the date of a SYSTEMTIME structure, in which the day
within the month is given by the Nth occurrence of a weekday (see
[MS-OXOCAL] 2.2.1.39).
2015-12-22 11:40:59 +01:00
Jesús García Sáez 75ff4af7cc Use new function from sope to qp-encode the subject 2015-12-21 17:09:11 +01:00
Enrique J. Hernández Blasco 916c04387b oc-mail: Return error when delivery was not successful
For example, if the SMTP is down, then the message is not sent and
an error is returned. We returned back this error code to be managed
by upper layer.
2015-12-18 12:23:49 +01:00
Ludovic Marcotte 7c460b694e Enable new code. 2015-12-16 08:32:20 -05:00
Ludovic Marcotte 29f2d960a7 Enable old code. 2015-12-15 16:15:48 -05:00
Ludovic Marcotte 225fe847a7 Disabled today's code for now. It requires more testing. 2015-12-15 16:12:17 -05:00
Ludovic Marcotte 720b1d5ab5 (fix) carry over delegatedFrom too 2015-12-15 15:21:33 -05:00
Ludovic Marcotte 28bd4ca318 (fix) carry over the delegatedTo, not only the part stat 2015-12-15 15:05:40 -05:00
Francis Lachapelle c6dbcb2f7c Update ChangeLog 2015-12-15 14:24:25 -05:00
Francis Lachapelle 5dfbfe827d Preparation for release 2.3.4 2015-12-15 14:24:12 -05:00
Francis Lachapelle 6ddb40fd2b Update CKEditor to version 4.5.6 2015-12-15 14:20:57 -05:00
Francis Lachapelle 37f29c06ea Localization 2015-12-15 13:18:06 -05:00
Ludovic Marcotte 248892c394 (fix) small fix over previous commit 2015-12-15 11:14:58 -05:00
Ludovic Marcotte b4e4b9c29f (fix) avoid duplicating attendees when accepting event using a different identity over CalDAV 2015-12-15 11:08:59 -05:00
Francis Lachapelle e94b4416f8 Localization cleanup 2015-12-15 10:05:21 -05:00
Francis Lachapelle 8d19ec4aff Remove duplicate key in MainUI localization 2015-12-15 09:55:51 -05:00
Enrique J. Hernández aeeeeea802 Merge pull request #216 from zentyal/jag/fix-i18n-attachment-names
Priorize filename attribute first to get attachment name
2015-12-15 11:44:26 +01:00
Javier Amor García 41e388c5f6 sogo-mail: Priorize filename attribute to get attachment name
Some clients (such apple mail) use only the filename
attribute in the content/disposition header and the
name attribute from the content/type header is filled with
uninternationalized characters.

Example:

Content-Type: application/msword;
x-apple-part-url=C4977556-0D01-4C6C-8A51-451E0AADE431;
name=_______.doc
Content-Disposition: attachment;
filename*=utf-8''%D0%A0%D0%95%D0%9A%D0%92%D0%98%D0%97%D0%98.doc

This changeset gives priority to the filename attribute.
2015-12-15 08:01:21 +01:00
Enrique J. Hernández Blasco db17872dd6 oc: Dump property canonical name in dbmsgreader 2015-12-14 23:39:32 +01:00
Enrique J. Hernández 73e86bb8e5 Merge pull request #217 from zentyal/jgarcia/fix-contacts-listing
Request all contacts when there is no filter
2015-12-14 14:53:33 +01:00
Enrique J. Hernández c3bce410f1 Merge pull request #215 from zentyal/jgarcia/fix-contacts-outlook
Fix contacts on outlook
2015-12-14 11:06:37 +01:00
Ludovic Marcotte 980db7a980 (fix #127) fallback to "work" when export as ldif 2015-12-11 14:51:08 -05:00
Ludovic Marcotte c5c6ff33d8 (fix #119) disable servername and url by default 2015-12-11 14:11:26 -05:00
Ludovic Marcotte 7e1bbe34dc (fix #118) handle /.well-known/carddav 2015-12-11 14:03:50 -05:00
Enrique J. Hernández Blasco a618386d5e oc-db: Store version number instead of CN
To be able to search in this for every kind of operator.

As we cannot do a migration, we have to add a new key to the property
dictionary (@"version_number") which stores the version:

  version = exchange_globcnt(CN >> 16)

Instead of the CN structure which is stored in @"version" key.

This way we can do searches for CN to download only missing data from the
given state of the client for this kind of messages.
2015-12-11 11:38:21 +01:00
Enrique J. Hernández Blasco 5993fe97c3 oc-db: Implement description message to ease debugging
Which dumps the properties NSMutableDictionary
2015-12-11 11:37:02 +01:00
Enrique J. Hernández Blasco 7cdf48335b oc: Support every operator for CN restriction
No limitation is found in SQL queries. So use them all.
2015-12-11 11:35:55 +01:00
Enrique J. Hernández Blasco 3dff73636c oc: Use NSString index for version lookup
It was using NSNumber in versions Dictionary for GCSMessages but it is
stored as the NSString representation (0x390300000000001), so the lookup
has always failed.
2015-12-11 11:33:41 +01:00
Enrique J. Hernández Blasco 2fc21e48d8 oc: Use proper variable name for last modified value 2015-12-11 11:31:15 +01:00
Enrique J. Hernández Blasco 98ed9c3b17 oc-mail: Manage multiple CN restriction
By ignoring <, =< and = operators and simplifying the following
request:

    MODSEQ >= x || MODSEQ >= y || MODSEQ >= z  --> MODSEQ >= min(x, y, z)

This hack will reduce the number of current retrieved UID keys
from the IMAP server. Current status is to retrieve everything when
the multiple CN restriction is sent as the required restriction
is too complex and it is not defined by the IMAP spec.

The proper implementation for:

    CN > x_1 & CN < x_2 | CN > y_1 & CN < y_2 | CN > z_1

It will be something like this:

    set(MODSEQ >= x_1 + 1) - set(MODSEQ >= x_2)
    U
    set(MODSEQ >= y_1 + 1) - set(MODSEQ >= y_2)
    U
    set(MODSEQ >= z_1)

Assuming x_1 <= x_2 <= y_1 <= y_2 <= z_1.
2015-12-11 11:22:26 +01:00
Ludovic Marcotte f9884e3f55 (fix) added new strings from v3 2015-12-10 14:12:33 -05:00
Enrique J. Hernández Blasco 10cabca57e oc: Use ReplicaID from connection info
Instead of hardcoding it to 0x0001.
2015-12-10 16:36:22 +01:00
Jesús García Sáez 2e1ed274c8 unittest: fix TestNGMailAddressParser
It had wrong expectation strings
2015-12-09 20:02:57 +01:00
Jesús García Sáez e4cd451be8 unittest: removed TestNGMimeAddressHeaderFieldGenerator
Needs redo
2015-12-09 20:02:56 +01:00
Javier Amor García 603da75818 Added test for spanish characters 2015-12-09 20:02:56 +01:00
Javier Amor García 9ed3812795 Added test for character escape 2015-12-09 20:02:55 +01:00
Javier Amor García a0b15d0c8c Test for [RTFHandler parseFontTable]
This changeset includes changes in relevant classes to make
them easier to test.
2015-12-09 20:02:55 +01:00
Javier Amor García 7e4571874e Added test for RTF with russian characters
Changed and refactored TestRTFHandler helper methods
2015-12-09 20:02:54 +01:00
Javier Amor García b076801e1b Added test fixture for RTF crash 6977 2015-12-09 20:02:54 +01:00
Jesús García Sáez 0316e441fc unittest: RTF without color table definition 2015-12-09 20:02:53 +01:00
Jesús García Sáez 75208428dd unittest: New unittest with a rtf file
This currently sigfault due to bad parsing a \*\shppict tag
with a \binXXXX tag inside it
2015-12-09 20:02:53 +01:00
Jesús García Sáez 942f48c9a0 unittest: RTF with \pict 2015-12-09 20:02:52 +01:00
Jesús García Sáez 24a7515bb5 unittest: file as NSData and try different encodings 2015-12-09 20:02:51 +01:00
Jesús García Sáez a8e5a3c025 unittest: NSString objectFromJSONString for single values 2015-12-09 20:02:51 +01:00
Jesús García Sáez 0b69727a49 unittest: add rtf test 2015-12-09 20:02:50 +01:00
Jesús García Sáez 2a2d141629 unittest: rtf, test crash core dump 2015-12-09 20:02:48 +01:00
Jesús García Sáez b98d112738 unittest: commented failing test 2015-12-09 20:02:28 +01:00
Jesús García Sáez 1c8b693656 Request all contacts when there is no filter 2015-12-09 13:07:30 +01:00
Francis Lachapelle 15ab0f851d Localization 2015-12-08 10:05:19 -05:00
Ludovic Marcotte 1f98d7cced (fix) fixed broken translations 2015-12-03 15:40:38 -05:00
Ludovic Marcotte 2755a83e65 (fix) remove trailing semicolon everywhere 2015-12-03 15:02:01 -05:00
Francis Lachapelle 9936477f07 Update translations 2015-12-03 13:09:24 -05:00
Enrique J. Hernández 2e1bfb25d5 Merge pull request #210 from zentyal/cperez/ldapsource-refactor
Unify user sources API
2015-12-03 17:15:20 +01:00
Jesús García Sáez 25dbce42cd Reorganize methods according to MS-OXOCNTC
Nothing has been change but this way is much more readable
2015-12-03 16:58:58 +01:00
Jesús García Sáez a9fe80c367 oc-contacts: don't return empty values
If the property has an empty string, return not found
2015-12-03 16:58:58 +01:00
Jesús García Sáez bc5aa3cacb Whitespaces and indentation
No real changes
2015-12-03 16:58:58 +01:00
Jesús García Sáez 0ddbd79fad Remove commented code
These methods don't make any sense here
2015-12-03 16:58:57 +01:00
Jesús García Sáez 2a3367a13b oc-contacts: returning properly personal contacts
We needed to return AddressBookProviderEmailList,
AddressBookProviderArrayType and Email1OriginalEntryId to
make it compatible with the standard.

Besides a refactorization to return better EmailNFoobar properties
2015-12-03 16:58:57 +01:00
Carlos Pérez-Aradros Herce 4b7cbba0c8 Merge pull request #214 from zentyal/ejhernandez/no-crash-after-reconnect
oc-mail: Do not crash after reconnect sending mails
2015-12-03 14:27:07 +01:00
Enrique J. Hernández Blasco 2deda01e5c oc-mail: Do not crash after reconnect sending mails
After the providing the workaround on rebuilding the LDAP connection,
the sam_ctx variable can be freed and it was used as memory context
to store the AddressBookEntryId or OneOffEntryId when resolving
recipients. After this changeset, a local memory context which I
think is more sane.
2015-12-02 16:06:31 +01:00
Ludovic Marcotte 8c0ef9cf50 (fix) proper fix for #3389 2015-12-01 11:42:02 -05:00
Ludovic Marcotte 8456d49686 Revert "(fix) fixed addressbrook-only source entires having a c_uid set"
This reverts commit ef7de7c10d.
2015-12-01 11:39:07 -05:00
Ludovic Marcotte 5a3cafbbb0 (fix) prevent characters in calendar component UID causing issues during import process 2015-12-01 09:26:52 -05:00
Ludovic Marcotte dc085789e7 (feat) Initial support for EAS calendar exceptions 2015-11-30 09:19:01 -05:00
Enrique J. Hernández f6973d8aa4 Merge pull request #209 from zentyal/jag/rtf-parser-fix-unicode
RTFHandler fixes with focus in unicode and characters set
2015-11-30 12:20:04 +01:00
Javier Amor García 94d4da6e1e Reimplemented [RTFHandler parse] to have an unambiguous decoding of control words
[RTFHandler parseFontTable] reimplemented on the same line.
2015-11-27 17:49:01 +01:00
Javier Amor García 2f63542e07 Fixed problem with ascii chars that had different unicode value
Also cleaned a bit the parse loop
2015-11-27 17:49:01 +01:00
Javier Amor García 3155bd0172 Fixed bug which created unnecesary font tags 2015-11-27 17:34:08 +01:00
Javier Amor García 2518b37e32 Fixed RTF support for unicode characters greater than 32767 2015-11-27 17:34:08 +01:00
Javier Amor García 8e3e4a5445 Added RTF escapes parsing 2015-11-27 17:34:07 +01:00
Javier Amor García 01dcf3d6c8 Fixed activation of characters sets in [RTFHandler parse] 2015-11-27 17:34:07 +01:00
Javier Amor García fa4d3a0e20 Reimplementation of [RTFHandler parseFontTable] 2015-11-27 17:34:06 +01:00
Francis Lachapelle bbdb27e75e (css) Enlarge max width of toolbar buttons 2015-11-27 08:36:34 -05:00
Ludovic Marcotte 1279629e86 (fix) correctly handle all-day event exceptions when the master event changes 2015-11-25 15:53:08 -05:00
Ludovic Marcotte f7d748ea98 (fix) EAS fix on qp-encoded subjects (#3390) 2015-11-25 15:08:24 -05:00
Ludovic Marcotte 2d1a4b320c (fix) adjust doc and packaging regarding oc cleanup script 2015-11-25 10:56:39 -05:00
Jesús García Sáez e8e610c7b3 Merge pull request #212 from zentyal/safe-ldb-search
Adapt to new safe_ldb_search function
2015-11-25 12:12:28 +01:00
Ludovic Marcotte 8df311547f (fix) EAS fix for wrong charset being used (#3392) 2015-11-23 18:07:50 -05:00
Francis Lachapelle f42d6f5f4a Enlarge size of event/task editor window
Fixes #3381
2015-11-23 13:29:02 -05:00
Ludovic Marcotte 01642eca3e (fix) fixed one unit test 2015-11-23 13:20:55 -05:00
Carlos Pérez-Aradros Herce 9554e92c8b Adapt to new safe_ldb_search function 2015-11-23 17:01:35 +01:00
Francis Lachapelle 2ae8c6f8b2 Add missing tooltips on buttons of toolbars 2015-11-23 10:33:03 -05:00
Enrique J. Hernández f64b324133 Merge pull request #203 from inverse-inc/v2
Merge from upstream
2015-11-23 12:51:52 +01:00
Ludovic Marcotte 31deae11b4 (fix) domain in doc 2015-11-20 11:21:38 -05:00
extrafu 19676593ea (fix) allow getting password from context for OC 2015-11-19 17:57:04 -05:00
Francis Lachapelle 4a27beabdd (css) Limit toolbar buttons min/max width 2015-11-19 09:46:07 -05:00
Francis Lachapelle 8dae5faaa1 Localization 2015-11-19 09:41:36 -05:00
Francis Lachapelle 85ce41dc68 (fix) JS exception when printing calendars
Fixes #3203
2015-11-19 09:23:46 -05:00
Enrique J. Hernández 0622980f38 Merge pull request #205 from zentyal/jag/dont-sync-contact-group-from-sogo
Do not save IPM.DistList messages
2015-11-19 10:39:59 +01:00
Javier Amor García a73df96b78 [MAPIStoreGCSMessage getPidTagChangeKey:inMemCtx:] return on error
This method aborted when no PidTagChangeKey was found and the new flag was not
set. Now it returns MAPISTORE_ERR_NOT_FOUND.
2015-11-18 18:25:24 +01:00
Francis Lachapelle 7015713741 Update ChangeLog 2015-11-18 09:43:02 -05:00
Francis Lachapelle 7644d6fb4d Preparation for release 2.3.3a 2015-11-18 09:42:05 -05:00
Enrique J. Hernández 9dcf459827 Merge pull request #207 from zentyal/jag/idl-compile-warnings
sogo-openchange: Avoid compile warnings after changes in exchange.idl
2015-11-18 14:47:36 +01:00
Enrique J. Hernández 4c7bd6dd76 Merge pull request #208 from zentyal/jgarcia/wocontext-fun
User context activation when cached
2015-11-18 06:56:16 +01:00
Carlos Pérez-Aradros Herce ec598321c4 Add user defined user source 2015-11-16 17:43:52 +01:00
Francis Lachapelle 4b8a9bcc3b Always show user's name in top banner 2015-11-16 09:02:37 -05:00
Francis Lachapelle a9984d9487 Fix regression when saving mail folders state 2015-11-16 09:01:05 -05:00
Javier Amor García 88a74bcb5c Do not save IPM.DistList messages 2015-11-16 13:56:31 +01:00
Francis Lachapelle 2a90102a81 Update translations 2015-11-11 15:51:33 -05:00
Francis Lachapelle fbc73dc3bc Update ChangeLog 2015-11-11 14:06:11 -05:00
Francis Lachapelle 1d78b2df96 Preparation for release 2.3.3 2015-11-11 14:04:19 -05:00
Francis Lachapelle 6aef713d28 Update prototype.js to v1.7.3 2015-11-11 14:02:25 -05:00
Francis Lachapelle 71db3945cb Update CKEditor to version 4.5.4 2015-11-11 14:01:30 -05:00
Francis Lachapelle da230410be Handle ExpandedFolders settings like in v3
This implies a transition where ExpandedFolders can be either a string
or an array.
2015-11-11 13:31:58 -05:00
Francis Lachapelle 82114f75aa Fix Macedonian et Portuguese translations 2015-11-11 12:58:26 -05:00
Francis Lachapelle f8d31a6413 Update NEWS file 2015-11-11 12:04:19 -05:00
Francis Lachapelle 707aabde15 Update Slovenian translation 2015-11-11 12:04:04 -05:00
Francis Lachapelle ceec497aec Fix Portuguese translation 2015-11-11 11:50:32 -05:00
Francis Lachapelle 46f93d8629 Fix Macedonian translation 2015-11-11 11:50:06 -05:00
Francis Lachapelle f2347e13d7 Fix localizable strings in contact editor 2015-11-11 11:49:36 -05:00
Francis Lachapelle 106f8ec314 Improve Portuguese translation 2015-11-11 09:46:21 -05:00
Francis Lachapelle f58554a700 Add Macedonian translation 2015-11-11 09:46:01 -05:00
Francis Lachapelle 76b8de1805 Add Portuguese translation 2015-11-10 16:33:11 -05:00
Enrique J. Hernández 0751c51b89 Merge pull request #204 from zentyal/jvalles/event-invitation-subjects
oc-calendar: Make invitation/update mails have the event name as subject
2015-11-09 23:35:22 +01:00
Ludovic Marcotte 64456c10e5 (fix) additional fix for #3356 2015-11-09 14:30:58 -05:00
Jesús García Sáez 5f5b5d9273 oc: activate user context on initialization (for real)
Even with cached ones (completes cfab18e1b8)
2015-11-09 19:56:05 +01:00
Jesús García Sáez 194c415631 Log an error for SOGoObject without wocontext 2015-11-09 19:55:55 +01:00
Javier Amor García 08f05ac2ef sogo-openchange: Avoid compile warnings after changes in exchange.idl
The changes in the exchange.idl file from OpenChange has changed
some string pointers from 'const char *' to 'uint8_t *'.
This changeset cast them to avoid compilation warnings.
2015-11-09 19:08:51 +01:00
Jesús García Sáez af413f2b32 Merge pull request #202 from zentyal/ejhernandez/workaround-sync-configure-crash
Workaround sync configure crashes
2015-11-09 11:34:29 +01:00
Enrique J. Hernández Blasco 77bba8e5ea Use application context when initialising quick tables ACLs
As the stored context from initialisation may have changed
by `setContext` by other operations when acting as a OpenChange
library. This would make having a login set to nil and forcing
a NSException when it attempts to set a nil key at
[SOGoAppointmentFolder:roleForComponentsWithAccessClass:forUser]
inside [SOGoAppointmentFolder:initializeQuickTablesAclsInContext].
2015-11-09 11:30:03 +01:00
Juan Vallés 946665ff49 oc-calendar: Make invitation/update mails have the event name as subject
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.
2015-11-09 10:28:46 +01:00
Ludovic Marcotte ef7de7c10d (fix) fixed addressbrook-only source entires having a c_uid set 2015-11-06 13:33:36 -05:00
Francis Lachapelle 106c6a24ae (js) Fix dialogs when partially visible
Fixes #2646, #3378
2015-11-06 09:42:09 -05:00
Ludovic Marcotte 863f182e84 (fix) fixed wrong comparison of meta vs. META tag in HTML mails 2015-11-06 09:25:49 -05:00
Francis Lachapelle ba37353e42 (fix) Position of popup menu
Fixes #3381
2015-11-06 09:15:23 -05:00
Francis Lachapelle 1915748e33 Bump version to 2.3.3 2015-11-06 09:15:23 -05:00
Ludovic Marcotte b170ae866f (fix) small fixes 2015-11-06 09:01:33 -05:00
Francis Lachapelle 7c69e37449 (fix) JavaScript syntax error in attendees editor 2015-11-06 08:45:42 -05:00
Ludovic Marcotte 7f26d47cd1 We drop Lucid. 2015-11-05 15:39:08 -05:00
Ludovic Marcotte b55ec52bfe (fix) handle emails having an attachment as their content 2015-11-05 15:21:13 -05:00
Ludovic Marcotte f919df050a (fix) one more fix for #3118 2015-11-05 14:58:58 -05:00
Ludovic Marcotte c2e4f7441d (fix) double declaration of same method 2015-11-05 13:57:51 -05:00
Ludovic Marcotte ca27464984 (fix) added type cast 2015-11-05 13:43:48 -05:00
extrafu 6cbc5573a1 Merge pull request #121 from ethoms/clang-warnings-stage1v2
Stage1b (v2 branch) of clang compiler warning patches.
2015-11-05 13:41:50 -05:00
Euan Thoms e4fae417b9 Stage 8 of clang compiler warning patches.
Update WORequest+SOGo.m
2015-11-05 13:30:40 -05:00
Carlos Pérez-Aradros Herce a6bbe13f9b Add missing header files 2015-11-05 19:11:19 +01:00
Jesús García Sáez 8cfb0f0d44 Avoid inserting second email for Contacts
When we have a contact with an email, avoid generating another one
with SOGoMailDomain value (normally we ended up with a contact with
two identical emails on 'emails' key and for multidomain source we
would had ended up with an email @localhost)
2015-11-05 19:11:19 +01:00
Jesús García Sáez 08f57f6ad5 SOGoUserManager: get domain after authentication
For multidomain source which has no domain defined, we get
the domain from the username which must have @domain as suffix
2015-11-05 19:11:19 +01:00
Jesús García Sáez 30a94161af SOGoUserManager.m: format and small refactor
Removed all tabs used for indentation
2015-11-05 19:11:19 +01:00
Jesús García Sáez ec533809aa return enableDomainBasedUID based only on the key 2015-11-05 19:11:19 +01:00
Jesús García Sáez 0d05e3579c defaultsForDomain return sharedSystemDefaults for unknown domains 2015-11-05 19:11:19 +01:00
Jesús García Sáez bf4a581d0f Added isDomainDefined
To check whether a domain is supported by our defined sources
2015-11-05 19:11:19 +01:00
Jesús García Sáez 9d3f3c619d LDAPSource: release displayName on dealloc 2015-11-05 19:11:19 +01:00
Jesús García Sáez 7d49674d9d Add domain to lookupContactEntry 2015-11-05 19:11:19 +01:00
Jesús García Sáez 48832a4878 Add domain to lookupGroupEntryByUID/ByEmail 2015-11-05 19:11:19 +01:00
Euan Thoms eda84c7b5d Stage1b (v2 branch) of clang compiler warning patches. 2015-11-06 01:29:26 +08:00
Ludovic Marcotte 9d31023724 (fix) additional fix for #3118 2015-11-05 11:11:18 -05:00
Ludovic Marcotte 41e80bb105 Updated NEWS file regarding PR#120 2015-11-05 09:48:17 -05:00
extrafu e428e74e6c Merge pull request #120 from zentyal/master
Fixes for OpenChange integration from Zentyal
2015-11-05 09:45:51 -05:00
Ludovic Marcotte 7a5e550510 (fix) manually added patch from PR#113 to avoid many "broken" commits 2015-11-05 09:36:11 -05:00
Euan Thoms 0605fdf02a Delete .orig files left over from applying patches to Stage 2. 2015-11-04 13:50:16 -05:00
Euan Thoms d3290dbb8d Stage 2 of clang compiler warning patches. 2015-11-04 13:50:05 -05:00
Ludovic Marcotte 34f626b84c (fix) small fixes around web calendars + sync 2015-11-04 09:21:42 -05:00
Euan Thoms e173c6d621 Stage 9 of clang compiler warning patches. 2015-11-04 08:42:03 -05:00
Euan Thoms 1425bb1c75 Stage 5 of clang compiler warning patches. 2015-11-04 08:41:49 -05:00
Euan Thoms 5b65eaa572 Stage 4 of clang compiler warning patches. 2015-11-04 08:41:36 -05:00
Euan Thoms 892bd693d7 Stage 3 of clang compiler warning patches.
Conflicts:

	UI/PreferencesUI/UIxJSONPreferences.m
2015-11-04 08:41:19 -05:00
Francis Lachapelle 6812cb08dc Display missing events when printing working hours 2015-11-03 09:00:19 -05:00
Francis Lachapelle b62167dd00 Fix Brazilian (Portuguese) translation
Fixes #3355
2015-11-03 08:27:50 -05:00
Enrique J. Hernández Blasco e0d49d2407 oc-mail: Check the number of uids fetched on synchroniseCache
Equals to the number of uids requested.

There are corner-cases when this is not happening, we don't know yet
why this is happening but IMAP server log should do the trick.

This avoids to launch a NSException trying to access an element
outside the array bounds.
2015-10-29 23:04:42 +01:00
Jesús García Sáez c8d05d41a5 Merge pull request #201 from zentyal/ejhernandez/sync-expunged-msgs-first-sync
oc-mail: Sync expunged messages on first cache sync
2015-10-26 19:37:01 +01:00
Ludovic Marcotte 1013c473cd (feat) support for ghosted elements on contacts over EAS 2015-10-26 10:25:11 -04:00
Ludovic Marcotte b8d77259cd (feat) we now save the supported elements in EAS collections 2015-10-26 10:15:35 -04:00
Ludovic Marcotte 40cb81fd0b (fix) prevent postal address showing on single line over EAS (#2614) 2015-10-26 10:08:00 -04:00
Jesús García Sáez 2937ba7f30 Merge pull request #200 from zentyal/ejhernandez/always-increase-cn-set-message-read-flag
oc-mail: Always increase the CN when setting the message read flag
2015-10-26 14:38:29 +01:00
Jesús García Sáez 3c6fb10d9f Merge pull request #199 from zentyal/jvalles/missing-calendar-metadata
oc-calendar: force cache synchronisation for a message before aborting
2015-10-26 14:30:38 +01:00
Ludovic Marcotte b378d258cb (fix) add unit test from PR #105 2015-10-23 15:54:33 -04:00
Ludovic Marcotte 3ba1e33eb6 (fix) perms fixes on scripts 2015-10-23 15:39:49 -04:00
Ludovic Marcotte 40a1d5fdbf (fix) inline images sent from SOGo webmail are not displayed in Mozilla Thunderbird (#3271) 2015-10-23 14:34:19 -04:00
Ludovic Marcotte 1b44218a35 (fix) avoid crash when replying to a mail with no recipients (#3359) 2015-10-23 12:44:43 -04:00
Ludovic Marcotte df211af604 (fix) fixed br_pt translation + updated transifex (#3355) 2015-10-23 11:32:04 -04:00
Ludovic Marcotte 2c723070c6 (fix) we now return all cards when we receive an empty addressbook-query REPORT 2015-10-21 10:54:15 -04:00
Enrique J. Hernández Blasco 6f5bb3882c oc-mail: Sync expunged messages on first cache sync
There is a use case where this has caused crashes:

A message was hard-deleted using an IMAP client, this is the first
message you deleted in that folder and you have cleared offline
items in the client so a full sync is asked by upper layer.

In that situation, the SyncLastDeleteChangeNumber version property
is not set and return 0 in [getDeletedKeysFromChangeNumber:andCN:inTableType]
making OpenChange to crash while it is asking for deleted fmids
since a given change number.

This is a regression from 18d7070c4a.
2015-10-21 11:24:14 +02:00
Ludovic Marcotte fc9b175f25 (feat) now possible to choose which folders to sync over EAS 2015-10-20 15:33:18 -04:00
Ludovic Marcotte 1716e46210 (fix) last fixes for cache coherency 2015-10-20 08:48:39 -04:00
Juan Vallés 8800cdf641 oc-calendar: force cache synchronisation for a message before aborting
Sometimes we're trying to get the `objectVersion` of a calendar message,
but this message's entry is not in the cache. The method
`synchroniseCache` won't work in this case, so we try to force the
synchronisation of that particular message in order to get the change
number before aborting.
2015-10-20 11:33:10 +02:00
Enrique J. Hernández Blasco d998786ea6 oc-mail: Always increase the CN when setting the message read flag
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.
2015-10-20 09:56:11 +02:00
Jesús García Sáez a50758cc06 Merge pull request #197 from zentyal/jvalles/revert-content-as-blob-master
Revert "Store c_content in sogo_cache_folder as a BLOB"
2015-10-16 12:43:14 +02:00
Juan Vallés 498cec767b Revert "Store c_content in sogo_cache_folder as a BLOB"
This reverts commit b329513845. It was
causing issues and we'll need to do more testing on this optimisation.
2015-10-16 12:08:50 +02:00
Ludovic Marcotte 8cb580633d (fix) oh well, old crappy distros 2015-10-15 15:54:25 -04:00
Ludovic Marcotte 2b1e060881 (feat) initial S/MIME support for EAS (#3327) 2015-10-15 15:31:46 -04:00
Ludovic Marcotte 3702e79a00 (fix) don't escape quoted strings during versit generation 2015-10-15 12:51:30 -04:00
Ludovic Marcotte beb484da10 (fix) make sure English is always used when generating Date headers using EAS (#3356) 2015-10-14 09:57:56 -04:00
Ludovic Marcotte a54cc22da8 (fix) we no longer always rewrite emails for Outlook when using EAS 2015-10-14 09:29:52 -04:00
Ludovic Marcotte 7f92aca0bd (fix) handle references correctly over EAS (#3365) 2015-10-14 09:27:34 -04:00
Ludovic Marcotte 8d85ca13df (fix) numerous EAS fixes when connections are dropped before the EAS client receives the response (#3058, #2849) 2015-10-14 09:21:32 -04:00
Carlos Pérez-Aradros Herce fb7e044bd3 Merge pull request #194 from zentyal/ejhernandez/skip-recurrence-id-without-dtstart
Ignore recurrence-id vevents without dtstart and outside date range
2015-10-07 17:49:56 +02:00
Enrique J. Hernández c08abdb32f Merge pull request #195 from zentyal/jbahillo/view-all-spanish
Changed Spanish string for view all (events/tasks)
2015-10-02 16:25:30 +02:00
Xavy Bahillo c55eab6404 Changed Spanish string for view all (events/tasks)
As current string was referring only to events
2015-10-01 18:16:59 +02:00
Enrique J. Hernández 7680c4091e Merge pull request #191 from zentyal/jvalles/cache-blob
Store c_content in sogo_cache_folder as a BLOB
2015-09-30 16:44:18 +02:00
Enrique J. Hernández 5911563b0f Merge pull request #178 from inverse-inc/v2
Merge from upstream 2.3.2
2015-09-30 14:26:38 +02:00
Enrique J. Hernández Blasco eebf878e89 Ignore recurrence-id vevents without dtstart and outside date range
Happened in an imported vevent from Mozilla Thunderbird.

The crash was:

  Sep 14 15:49:38 sogod [21063]: <0x6442DBF8[SOGoAppointmentFolder]:personal> missing 'c_startdate' in record?
  Sep 14 15:49:38 sogod [21063]: <0x6442DBF8[SOGoAppointmentFolder]:personal> missing 'c_enddate' in record?
  2015-09-14 15:49:38.927 sogod[21063] NGCalendarDateRange.m:37  Assertion failed in NGCalendarDateRange(instance), method initWithStartDate:endDate:.  startDate MUST NOT be nil!
  EXCEPTION: <NSException: 0x7fb96b3c0ed8> NAME:NSInternalInconsistencyException REASON:NGCalendarDateRange.m:37  Assertion failed in NGCalendarDateRange(instance), method initWithStartDate:endDate:.  startDate MUST NOT be nil! INFO:(null)

The relevant ICS file lines are the following ones:

  BEGIN:VEVENT
  UID:040000008200E00074C5B7101A82E00800000000901646A7234BCE01000000000000000010000000E9152C8FF1C27D488C91967FAAFCC2B0
  RECURRENCE-ID:20140513T100000Z
  DURATION:PT1H
  CLASS:PUBLIC
  ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CN=krsny >>
      Ann Thierry K:mailto:krsny@example.com
  END:VEVENT
2015-09-30 11:35:12 +02:00
Enrique J. Hernández a8e02b94d4 Merge pull request #193 from zentyal/jag/attach-has-content-id
oc-mail: Fixed false positive in [MAPIStoreAttachment hasContentId]
2015-09-29 19:24:41 +02:00
Jesús García Sáez 6ada034c33 Merge pull request #190 from zentyal/jgarcia/freebusy-multidomain
Fix freebusy for multidomain environments
2015-09-29 13:57:22 +02:00
Javier Amor García c01b21e402 oc-mail: Fixed false positive in [MAPIStoreAttachment hasContentId]
This method does not longer returns true if the content id
was a empty string.
In some case the old false positive triggered the removal of
attachments when sending messages.
2015-09-28 13:06:30 +02:00
Ludovic Marcotte c8c7aaa459 (feat) GUI code to set or now sync flag on address book.
Also thrashed entirely the sync tag concept. Funambol is dead, thank god for that.
2015-09-25 15:21:06 -04:00
Ludovic Marcotte 5409cb2927 (feat) moved FolderSynchronize code to GCS 2015-09-25 15:18:22 -04:00
Juan Vallés b329513845 Store c_content in sogo_cache_folder as a BLOB
This reduces considerably the query time for that column, which can be
rather large.
2015-09-25 12:14:32 +02:00
Jesús García Sáez 0ca6e7c6d3 Fix freebusy for multidomain environments
When returning contacts we have to supply also the domain field.
Because in a multidomain environment UIDField is unique only in
the domain so an user must be identified as uid@domain.

So when creating http requests from client side, we have to use
uid@domain instead of only uid so the SOGoUser created on server
side when parsing the requests is created properly.
2015-09-24 19:00:48 +02:00
Jesús García Sáez bea2415fad Merge pull request #184 from zentyal/jvalles/double-digit-folders
Make folderKey encoding consistent
2015-09-23 18:30:18 +02:00
Jesús García Sáez 180269e39e Merge pull request #185 from zentyal/ejhernandez/return-fai-props-on-available
Avoid crashing Outlook after setting a custom view in a calendar folder
2015-09-22 16:04:42 +02:00
Francis Lachapelle 8a3adeadd2 Rename Slovenian template
Closes #104
2015-09-21 20:37:50 -04:00
Enrique J. Hernández fc8eedf494 Merge pull request #186 from zentyal/ejhernandez/cherry-pick-42f10e1
(fix) safe-guard against not-yet-created calendar of local users
2015-09-18 21:57:25 +02:00
Ludovic Marcotte c8acba8f5a (fix) safe-guard against not-yet-created calendar of local users 2015-09-18 21:56:43 +02:00
Enrique J. Hernández Blasco deca6e383a oc: Include 0x683d0040 as another unknown FAI message property
And returning right type.

We have sorted the FAI properties by number and set the available
name as a comment to ease the tracking afterwards.
2015-09-18 21:45:00 +02:00
Enrique J. Hernández Blasco f3ac7b8334 oc: Return FAI available properties on instance method as well
The operation RopFastTransferSourceCopyTo calls the available
properties for a message using the instance method. It seems the
preferred method by Outlook to synchronise a FAI message. OpenChange
calls the message to get the available properties, so the instance
method is called. As it is specialised to return the custom hack
FAI properties, we have to call that class method instead of using
generic one available at NSObject (MAPIStoreProperties) class.

This avoids crashing the Outlook client after we synchronise the
calendar folder after changing the timeframe view (eg from day view
to month view).
2015-09-18 21:40:01 +02:00
Francis Lachapelle ad8941ba56 Fix URL escaping unti test 2015-09-18 13:48:36 -04:00
Ludovic Marcotte 2bccfcb725 (fix) additional fix for issue #3152 2015-09-17 16:28:42 -04:00
Ludovic Marcotte 4d174b4c6c (fix) typo in previous commit 2015-09-17 16:02:21 -04:00
Ludovic Marcotte 3b15a79c0a (fix) memory leak when sync'ing GCS collections 2015-09-17 15:58:38 -04:00
Ludovic Marcotte b4c2857bb5 (fix) typo in version number for doc 2015-09-16 15:18:10 -04:00
Ludovic Marcotte 6f2eae5d67 Bump version to 2.3.2 2015-09-16 14:37:56 -04:00
Ludovic Marcotte 9a7ea26b80 Update ChangeLog 2015-09-16 13:45:28 -04:00
Ludovic Marcotte 38c9a229c0 Update for the release 2015-09-16 13:44:59 -04:00
Francis Lachapelle e75ec09445 Update NEWS file 2015-09-16 13:31:48 -04:00
Francis Lachapelle 58d03eedc3 Update CKEditor to version 4.5.3 2015-09-16 13:29:37 -04:00
Francis Lachapelle 98ad8f1c0b Update NEWS file 2015-09-16 11:52:46 -04:00
Francis Lachapelle 37b817cd68 Fix options availability in Contacts module cont'd 2015-09-16 11:43:22 -04:00
Francis Lachapelle 9fd8f3edef Add verbose output to "sogo-tool remove" command 2015-09-16 11:39:05 -04:00
Ludovic Marcotte ce11aca2bd (fix) update the doc regarding the temporarily dropping rhel/old debian/ubuntu support 2015-09-16 09:44:29 -04:00
Francis Lachapelle 861057f22f Fix options availability in Contacts module
A user can edit/delete a card from a system addressbook if included in
the "modifiers". Enable the delete/move options of the contextual menu
in this case.
Fixes #3342
2015-09-16 09:38:52 -04:00
Francis Lachapelle b910501afa Fix localization of calendar categories
Fixes #3295
2015-09-15 15:59:31 -04:00
Juan Vallés ba68bd8935 Make folderKey encoding consistent
The folder names are encoded through the `asCSSIdentifier` and
`stringByEncodingImap4FolderName` functions when we store them as folder
keys. In addition, the prefix "folder" is added to the key.

The order in which these operations were done when storing the folder
keys (and reverted when retrieving them) wasn't consistent trough the
code. This led to problems such as creating twice a folder with a digit
at the beginning of its name.

The folder name goes now through the following operations when being
stored as a key (the retrieval reverts these in the reverse order):

 * `stringByEncodingImap4FolderName`
 * `asCSSIdentifier`
 * Add "folder" prefix
2015-09-15 09:57:30 +02:00
extrafu 063f878199 Merge pull request #103 from zentyal/master
Fixes for OpenChange integration
2015-09-14 12:55:03 -04:00
Ludovic Marcotte 6bccd2eea0 (fix) improve spec file regarding disabling OC build 2015-09-14 11:06:54 -04:00
Ludovic Marcotte 652ae763d4 (fix) Start/end shifting by 1 hour due to timezone change on last Sunday of October 2015 (#3344) 2015-09-14 10:55:50 -04:00
Juan Vallés 734aba5ddb oc: Fix asCSSIdentifier in openchange_user_cleanup
The method lacked the check for the initial character, which adds an
underscore at the beginning of the strings that start with a digit.
2015-09-14 15:53:07 +02:00
Jesús García Sáez 3da6c90bbe Merge pull request #182 from zentyal/ejhernandez/save-tasks
oc-task: Save tasks from Outlook
2015-09-14 12:24:01 +02:00
Enrique J. Hernández 21a6480834 Merge pull request #181 from zentyal/jvalles/underscore-folders
Improve first character check in CSS identifiers
2015-09-14 11:38:26 +02:00
Ludovic Marcotte 42f10e1929 (fix) safe-guard against not-yet-created calendar of local users 2015-09-10 20:07:42 -04:00
Ludovic Marcotte 03b706e1d8 (fix) disable oc builds on el6 for now 2015-09-10 19:44:45 -04:00
Ludovic Marcotte 2be556299e (fix) slight modification for fix #3293 2015-09-10 19:10:50 -04:00
Enrique J. Hernández Blasco b075a306c6 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-10 17:26:41 +02:00
Juan Vallés 36d8fa12d3 Improve first character check in CSS identifiers
A CSS identifier can't start with a digit, so when a folder name does,
a '_' character is appended at the beginning of its CSS identifier.

The check for this first character used the `isdigit()` function, which
takes a `char` argument, while `[self objectAtIndex: 0]` returns a
`unichar`, i.e. a 16-bit unsigned integer. This caused some non-digit
characters to pass this check (e.g. Chinese characters), ending up with
an underscore at the beginning of the folder name.
2015-09-10 10:24:50 +02:00
Ludovic Marcotte 07092828fe (fix) improved EAS speed during initial syncing of large mailboxes (#3293) 2015-09-09 10:20:31 -04:00
Ludovic Marcotte 7c0ba7b72b (fix) avoid too-many LIST commands over EAS (#3294) 2015-09-09 10:12:32 -04:00
Ludovic Marcotte 750a629df8 Updated NEWS file regarding PR#102 2015-09-09 08:24:59 -04:00
extrafu 33a1d2c397 Merge pull request #102 from zentyal/master
Changes for sogo-openchange from Zentyal
2015-09-09 08:19:14 -04:00
Enrique J. Hernández 2e75972df6 Merge pull request #177 from zentyal/jag/remove-compile-warnings
Fix some compilation warnings
2015-09-09 10:15:40 +02:00
Javier Amor García 1fdb44b0a7 Fix some compilation warnings
The warnings were introduced in the fix for attachment with used
the filename extended parameter.

Also removed trailing whitespaces.
2015-09-08 15:39:59 +02:00
Jesús García Sáez 3868ce0fb1 Merge pull request #169 from zentyal/ejhernandez/increase-cn-setting-seen-flag
oc-mail: Increase Change Number after modifying seen flag
2015-09-07 18:46:18 +02:00
Jesús García Sáez fc82eb79f6 Merge pull request #175 from zentyal/ejhernandez/versions-msg-reload-if-needed
oc: load versionsMessage on setting up
2015-09-07 16:48:55 +02:00
Jesús García Sáez 9425868365 Merge pull request #176 from zentyal/ejhernandez/set-read-flag-db
Implement setReadFlag for MAPIStoreDBMessage
2015-09-07 16:35:30 +02:00
Enrique J. Hernández Blasco 6280e4ded6 oc: Implement setReadFlag for MAPIStoreDBMessage
This is an utility for testing as I don't see any added value
for real scenario but according to [MS-OXCMSG] all messages
can have PidTagMessageFlags.
2015-09-04 16:16:00 +02:00
Enrique J. Hernández Blasco f19074334c oc: Use enum mapistore_error as returned value for setReadFlag 2015-09-04 16:15:05 +02:00
Enrique J. Hernández Blasco b702e40ebb oc: load versionsMessage on setting up
versionsMessage object could have outdated version in a root folder
in the following case:

* Download latest contents using FXBuffer
  * versionsMessage is updated by synchroniseCache
* OpenMessage from last FXBuffer
  * Setup versions message as root folder
* Get Predecessor Change List from that message

We could just reload if needed the versions message if something
is missing but I don't know if that situation fixes more than this
one.
2015-09-03 23:01:21 +02:00
Enrique J. Hernández 190f27ed7c Merge pull request #174 from zentyal/jag/test-quote-mime-header-value
Test for [NGMimeMessageGenerator generateDataForHeaderField:value:]
2015-09-01 16:15:23 +02:00
Javier Amor García cbc3e3e97d Test for [NGMimeMessageGenerator generateDataForHeaderField:value:]
The NGMimeMessageGenerator can be found in sope
2015-09-01 09:09:54 +02:00
Javier Amor García 361d5ea3a6 Added method [SOGoTest stringFromDiffBetween:and:] 2015-09-01 09:09:54 +02:00
Jesús García Sáez 24e3071e24 Merge pull request #170 from zentyal/jag/attachments-nolatin-filename
sogo-openchange: Support attachments with filename extended parameter
2015-08-26 15:15:15 +02:00
Jesús García Sáez 1f29198495 Merge pull request #172 from zentyal/ejhernandez/save-draft-right-change-key
oc-mail: Return right change key after saving a draft mail
2015-08-26 13:37:42 +02:00
Jesús García Sáez 916442f9cf Merge pull request #171 from zentyal/ejhernandez/restriction-cn-ge
oc-mail: Implement ChangeNumber >= restriction
2015-08-25 13:17:20 +02:00
Enrique J. Hernández Blasco 47859b76d6 oc-mail: Return right change key after saving a draft mail
After saving a draft mail (this is done automatically by Outlook)
a GetProps call is done checking the PidTagChangeKey has been
updated properly. Without this patch, it returned MAPI_E_NOT_FOUND.

With this patch, we addressed that problem and we have updated
the Predecessor Change List metadata for the draft mail with the
change key provided by the client to avoid conflicting messages
whenever it is possible.
2015-08-24 23:42:38 +02:00
Enrique J. Hernández Blasco 3a60b6e38e oc-mail: Implement ChangeNumber >= restriction
And warn when other operator than > or >= is used.

This allows OpenChange to query for change numbers starting from
a given point.
2015-08-24 15:39:05 +02:00
Javier Amor García ae3ac0a09a oc-mail: Support attachments with filename extended parameter
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.
2015-08-24 14:19:47 +02:00
Ludovic Marcotte 27a19ac956 (fix) Session fix when SOGoEnableDomainBasedUID is enabled but logins are domain-less 2015-08-21 10:30:47 -04:00
Enrique J. Hernández Blasco 27b9b7bfa7 oc-mail: Increase Change Number after modifying seen flag
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.
2015-08-10 18:38:39 +02:00
Julio J. García Martín 18f758cb0a Merge pull request #159 from Zentyal/ejhernandez/fixes-on-move
Maintain PidTagPredecessorChangeList with client's data
2015-08-04 18:13:19 +02:00
Enrique J. Hernández Blasco 321672e2c3 oc: Update predecessor change list on saving
There were cases where only the change key was updated (GCS) or
others were the change key was updated with wrong info.

This changeset has as goal to update the predecessor change list
and, change key if required, on saving taking into account the latest information
given by the client in high level ROPs such as ImportMessageMove
or SetProperties, and merge it with information provided by the server
backend (IMAP server, SOGo DB) using `synchroniseCache`.

For more details about `PidTagChangeKey` and `PidTagPredecessorChangeList`
property values check [MS-OXCFXICS] Section 2.2.1.2
2015-08-04 08:41:38 +02:00
Enrique J. Hernández Blasco 8d9b54815c oc: Receive new predecessor change list parameter on move copy op
This is to apply new API introduced by 85e2d7c commit in OpenChange
repository.
2015-08-04 08:41:38 +02:00
Enrique J. Hernández Blasco 1dbfc18379 oc: Update to new XID structure definition
From ede986f commit from OpenChange repository.
2015-08-04 08:41:38 +02:00
Ludovic Marcotte 05b330e11b (fix) added changes from PR94 to avoid big merge conflicts 2015-08-03 11:06:30 -04:00
Luc Charland 307876e6c7 cleaned up a few comments 2015-08-03 11:01:33 -04:00
Luc Charland ac6b299988 removed double Name translation in 5 languages 2015-08-03 10:13:23 -04:00
Ludovic Marcotte 234db671ad Removed merged in templates from v3 2015-08-03 10:12:40 -04:00
Luc Charland 2d33b01f31 Removing colons
Conflicts:

	UI/Templates/ContactsUI/UIxContactEditorTemplate.wox
	UI/Templates/ContactsUI/UIxContactFolderLinksTemplate.wox
	UI/Templates/MailerUI/UIxMailMainFrame.wox
	UI/Templates/MainUI/SOGoRootPage.wox
	UI/Templates/PreferencesUI/UIxAccountEditor.wox
	UI/Templates/PreferencesUI/UIxPreferences.wox
	UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox
	UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox
	UI/Templates/SchedulerUI/UIxCalMainView.wox
	UI/Templates/SchedulerUI/UIxCalendarFolderLinksTemplate.wox
	UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox
	UI/Templates/SchedulerUI/UIxTaskViewTemplate.wox
	UI/WebServerResources/angular-material
2015-08-03 10:12:02 -04:00
Luc Charland 490354427d fixed Appointments path 2015-08-03 09:56:14 -04:00
Luc Charland 22ce38808a cleaned up a few comments 2015-08-03 09:55:52 -04:00
Luc Charland 82aca2cfe5 added first draft of verify_translation 2015-08-03 09:55:17 -04:00
Ludovic Marcotte b17488ff25 Updated NEWS file regarding PR93 2015-08-03 09:18:20 -04:00
extrafu ff3557598f Merge pull request #93 from Zentyal/jjgarcia/contribute-back
Changes for sogo-openchange from Zentyal
2015-08-03 09:13:55 -04:00
Julio García 26bd1b30fa Revert "Merge pull request #164 from Zentyal/jgarcia/revert-merge-inverse"
This reverts commit 1404dbdb88, reversing
changes made to 72cbd9a45f.
2015-08-03 09:48:06 +02:00
Enrique J. Hernández 0ce04fd4b6 Merge pull request #165 from Zentyal/jgarcia/uids_login_party_hard
SOGoUser bad initialization on multidomain environment
2015-07-31 18:46:15 +02:00
Jesús García Sáez f3656f7571 Merge pull request #166 from Zentyal/ejhernandez/update-cn-setting-folder-props
oc: Update ChangeNumber after setting folder properties
2015-07-30 14:49:56 +02:00
Enrique J. Hernández Blasco 2aba083147 oc: Update ChangeNumber after setting folder properties
As required by operations like SynchronizationImportHierarchyChanges
a new change number must be generated when a change in a folder
is set. This affects to subfolders.

See [MS-OXCFXICS] Section 3.2.5.9.4.3 for details.
2015-07-30 10:07:55 +02:00
Jesús García Sáez 9414df26c5 getUIDForEmail works on multidomain: returns login
This method is used everywhere to try to retrieve the login of the user
(and normally use the return value to [SOGoUser initwithLogin: ...])

In multidomain environments (with DomainLessLogin = false) there were
several paths (mostly in SOGoAppointmentObject.m) that were trying to
create SOGoUser objects with incorrect login: using only the uid part,
not full email. Then like domain based uid was enabled, these users
had DomainLessLogin set to true and further calls tried to authenticate
only with the uid part (and they should not).

This affects to several methods in:

  * ActiveSync/SOGoActiveSyncDispatcher.m
  * Appointments/SOGoAppointmentFolder.m
  * Appointments/SOGoAppointmentObject.m
  * Appointments/SOGoCalendarComponent.m
  * SOGoSAML2Session.m

Probably a few features related with calendars are now fixed or working
as intended in multidomain environments where the email is used as login
2015-07-29 17:40:56 +02:00
Jesús García Sáez 7496b92da5 Merge pull request #158 from Zentyal/jag/mapistorefolder-getpidtagdisplayname
oc-mail: Added [MAPIStoreFolder getPidTagDisplayName:inMemCtx:]
2015-07-28 18:08:20 +02:00
Jesús García Sáez e38b0ac64f Merge pull request #163 from Zentyal/ejhernandez/subject-fallback
oc-mail: Fallback to PidTagSubject unicode when creating new mail
2015-07-28 17:16:11 +02:00
Julio J. García Martín 1404dbdb88 Merge pull request #164 from Zentyal/jgarcia/revert-merge-inverse
Revert merge from inverse
2015-07-28 12:57:31 +02:00
Jesús García Sáez 3dc8cc78ea Revert merge from inverse
https://github.com/Zentyal/sogo/pull/150

Because the login on web with the use of outlook is broken after
including the DomainLessLogin feature
2015-07-28 12:37:33 +02:00
Jesús García Sáez 72cbd9a45f Merge pull request #162 from Zentyal/ejhernandez/fix-compilation-warn
oc: Fix compilation warning in MAPIStoreContext
2015-07-27 13:41:36 +02:00
Enrique J. Hernández Blasco 10ac445f7c oc-mail: Fallback to PidTagSubject unicode when creating new mail
Some clients such as OpenChange client does not send the following
properties PidTagNormalizedSubject or PidTagSubjectPrefix as
suggested by [MS-OXCMAIL].
2015-07-27 11:18:14 +02:00
Enrique J. Hernández Blasco c5b5a4243d oc: Fix compilation warning in MAPIStoreContext 2015-07-25 09:56:21 +02:00
Ludovic Marcotte 304ffa2099 (fix) SOGoMaximumMessageSubmissionCount should be independant from SOGoMaximumRecipientCount 2015-07-24 11:19:57 -04:00
Francis Lachapelle e4ad255fc2 (fix) chmod 644 UI/MainUI/Slovenian.lproj/Locale 2015-07-23 14:09:27 -04:00
Francis Lachapelle 390a853471 (fix) Display of whitelisted attendees in Firefox
Fixes #3285
2015-07-23 14:07:34 -04:00
Ludovic Marcotte dd9b5e18b6 Updates for the release 2015-07-23 11:51:36 -04:00
Francis Lachapelle 5c017c19fc Update Spanish (Argentina) translation 2015-07-23 11:49:07 -04:00
Francis Lachapelle dec152e8e5 Update CKEditor to version 4.5.1 2015-07-23 11:48:51 -04:00
Francis Lachapelle 4922e6004d Add missing templates for Basque language 2015-07-23 11:14:11 -04:00
Francis Lachapelle b91972d1dc Add missing template for Slovenian language 2015-07-23 11:14:09 -04:00
Francis Lachapelle 5c3cdda186 Add Chinese (Taiwan) translation 2015-07-23 11:14:08 -04:00
Ludovic Marcotte 4b19e64071 (fix) fallback to utf-8/latin1 in rare decoding error cases - this is ugly 2015-07-23 10:22:36 -04:00
Francis Lachapelle b6dee056ca (fix) Return value of [iCalPerson+SOGo uidInDomain:] 2015-07-23 08:46:08 -04:00
Enrique J. Hernández 372247a643 Merge pull request #160 from Zentyal/jgarcia/useless-indexing
oc: remove useless mapistore_indexing call
2015-07-23 08:58:36 +02:00
Francis Lachapelle 6830d6d930 Calendar module optimizations in multidomain setup 2015-07-22 17:23:02 -04:00
Francis Lachapelle 366ad44cd1 Fix .wod files for English and Basque 2015-07-22 17:22:26 -04:00
Francis Lachapelle 9430f40101 Add Slovenian translation 2015-07-22 17:22:26 -04:00
Ludovic Marcotte b7c2d8ae95 (fix) we now respect the cr/lf in event's description (#3228) 2015-07-22 14:49:09 -04:00
Ludovic Marcotte f03e7a6604 (doc) ModuleConstraints for EAS 2015-07-22 11:54:50 -04:00
Ludovic Marcotte 4e7a3ce5fa (fix) fixed EAS conversation ID issues on BB10 (#3152) 2015-07-22 10:26:09 -04:00
Ludovic Marcotte 61c542cb95 (fix) make sure ActiveSync is always usable with SQL-based auth sources 2015-07-22 10:12:47 -04:00
Ludovic Marcotte d2640e1501 (fix) fixed computation of GlobalObjectId (#3235) 2015-07-22 09:59:36 -04:00
Ludovic Marcotte 20b91cc7bf (fix) improved EAS email flagging handling (#3140) 2015-07-22 09:46:06 -04:00
Ludovic Marcotte b05f7a5beb (fix) compilation warning 2015-07-22 09:25:29 -04:00
Ludovic Marcotte 3a61b7bae4 Android EAS Lollipop fixes (#3268 and #3269) 2015-07-22 09:15:34 -04:00
Jesús García Sáez 7bde181d3f oc: check ret value get_new_folderID
On [MAPIStoreContext idForObjectWithKey: key inFolderUrl: url] check the ret value
of mapistore_indexing_get_new_folderID. This should never happen (oh my...) but
if this happens it will be reported
2015-07-21 19:47:17 +02:00
Jesús García Sáez 1336a1d5a8 oc: remove useless mapistore_indexing call
[mapping registerURL ...] will insert the mappingId in indexing database
there is no need to call, again, mapistore_indexing_record_add_mid
2015-07-21 19:47:17 +02:00
Enrique J. Hernández cf606e3224 Merge pull request #157 from Zentyal/jgarcia/wocontext_broken_like_hell
Fix sharing imap connections between different clients
2015-07-21 18:38:09 +02:00
Jesús García Sáez c9f2fe2f85 oc-folder: user context activation on rootFolders
Several fixes related with userContext activation
2015-07-21 11:08:03 +02:00
Jesús García Sáez 10bc15d41d oc-folder: activate user context when needed
Before creating sogo objects
2015-07-21 11:08:02 +02:00
Jesús García Sáez 393b6d5128 oc-folder: simplify lookupFolder method
use activate and no need to set wocontext, it's already set properly
2015-07-21 11:08:02 +02:00
Jesús García Sáez 68ae978b13 oc-mail: activate user context needed
Before creating new sogo objects
2015-07-21 11:08:02 +02:00
Jesús García Sáez f4e3b98042 Nothing changed: format and hoarding code removed 2015-07-21 11:08:02 +02:00
Jesús García Sáez cfab18e1b8 oc: activate user context on initialization 2015-07-21 11:08:02 +02:00
Javier Amor García 959b4e015d [SOgoMailFolder displayName] decodes IMAP4 2015-07-20 15:19:43 +02:00
Ludovic Marcotte 7c6c78d13b Updated NEWS file regarding PR from Zentyal folks 2015-07-19 13:37:08 -04:00
extrafu 7db109525d Merge pull request #90 from Zentyal/master
Latest changes for sogo-openchange
2015-07-19 13:36:56 -04:00
Javier Amor García 2ce85f6c5c oc-mail: Added [MAPIStoreFolder getPidTagDisplayName:inMemCtx:]
This getter is necessary to decode folder names
in utf7 encoding.
2015-07-17 18:23:40 +02:00
Jesús García Sáez 7d2f96e96b oc: use activate instead of activateWithUser
100% of the times the user is the one that MAPIStoreUserContext
already has, so no need to have it as an argument.
2015-07-15 11:26:05 +02:00
Jesús García Sáez 3bf7afdfb7 oc: remove and disable userContext after each call
This adds [MAPIStoreUserContext activate] method to use
it instead of activateWithUser.

A cleanup operation is executed after each public function
so there won't be any conflicts with future calls.

In practice, this will deactivate the current user context set on
MAPIApp, this means two things: (1) set nil as current user context
on MAPIApp and (2) remove woContext from current thread dictionary
2015-07-15 11:25:45 +02:00
Jesús García Sáez 503a70118f oc: remove tabs and unused code 2015-07-14 19:19:58 +02:00
Jesús García Sáez 928b6b596e oc: OC_DEBUG inside macros
These macros are used before and after every performed
operation
2015-07-14 19:19:51 +02:00
Julio J. García Martín d0d93a297b Merge pull request #156 from Zentyal/jjgarcia/remove-not-needed-code
Remove not needed block in SoObjects/SOGo/SOGoUserManager.m
2015-07-13 09:13:21 +02:00
Julio García 936c38c43e Remove not needed block in SoObjects/SOGo/SOGoUserManager.m 2015-07-07 14:25:17 +02:00
Jesús García Sáez 7da7bdc1bf Merge pull request #150 from Zentyal/merge-upstream
Merge upstream
2015-07-06 18:57:45 +02:00
Jesús García Sáez 1e101ef01a Merge branch 'master' into merge-upstream
Conflicts:
	SoObjects/SOGo/SOGoUserManager.m
2015-07-06 18:54:35 +02:00
Enrique J. Hernández 3171257ef4 Merge pull request #153 from Zentyal/jag/active-sync-access
ActiveSync: can be controlled by module constraint
2015-07-03 08:42:55 +02:00
Julio J. García Martín 2c8d65843f Merge pull request #154 from Zentyal/ejhernandez/fix-crash-no-object-type-rec
oc: Check PidTagObjectType before dereferencing on ModifyRecipients
2015-07-01 10:57:25 +02:00
Enrique J. Hernández Blasco 62b16f4ef3 oc: Check PidTagObjectType before dereferencing on ModifyRecipients
This is crashing when the PidTagObjectType property is set for
some recipient and not for others.

If the property is missing, then no object type for the recipient
is assumed.
2015-06-29 23:53:12 +02:00
Ludovic Marcotte b86b1afdb9 Fix for dfecce7381 2015-06-29 13:49:41 -04:00
Julio García 8e047aaa9c Merge remote-tracking branch 'upstream/master' into merge-upstream
Conflicts:
	SoObjects/SOGo/SOGoUserManager.m
	Tools/SOGoToolRestore.m
2015-06-26 09:41:58 +02:00
Julio García dc2cc14d25 Revert "Revert "(fix) more fixes and clarifications on the mutli-domain settings""
This reverts commit 3dd8bddc0e.
2015-06-26 09:35:47 +02:00
Julio García 3f1a43cc13 Revert "Revert "(fix) more multi-domain fixes and cleanups""
This reverts commit 90e11d76f6.
2015-06-26 09:35:37 +02:00
Julio García 67d0d95869 Revert "Revert "Fixed mess regarding uid/realUID""
This reverts commit 96d88de564.
2015-06-26 09:35:26 +02:00
Francis Lachapelle d16bf7c1a7 (fix) Tasks list display in Calendar module
Fixes #3267
2015-06-24 07:48:01 -04:00
Francis Lachapelle b527099907 (fix) Events list display in Calendar module
Fixes #3261
2015-06-23 09:25:29 -04:00
Javier Amor García 72aab7f83f ActiveSync: can be controlled by module constraint
Added 'ActiveSync' module constraint. If constraint is not
honored the ActiveSync request returns a forbidden (403).
2015-06-23 09:11:45 +02:00
Ludovic Marcotte dfecce7381 (feat) added support for DeletesAsMoves over EAS 2015-06-22 09:19:54 -04:00
Francis Lachapelle 82798ccb99 Change signature of [iCalAlarm alarmForEvent:..]
The first argument doesn't have to be a iCalRepeatableEntity; a simple
iCalEntity is enough.
2015-06-19 22:11:24 -04:00
Ludovic Marcotte 3809c002ed Revert "(fix) ensure calendar objects have a (fake) filename"
This reverts commit a145fdbb53.
2015-06-17 15:57:16 -04:00
Ludovic Marcotte d9b4abc2f1 (fix) improved memory usage 2015-06-17 08:46:09 -04:00
Jesús García Sáez c1b0fd53dc Merge pull request #100 from Zentyal/jag/recipient-from-client-call
mapistore: can use client data to get recipient address
2015-06-08 14:32:31 +02:00
Julio J. García Martín c0a22ead1d Merge pull request #146 from Zentyal/merge-from-upstream
Merge from upstream
2015-06-04 18:53:24 +02:00
Enrique J. Hernández d8e37cd7d8 Merge pull request #142 from Zentyal/jag/sogo-tool-create-folder
sogo-tool: Added create-folder command
2015-06-02 17:43:03 +02:00
Javier Amor García 7540cc3e33 oc: can use client data to get recipient address
Before this change, the recipient address was only extracted from the sogo
user object. This made mail to groups undeliverable.
Now if we do not have mail addresses from user object,
we try to use parameters from the client call.
2015-06-02 15:07:50 +02:00
Jesús García Sáez d92b0341fb sogo-tool restore works in multidomain environments
c_uid is not unique globally when multidomain is enabled
2015-06-02 13:17:43 +02:00
Javier Amor García 5e84f2817f sogo-tool: Added create-folder command 2015-06-02 13:17:35 +02:00
Julio García c61eca27a1 Merge branch 'upstream-master' into merge-from-upstream
Conflicts:
	SoObjects/SOGo/LDAPSource.m
	SoObjects/SOGo/SOGoUserManager.m
2015-06-02 12:27:20 +02:00
Julio García 96d88de564 Revert "Fixed mess regarding uid/realUID"
This reverts commit 4f303f8aa2.
2015-06-02 12:24:56 +02:00
Julio García 90e11d76f6 Revert "(fix) more multi-domain fixes and cleanups"
This reverts commit ed42d1e26b.
2015-06-02 12:24:44 +02:00
Julio García 3dd8bddc0e Revert "(fix) more fixes and clarifications on the mutli-domain settings"
This reverts commit d07df554f3.
2015-06-02 12:24:32 +02:00
Enrique J. Hernández 95f11f6d0d Merge pull request #145 from Zentyal/jvalles/appointment-updates
oc-calendar: Improve check for appointment updates
2015-06-01 22:48:45 +02:00
Juan Vallés 1ec53a063c oc-calendar: Improve check for appointment updates
The UID was being used to check if  the changes in an appointment had been made by
its organiser. In this case, the UID is the user name, without taking the domain into account.
The `owner` variable, however, is a full email address, so the comparison was never successful. This
caused the update notification mail not to be sent.
2015-06-01 17:09:48 +02:00
Enrique J. Hernández cab5846e37 Merge pull request #143 from Zentyal/jgarcia/crash-session
Safe decoding of secured value
2015-06-01 17:01:07 +02:00
Jesús García Sáez 76f80c507c safe decoding of secured value
This was crashing with invalid value (shorter than it should be or nil value)
2015-05-28 12:35:18 +02:00
Jesús García Sáez afed233131 Merge pull request #141 from Zentyal/ejhernandez/bson-encode-datestz-offset
Use UTC offset to encode NSCalendarDate in BSON
2015-05-27 14:50:14 +02:00
Enrique J. Hernández Blasco b04b66fd79 Use UTC offset to encode NSCalendarDate in BSON
Using name abbreviation in Objective-C is discouraged
as it stated in the following link:

https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Classes/NSTimeZone_Class/index.html#//apple_ref/occ/clm/NSTimeZone/timeZoneWithAbbreviation:

Indeed, the GNUStep library is generating the name
abbreviation using the system tzdata information
but parsing this data using GNUStep resources making
changes like this:

http://mm.icann.org/pipermail/tz-announce/2014-August/000023.html

Not working until GNUStep reaches these tzdata changes.

Using the UTC offset we are losing the position in planet
Earth but it could be considered valid looking at other
bson implementations.
2015-05-26 21:42:57 +02:00
Enrique J. Hernández 13f2ac9cbb Merge pull request #138 from Zentyal/jgarcia/fix-multidomain-web
Avoid reading emails from other domains (info@foo vs info@bar)
2015-05-25 22:17:42 +02:00
Jesús García Sáez 7dc333e790 Fix warning distinct Objective-C type
failedCount is a NSDictionary *, not NSMutableDictionary *
2015-05-25 17:33:46 +02:00
Jesús García Sáez cc62576fef Avoid cache entries with uid@domain@domain prefix
Depend of the current workflow these paths are reached with
username as uid and sometimes as uid@domain. So in multidomain
environments only append @domain when needed.
2015-05-25 17:33:32 +02:00
Jesús García Sáez a1d07c59af Merge pull request #137 from Zentyal/jag/change-passsword-exceptions
Return appropiate error code when changing AD password with incorrect…
2015-05-23 02:23:02 +02:00
Enrique J. Hernández 0a37652dd6 Merge pull request #139 from Zentyal/jgarcia/get-sources-from-your-domain
Try to authenticate only against sources of the given domain
2015-05-22 20:43:41 +02:00
Javier Amor García 725dea5f6f Show 'complexity password' error instead of a generic error
There is not discrimination between complexity and
length errors because LDAP does not
return different error codes for each case.
2015-05-22 14:59:49 +02:00
Jesús García Sáez 76dd53b461 Fix conflicts with externalLoginWithEmail + DomainBasedUid
On multidomain environment (SOGoEnableDomainBasedUID) with email for imap
authentication (SOGoForceExternalLoginWithEmail) we need to use uid@domain
instead of just uid in method getEmailForUID
2015-05-21 17:13:18 +02:00
Jesús García Sáez 020c895925 Avoid uid+attributes entries on shared cache
In multidomain environments this will produce that info@domain1.com
can read info@domain2.com emails when info@domain2.com log in after
info@domain1.com is already logged in.

If multidomain is not enabled, this action is not needed because
uid+attributes has been already saved on shared cache
2015-05-21 17:13:18 +02:00
Ludovic Marcotte f4963df50f (fix) avoid appending the domain unconditionally when SOGoEnableDomainBasedUID is set to YES 2015-05-21 17:13:11 +02:00
Jesús García Sáez 7160d94e91 Set domain before fetching auth sources
In multidomain environment right now we are trying to authenticate against
all sources defined in sogo.conf because the domain is not set at this point.

In sogo.conf we have to specify the domain a source is useful for, so with this
patch instead of 'n' tries of authentication we will perform only 1 (in a scenario
where we have 1 source per domain, and we have 'n' domains).
2015-05-20 18:33:11 +02:00
3285 changed files with 170318 additions and 378832 deletions

No files matched your search

-140
View File
@@ -1,140 +0,0 @@
# Contributing to SOGo
## Reporting Bugs and Suggesting Enhancements
If you encounter a possible bug with SOGo, you can access our
[bug tracking system](https://sogo.nu/bugs/).
Please make sure to respect the following guidelines when reporting a bug:
* verify that the bug you found is not already known or even fixed in the `master` version
* make the actual facts very clear; be precise, we need to be able to reproduce the problem
* explain your speculations, if any
* add a screenshot to the ticket if appropriate
## Submitting a Pull Request
Begin by reading [SOGo Developer's Guide](../Documentation/SOGoDevelopersGuide.asciidoc).
### Translations
Three type of files must be translated. The first type are **Localizable.strings**; they can be
translated online using **[Transifex](https://www.transifex.com/inverse/sogo/)**. To use Transifex,
you must first sign up for a [free account](https://www.transifex.com/signup/). Once registered,
[request a new team](https://www.transifex.com/inverse/teams/) for your language. Once authorized,
you'll be able to start/continue translating SOGo in your language.
The second type are **wox and html templates**. Only words outside the tags (<>) must be
translated. Start by duplicating the English templates:
* [UI/Templates/SOGoACLEnglishAdditionAdvisory.wox](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/Templates/SOGoACLEnglishAdditionAdvisory.wox)
* [UI/Templates/SOGoACLEnglishRemovalAdvisory.wox](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/Templates/SOGoACLEnglishRemovalAdvisory.wox)
* [UI/Templates/SOGoACLEnglishModificationAdvisory.wox](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/Templates/SOGoACLEnglishModificationAdvisory.wox)
* [UI/Templates/SOGoFolderEnglishAdditionAdvisory.wox](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/Templates/SOGoFolderEnglishAdditionAdvisory.wox)
* [UI/Templates/SOGoFolderEnglishRemovalAdvisory.wox](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/Templates/SOGoFolderEnglishRemovalAdvisory.wox)
* [SoObjects/Mailer/SOGoMailEnglishForward.wo/SOGoMailEnglishForward.html](https://raw.githubusercontent.com/inverse-inc/sogo/master/SoObjects/Mailer/SOGoMailEnglishForward.wo/SOGoMailEnglishForward.html)
* [SoObjects/Mailer/SOGoMailEnglishReply.wo/SOGoMailEnglishReply.html](https://raw.githubusercontent.com/inverse-inc/sogo/master/SoObjects/Mailer/SOGoMailEnglishReply.wo/SOGoMailEnglishReply.html)
The third type is the locale file formatted as a **plist**. Duplicate the English locale:
* [UI/MainUI/English.lproj/Locale](https://raw.githubusercontent.com/inverse-inc/sogo/master/UI/MainUI/English.lproj/Locale)
Once translated, create an archive with all the files and [contact
us](https://sogo.nu/support.html#/commercial). We'll integrate it in the next version of SOGo.
### Git Commit Guidelines
We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**.
It is important to note that we use the git commit messages to **generate** the
[CHANGELOG](../CHANGELOG.md) document. Improperly formatted commit messages may result in your
change not appearing in the CHANGELOG of the next release.
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
```html
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
> Any line of the commit message cannot be longer than 100 characters.
> This allows the message to be easier to read on GitHub as well as in various Git tools.
#### Type
Must be one of the following:
* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation only changes
* **i18n**: Change in localizable strings
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc)
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests
* **chore**: Changes to the build and packaging process or auxiliary tools (sogo-tool,
sogo-ealarms-notify) and libraries such as documentation generation
#### Scope
The scope could be anything that helps specifying the scope (or feature) that is changing.
Examples
* mail
* mail(js)
* calendar(css)
* addressbook
* preferences(js)
* core
* eas
#### Subject
The subject contains a succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize first letter
* no dot (.) at the end
#### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes"
The body should include the motivation for the change and contrast this with previous behavior.
#### Footer
The footer should contain any information about **Breaking Changes** and is also the
place to reference [Mantis](https://sogo.nu/bugs/) issues that this commit **Fixes** or **Resolves**.
> Breaking Changes are intended to be highlighted in the CHANGELOG as changes that will require
> community users to modify their code after updating to a version that contains this commit.
#### Sample Commit messages
```text
fix(calendar): don't raise exception when renaming with same name
this would break Apple Calendar.app when creating a new calendar
Fixes #4813
```
```text
feat(calendar(js)): optionally expand LDAP groups in attendees editor
* add `/members` action for LDIF groups
* add button to expand invited LDAP groups
Fixes #2506
```
```text
fix(core): set default Sieve port to 4190
BREAKING CHANGE: the default port for the SOGoSieveServer configuration default is now 4190 (was
2000).
You need to explicitly set the port if you use a different port.
Closes #4826
```
+13 -43
View File
@@ -1,48 +1,18 @@
config.make
tags
*._*
*.css
*.pyc
*.sax
*.swp
*.wox/
*/*/*.SOGo/
*/*/*/obj/
*/*/obj/
*/obj/
.scss-lint-config.yml_
ActiveSync/ActiveSync.SOGo
Documentation/*.docbook
Documentation/*.pdf
*._*
*/*/obj/
*/*/*/obj/
*/*/*.SOGo/
*.sax
*.wox/
*.swp
SoObjects/SOGo/SOGo.framework/
SoObjects/SOGo/derived_src/
Tests/*/config.py
UI/WebServerResources/.bowerrc
UI/WebServerResources/.sass-cache/
UI/WebServerResources/bower_components/
UI/WebServerResources/css/
UI/WebServerResources/js/*.js
UI/WebServerResources/js/*.js.map
UI/WebServerResources/js/vendor/*.js
UI/WebServerResources/js/vendor/*.js.map
UI/WebServerResources/node_modules/
UI/WebServerResources/scss/.sass-cache/
config.make
doc
tags
.DS_Store
Tests/package-lock.json
.vscode
.configure-test*
UI/WebServerResources/package-lock.json
# CKEditor
UI/WebServerResources/js/vendor/ckeditor/samples/
UI/WebServerResources/js/vendor/ckeditor/skins/n1theme/readme.md
UI/WebServerResources/js/vendor/ckeditor/*.md
UI/WebServerResources/js/vendor/ckeditor/adapters/jquery.js
UI/WebServerResources/js/vendor/ckeditor/bender-runner.config.json
UI/WebServerResources/js/vendor/ckeditor/plugins/onchange/docs
UI/WebServerResources/js/vendor/ckeditor/plugins/scayt/*.md
UI/WebServerResources/js/vendor/ckeditor/skins/n1theme/*.md
# Transifex
.tx/config_20230213185112.bak
*.pyc
._*
Documentation/*.docbook
Documentation/*.pdf
-3
View File
@@ -1,3 +0,0 @@
[submodule "UI/WebServerResources/angular-material"]
path = UI/WebServerResources/angular-material
url = https://github.com/angular/material
+352 -47
View File
@@ -1,60 +1,365 @@
[main]
host = https://www.transifex.com
lang_map = fr: French, pt_BR: BrazilianPortuguese, ru: Russian, sk: Slovak, es_AR: SpanishArgentina, fi: Finnish, id_ID: Indonesian, lt: Lithuanian, tr_TR: TurkishTurkey, zh_TW: ChineseTaiwan, ar: Arabic, cs: Czech, nn_NO: NorwegianNynorsk, sl_SI: Slovenian, uk: Ukrainian, zh_CN: ChineseChina, sv: Swedish, bg_BG: Bulgarian, cy: Welsh, is: Icelandic, sr: Serbian, lv: Latvian, pl: Polish, ro_RO: Romanian, bs_BA: Bosnian,ca: Catalan, he: Hebrew, kk: Kazakh, pt: Portuguese, es_ES: SpanishSpain, eu: Basque, hu: Hungarian, ja: Japanese, mk_MK: Macedonian, nb_NO: NorwegianBokmal, nl: Dutch, sr@latin: SerbianLatin, da_DK: Danish, de: German, hr_HR: Croatian, it: Italian, sr_ME@latin: Montenegrin
[o:alinto:p:sogo:r:soobjects-appointments]
source_file = SoObjects/Appointments/English.lproj/Localizable.strings
source_lang = en
file_filter = SoObjects/Appointments/<lang>.lproj/Localizable.strings
[sogo.ui-mailerui]
source_file = UI/MailerUI/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/MailerUI/Arabic.lproj/Localizable.strings
trans.ca = UI/MailerUI/Catalan.lproj/Localizable.strings
trans.cs = UI/MailerUI/Czech.lproj/Localizable.strings
trans.cy = UI/MailerUI/Welsh.lproj/Localizable.strings
trans.da_DK = UI/MailerUI/Danish.lproj/Localizable.strings
trans.de = UI/MailerUI/German.lproj/Localizable.strings
trans.es_AR = UI/MailerUI/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/MailerUI/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/MailerUI/Basque.lproj/Localizable.strings
trans.fi = UI/MailerUI/Finnish.lproj/Localizable.strings
trans.fr = UI/MailerUI/French.lproj/Localizable.strings
trans.hr_HR = UI/MailerUI/Croatian.lproj/Localizable.strings
trans.hu = UI/MailerUI/Hungarian.lproj/Localizable.strings
trans.is = UI/MailerUI/Icelandic.lproj/Localizable.strings
trans.it = UI/MailerUI/Italian.lproj/Localizable.strings
trans.lt = UI/MailerUI/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/MailerUI/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/MailerUI/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/MailerUI/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/MailerUI/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/MailerUI/Polish.lproj/Localizable.strings
trans.pt = UI/MailerUI/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/MailerUI/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/MailerUI/Russian.lproj/Localizable.strings
trans.sk = UI/MailerUI/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/MailerUI/Slovenian.lproj/Localizable.strings
trans.sv = UI/MailerUI/Swedish.lproj/Localizable.strings
trans.uk = UI/MailerUI/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/MailerUI/ChineseTaiwan.lproj/Localizable.strings
[sogo.ui-preferencesui]
source_file = UI/PreferencesUI/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/PreferencesUI/Arabic.lproj/Localizable.strings
trans.ca = UI/PreferencesUI/Catalan.lproj/Localizable.strings
trans.cs = UI/PreferencesUI/Czech.lproj/Localizable.strings
trans.cy = UI/PreferencesUI/Welsh.lproj/Localizable.strings
trans.da_DK = UI/PreferencesUI/Danish.lproj/Localizable.strings
trans.de = UI/PreferencesUI/German.lproj/Localizable.strings
trans.es_AR = UI/PreferencesUI/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/PreferencesUI/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/PreferencesUI/Basque.lproj/Localizable.strings
trans.fi = UI/PreferencesUI/Finnish.lproj/Localizable.strings
trans.fr = UI/PreferencesUI/French.lproj/Localizable.strings
trans.hr_HR = UI/PreferencesUI/Croatian.lproj/Localizable.strings
trans.hu = UI/PreferencesUI/Hungarian.lproj/Localizable.strings
trans.is = UI/PreferencesUI/Icelandic.lproj/Localizable.strings
trans.it = UI/PreferencesUI/Italian.lproj/Localizable.strings
trans.lt = UI/PreferencesUI/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/PreferencesUI/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/PreferencesUI/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/PreferencesUI/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/PreferencesUI/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/PreferencesUI/Polish.lproj/Localizable.strings
trans.pt = UI/PreferencesUI/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/PreferencesUI/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/PreferencesUI/Russian.lproj/Localizable.strings
trans.sk = UI/PreferencesUI/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/PreferencesUI/Slovenian.lproj/Localizable.strings
trans.sv = UI/PreferencesUI/Swedish.lproj/Localizable.strings
trans.uk = UI/PreferencesUI/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/PreferencesUI/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:soobjects-contacts]
source_file = SoObjects/Contacts/English.lproj/Localizable.strings
source_lang = en
file_filter = SoObjects/Contacts/<lang>.lproj/Localizable.strings
[sogo.ui-scheduler]
source_file = UI/Scheduler/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/Scheduler/Arabic.lproj/Localizable.strings
trans.ca = UI/Scheduler/Catalan.lproj/Localizable.strings
trans.cs = UI/Scheduler/Czech.lproj/Localizable.strings
trans.cy = UI/Scheduler/Welsh.lproj/Localizable.strings
trans.da_DK = UI/Scheduler/Danish.lproj/Localizable.strings
trans.de = UI/Scheduler/German.lproj/Localizable.strings
trans.es_AR = UI/Scheduler/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/Scheduler/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/Scheduler/Basque.lproj/Localizable.strings
trans.fi = UI/Scheduler/Finnish.lproj/Localizable.strings
trans.fr = UI/Scheduler/French.lproj/Localizable.strings
trans.hr_HR = UI/Scheduler/Croatian.lproj/Localizable.strings
trans.hu = UI/Scheduler/Hungarian.lproj/Localizable.strings
trans.is = UI/Scheduler/Icelandic.lproj/Localizable.strings
trans.it = UI/Scheduler/Italian.lproj/Localizable.strings
trans.lt = UI/Scheduler/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/Scheduler/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/Scheduler/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/Scheduler/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/Scheduler/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/Scheduler/Polish.lproj/Localizable.strings
trans.pt = UI/Scheduler/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/Scheduler/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/Scheduler/Russian.lproj/Localizable.strings
trans.sk = UI/Scheduler/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/Scheduler/Slovenian.lproj/Localizable.strings
trans.sv = UI/Scheduler/Swedish.lproj/Localizable.strings
trans.uk = UI/Scheduler/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/Scheduler/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:soobjects-mailer]
source_file = SoObjects/Mailer/English.lproj/Localizable.strings
source_lang = en
file_filter = SoObjects/Mailer/<lang>.lproj/Localizable.strings
[sogo.ui-contacts]
source_file = UI/Contacts/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/Contacts/Arabic.lproj/Localizable.strings
trans.ca = UI/Contacts/Catalan.lproj/Localizable.strings
trans.cs = UI/Contacts/Czech.lproj/Localizable.strings
trans.cy = UI/Contacts/Welsh.lproj/Localizable.strings
trans.da_DK = UI/Contacts/Danish.lproj/Localizable.strings
trans.de = UI/Contacts/German.lproj/Localizable.strings
trans.es_AR = UI/Contacts/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/Contacts/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/Contacts/Basque.lproj/Localizable.strings
trans.fi = UI/Contacts/Finnish.lproj/Localizable.strings
trans.fr = UI/Contacts/French.lproj/Localizable.strings
trans.hr_HR = UI/Contacts/Croatian.lproj/Localizable.strings
trans.hu = UI/Contacts/Hungarian.lproj/Localizable.strings
trans.is = UI/Contacts/Icelandic.lproj/Localizable.strings
trans.it = UI/Contacts/Italian.lproj/Localizable.strings
trans.lt = UI/Contacts/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/Contacts/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/Contacts/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/Contacts/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/Contacts/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/Contacts/Polish.lproj/Localizable.strings
trans.pt = UI/Contacts/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/Contacts/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/Contacts/Russian.lproj/Localizable.strings
trans.sk = UI/Contacts/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/Contacts/Slovenian.lproj/Localizable.strings
trans.sv = UI/Contacts/Swedish.lproj/Localizable.strings
trans.uk = UI/Contacts/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/Contacts/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-administrationui]
source_file = UI/AdministrationUI/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/AdministrationUI/<lang>.lproj/Localizable.strings
[sogo.ui-mainui]
source_file = UI/MainUI/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/MainUI/Arabic.lproj/Localizable.strings
trans.ca = UI/MainUI/Catalan.lproj/Localizable.strings
trans.cs = UI/MainUI/Czech.lproj/Localizable.strings
trans.cy = UI/MainUI/Welsh.lproj/Localizable.strings
trans.da_DK = UI/MainUI/Danish.lproj/Localizable.strings
trans.de = UI/MainUI/German.lproj/Localizable.strings
trans.es_AR = UI/MainUI/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/MainUI/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/MainUI/Basque.lproj/Localizable.strings
trans.fi = UI/MainUI/Finnish.lproj/Localizable.strings
trans.fr = UI/MainUI/French.lproj/Localizable.strings
trans.hr_HR = UI/MainUI/Croatian.lproj/Localizable.strings
trans.hu = UI/MainUI/Hungarian.lproj/Localizable.strings
trans.is = UI/MainUI/Icelandic.lproj/Localizable.strings
trans.it = UI/MainUI/Italian.lproj/Localizable.strings
trans.lt = UI/MainUI/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/MainUI/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/MainUI/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/MainUI/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/MainUI/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/MainUI/Polish.lproj/Localizable.strings
trans.pt = UI/MainUI/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/MainUI/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/MainUI/Russian.lproj/Localizable.strings
trans.sk = UI/MainUI/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/MainUI/Slovenian.lproj/Localizable.strings
trans.sv = UI/MainUI/Swedish.lproj/Localizable.strings
trans.uk = UI/MainUI/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/MainUI/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-common]
source_file = UI/Common/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/Common/<lang>.lproj/Localizable.strings
[sogo.ui-common]
source_file = UI/Common/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/Common/Arabic.lproj/Localizable.strings
trans.ca = UI/Common/Catalan.lproj/Localizable.strings
trans.cs = UI/Common/Czech.lproj/Localizable.strings
trans.cy = UI/Common/Welsh.lproj/Localizable.strings
trans.da_DK = UI/Common/Danish.lproj/Localizable.strings
trans.de = UI/Common/German.lproj/Localizable.strings
trans.es_AR = UI/Common/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/Common/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/Common/Basque.lproj/Localizable.strings
trans.fi = UI/Common/Finnish.lproj/Localizable.strings
trans.fr = UI/Common/French.lproj/Localizable.strings
trans.hr_HR = UI/Common/Croatian.lproj/Localizable.strings
trans.hu = UI/Common/Hungarian.lproj/Localizable.strings
trans.is = UI/Common/Icelandic.lproj/Localizable.strings
trans.it = UI/Common/Italian.lproj/Localizable.strings
trans.lt = UI/Common/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/Common/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/Common/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/Common/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/Common/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/Common/Polish.lproj/Localizable.strings
trans.pt = UI/Common/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/Common/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/Common/Russian.lproj/Localizable.strings
trans.sk = UI/Common/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/Common/Slovenian.lproj/Localizable.strings
trans.sv = UI/Common/Swedish.lproj/Localizable.strings
trans.uk = UI/Common/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/Common/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-contacts]
source_file = UI/Contacts/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/Contacts/<lang>.lproj/Localizable.strings
[sogo.ui-administrationui]
source_file = UI/AdministrationUI/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/AdministrationUI/Arabic.lproj/Localizable.strings
trans.ca = UI/AdministrationUI/Catalan.lproj/Localizable.strings
trans.cs = UI/AdministrationUI/Czech.lproj/Localizable.strings
trans.cy = UI/AdministrationUI/Welsh.lproj/Localizable.strings
trans.da_DK = UI/AdministrationUI/Danish.lproj/Localizable.strings
trans.de = UI/AdministrationUI/German.lproj/Localizable.strings
trans.es_AR = UI/AdministrationUI/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/AdministrationUI/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/AdministrationUI/Basque.lproj/Localizable.strings
trans.fi = UI/AdministrationUI/Finnish.lproj/Localizable.strings
trans.fr = UI/AdministrationUI/French.lproj/Localizable.strings
trans.hr_HR = UI/AdministrationUI/Croatian.lproj/Localizable.strings
trans.hu = UI/AdministrationUI/Hungarian.lproj/Localizable.strings
trans.is = UI/AdministrationUI/Icelandic.lproj/Localizable.strings
trans.it = UI/AdministrationUI/Italian.lproj/Localizable.strings
trans.lt = UI/AdministrationUI/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/AdministrationUI/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/AdministrationUI/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/AdministrationUI/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/AdministrationUI/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/AdministrationUI/Polish.lproj/Localizable.strings
trans.pt = UI/AdministrationUI/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/AdministrationUI/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/AdministrationUI/Russian.lproj/Localizable.strings
trans.sk = UI/AdministrationUI/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/AdministrationUI/Slovenian.lproj/Localizable.strings
trans.sv = UI/AdministrationUI/Swedish.lproj/Localizable.strings
trans.uk = UI/AdministrationUI/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/AdministrationUI/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-mailerui]
source_file = UI/MailerUI/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/MailerUI/<lang>.lproj/Localizable.strings
[sogo.soobjects-appointments]
source_file = SoObjects/Appointments/English.lproj/Localizable.strings
source_lang = en
trans.ar = SoObjects/Appointments/Arabic.lproj/Localizable.strings
trans.ca = SoObjects/Appointments/Catalan.lproj/Localizable.strings
trans.cs = SoObjects/Appointments/Czech.lproj/Localizable.strings
trans.cy = SoObjects/Appointments/Welsh.lproj/Localizable.strings
trans.da_DK = SoObjects/Appointments/Danish.lproj/Localizable.strings
trans.de = SoObjects/Appointments/German.lproj/Localizable.strings
trans.es_AR = SoObjects/Appointments/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = SoObjects/Appointments/SpanishSpain.lproj/Localizable.strings
trans.eu = SoObjects/Appointments/Basque.lproj/Localizable.strings
trans.fi = SoObjects/Appointments/Finnish.lproj/Localizable.strings
trans.fr = SoObjects/Appointments/French.lproj/Localizable.strings
trans.hr_HR = SoObjects/Appointments/Croatian.lproj/Localizable.strings
trans.hu = SoObjects/Appointments/Hungarian.lproj/Localizable.strings
trans.is = SoObjects/Appointments/Icelandic.lproj/Localizable.strings
trans.it = SoObjects/Appointments/Italian.lproj/Localizable.strings
trans.lt = SoObjects/Appointments/Lithuanian.lproj/Localizable.strings
trans.mk_MK = SoObjects/Appointments/Macedonian.lproj/Localizable.strings
trans.nb_NO = SoObjects/Appointments/NorwegianBokmal.lproj/Localizable.strings
trans.nl = SoObjects/Appointments/Dutch.lproj/Localizable.strings
trans.nn_NO = SoObjects/Appointments/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = SoObjects/Appointments/Polish.lproj/Localizable.strings
trans.pt = SoObjects/Appointments/Portuguese.lproj/Localizable.strings
trans.pt_BR = SoObjects/Appointments/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = SoObjects/Appointments/Russian.lproj/Localizable.strings
trans.sk = SoObjects/Appointments/Slovak.lproj/Localizable.strings
trans.sl_SI = SoObjects/Appointments/Slovenian.lproj/Localizable.strings
trans.sv = SoObjects/Appointments/Swedish.lproj/Localizable.strings
trans.uk = SoObjects/Appointments/Ukrainian.lproj/Localizable.strings
trans.zh_TW = SoObjects/Appointments/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-mailpartviewers]
source_file = UI/MailPartViewers/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/MailPartViewers/<lang>.lproj/Localizable.strings
[sogo.soobjects-contacts]
source_file = SoObjects/Contacts/English.lproj/Localizable.strings
source_lang = en
trans.ar = SoObjects/Contacts/Arabic.lproj/Localizable.strings
trans.ca = SoObjects/Contacts/Catalan.lproj/Localizable.strings
trans.cs = SoObjects/Contacts/Czech.lproj/Localizable.strings
trans.cy = SoObjects/Contacts/Welsh.lproj/Localizable.strings
trans.da_DK = SoObjects/Contacts/Danish.lproj/Localizable.strings
trans.de = SoObjects/Contacts/German.lproj/Localizable.strings
trans.es_AR = SoObjects/Contacts/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = SoObjects/Contacts/SpanishSpain.lproj/Localizable.strings
trans.eu = SoObjects/Contacts/Basque.lproj/Localizable.strings
trans.fi = SoObjects/Contacts/Finnish.lproj/Localizable.strings
trans.fr = SoObjects/Contacts/French.lproj/Localizable.strings
trans.hr_HR = SoObjects/Contacts/Croatian.lproj/Localizable.strings
trans.hu = SoObjects/Contacts/Hungarian.lproj/Localizable.strings
trans.is = SoObjects/Contacts/Icelandic.lproj/Localizable.strings
trans.it = SoObjects/Contacts/Italian.lproj/Localizable.strings
trans.lt = SoObjects/Contacts/Lithuanian.lproj/Localizable.strings
trans.mk_MK = SoObjects/Contacts/Macedonian.lproj/Localizable.strings
trans.nb_NO = SoObjects/Contacts/NorwegianBokmal.lproj/Localizable.strings
trans.nl = SoObjects/Contacts/Dutch.lproj/Localizable.strings
trans.nn_NO = SoObjects/Contacts/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = SoObjects/Contacts/Polish.lproj/Localizable.strings
trans.pt = SoObjects/Contacts/Portuguese.lproj/Localizable.strings
trans.pt_BR = SoObjects/Contacts/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = SoObjects/Contacts/Russian.lproj/Localizable.strings
trans.sk = SoObjects/Contacts/Slovak.lproj/Localizable.strings
trans.sl_SI = SoObjects/Contacts/Slovenian.lproj/Localizable.strings
trans.sv = SoObjects/Contacts/Swedish.lproj/Localizable.strings
trans.uk = SoObjects/Contacts/Ukrainian.lproj/Localizable.strings
trans.zh_TW = SoObjects/Contacts/ChineseTaiwan.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-mainui]
source_file = UI/MainUI/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/MainUI/<lang>.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-preferencesui]
source_file = UI/PreferencesUI/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/PreferencesUI/<lang>.lproj/Localizable.strings
[o:alinto:p:sogo:r:ui-scheduler]
source_file = UI/Scheduler/English.lproj/Localizable.strings
source_lang = en
file_filter = UI/Scheduler/<lang>.lproj/Localizable.strings
[sogo.soobjects-mailer]
source_file = SoObjects/Mailer/English.lproj/Localizable.strings
source_lang = en
trans.ar = SoObjects/Mailer/Arabic.lproj/Localizable.strings
trans.ca = SoObjects/Mailer/Catalan.lproj/Localizable.strings
trans.cs = SoObjects/Mailer/Czech.lproj/Localizable.strings
trans.cy = SoObjects/Mailer/Welsh.lproj/Localizable.strings
trans.da_DK = SoObjects/Mailer/Danish.lproj/Localizable.strings
trans.de = SoObjects/Mailer/German.lproj/Localizable.strings
trans.es_AR = SoObjects/Mailer/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = SoObjects/Mailer/SpanishSpain.lproj/Localizable.strings
trans.eu = SoObjects/Mailer/Basque.lproj/Localizable.strings
trans.fi = SoObjects/Mailer/Finnish.lproj/Localizable.strings
trans.fr = SoObjects/Mailer/French.lproj/Localizable.strings
trans.hr_HR = SoObjects/Mailer/Croatian.lproj/Localizable.strings
trans.hu = SoObjects/Mailer/Hungarian.lproj/Localizable.strings
trans.is = SoObjects/Mailer/Icelandic.lproj/Localizable.strings
trans.it = SoObjects/Mailer/Italian.lproj/Localizable.strings
trans.lt = SoObjects/Mailer/Lithuanian.lproj/Localizable.strings
trans.mk_MK = SoObjects/Mailer/Macedonian.lproj/Localizable.strings
trans.nb_NO = SoObjects/Mailer/NorwegianBokmal.lproj/Localizable.strings
trans.nl = SoObjects/Mailer/Dutch.lproj/Localizable.strings
trans.nn_NO = SoObjects/Mailer/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = SoObjects/Mailer/Polish.lproj/Localizable.strings
trans.pt = SoObjects/Mailer/Portuguese.lproj/Localizable.strings
trans.pt_BR = SoObjects/Mailer/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = SoObjects/Mailer/Russian.lproj/Localizable.strings
trans.sk = SoObjects/Mailer/Slovak.lproj/Localizable.strings
trans.sl_SI = SoObjects/Mailer/Slovenian.lproj/Localizable.strings
trans.sv = SoObjects/Mailer/Swedish.lproj/Localizable.strings
trans.uk = SoObjects/Mailer/Ukrainian.lproj/Localizable.strings
trans.zh_TW = SoObjects/Mailer/ChineseTaiwan.lproj/Localizable.strings
[sogo.ui-mailpartviewers]
source_file = UI/MailPartViewers/English.lproj/Localizable.strings
source_lang = en
trans.ar = UI/MailPartViewers/Arabic.lproj/Localizable.strings
trans.ca = UI/MailPartViewers/Catalan.lproj/Localizable.strings
trans.cs = UI/MailPartViewers/Czech.lproj/Localizable.strings
trans.cy = UI/MailPartViewers/Welsh.lproj/Localizable.strings
trans.da_DK = UI/MailPartViewers/Danish.lproj/Localizable.strings
trans.de = UI/MailPartViewers/German.lproj/Localizable.strings
trans.es_AR = UI/MailPartViewers/SpanishArgentina.lproj/Localizable.strings
trans.es_ES = UI/MailPartViewers/SpanishSpain.lproj/Localizable.strings
trans.eu = UI/MailPartViewers/Basque.lproj/Localizable.strings
trans.fi = UI/MailPartViewers/Finnish.lproj/Localizable.strings
trans.fr = UI/MailPartViewers/French.lproj/Localizable.strings
trans.hr_HR = UI/MailPartViewers/Croatian.lproj/Localizable.strings
trans.hu = UI/MailPartViewers/Hungarian.lproj/Localizable.strings
trans.is = UI/MailPartViewers/Icelandic.lproj/Localizable.strings
trans.it = UI/MailPartViewers/Italian.lproj/Localizable.strings
trans.lt = UI/MailPartViewers/Lithuanian.lproj/Localizable.strings
trans.mk_MK = UI/MailPartViewers/Macedonian.lproj/Localizable.strings
trans.nb_NO = UI/MailPartViewers/NorwegianBokmal.lproj/Localizable.strings
trans.nl = UI/MailPartViewers/Dutch.lproj/Localizable.strings
trans.nn_NO = UI/MailPartViewers/NorwegianNynorsk.lproj/Localizable.strings
trans.pl = UI/MailPartViewers/Polish.lproj/Localizable.strings
trans.pt = UI/MailPartViewers/Portuguese.lproj/Localizable.strings
trans.pt_BR = UI/MailPartViewers/BrazilianPortuguese.lproj/Localizable.strings
trans.ru = UI/MailPartViewers/Russian.lproj/Localizable.strings
trans.sk = UI/MailPartViewers/Slovak.lproj/Localizable.strings
trans.sl_SI = UI/MailPartViewers/Slovenian.lproj/Localizable.strings
trans.sv = UI/MailPartViewers/Swedish.lproj/Localizable.strings
trans.uk = UI/MailPartViewers/Ukrainian.lproj/Localizable.strings
trans.zh_TW = UI/MailPartViewers/ChineseTaiwan.lproj/Localizable.strings
-27
View File
@@ -1,27 +0,0 @@
const tracker = {
filename: "Version",
updater: require("./Scripts/standard-version-updater.js")
}
module.exports = {
tagPrefix: "SOGo-",
issueUrlFormat: "https://bugs.sogo.nu/view.php?id={{id}}",
compareUrlFormat: "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
types: [
{type: "feat", section: "Features"},
{type: "refactor", section: "Enhancements"},
{type: "perf", section: "Enhancements"},
{type: "i18n", section: "Localization"},
{type: "fix", section: "Bug Fixes"},
{type: "chore", hidden: true},
{type: "docs", hidden: true},
{type: "style", hidden: true},
{type: "test", hidden: true}
],
skip: {
commit: true,
tag: true
},
packageFiles: [tracker],
bumpFiles: [tracker]
}
+1
View File
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __NGDOMELEMENTACTIVESYNC_H__
#import <DOM/DOMElement.h>
#import <DOM/DOMProtocols.h>
@class NSDictionary;
+2 -40
View File
@@ -34,7 +34,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/NSString.h>
static NSArray *asElementArray = nil;
static NSArray *considerAsSameArray = nil;
@implementation NGDOMElement (ActiveSync)
@@ -102,44 +101,7 @@ static NSArray *considerAsSameArray = nil;
int i, count;
if (!asElementArray)
asElementArray = [[NSArray alloc] initWithObjects: @"Attendee", @"Category", @"Exception", @"Add", @"Delete", nil];
// FIXME
/* if the client sends
<attachments>
<add>
...
</add>
<add>
...
</add>
</attachments>
the result is a NSarray i.e. {add1; add2; ...}
if the client sends
<attachments>
<add>
...
</add>
<add>
...
</add>
<delete>
...
</delete>
<delete>
...
</delete>
</attachments>
the result is a NSDictionary ie. Add = { }; Delete = { }; the dictionary would contain only one entry for add
*/
if (!considerAsSameArray)
considerAsSameArray = [[NSArray alloc] initWithObjects: @"Add", @"Delete", nil];
asElementArray = [[NSArray alloc] initWithObjects: @"Attendee", @"Category", @"Exception", nil];
data = [NSMutableDictionary dictionary];
@@ -189,7 +151,7 @@ the result is a NSDictionary ie. Add = { }; Delete = { }; the dictionary would c
if (!innerTag)
innerTag = [innerElement tagName];
if ([innerTag isEqualToString: [innerElement tagName]] || [considerAsSameArray containsObject: innerTag])
if ([innerTag isEqualToString: [innerElement tagName]])
{
if ([(id)innerElement isTextNode])
[innerElements addObject: [(NGDOMElement *)innerElement textValue]];
+1 -1
View File
@@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@interface NGMimeMessage (ActiveSync)
- (NSArray *) allBareRecipients;
- (NSArray *) allRecipients;
@end
+22 -28
View File
@@ -30,6 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "NGMimeMessage+ActiveSync.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <NGMail/NGMailAddress.h>
#import <NGMail/NGMailAddressParser.h>
@@ -38,47 +40,39 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@implementation NGMimeMessage (ActiveSync)
- (NSArray *) allRecipients
- (void) _addRecipients: (NSEnumerator *) enumerator
toArray: (NSMutableArray *) recipients
{
NGMailAddressParser *parser;
NSEnumerator *addressList;
NSMutableArray *allRecipients;
NGMailAddress *address;
NSEnumerator *recipients;
NSString *s;
NSString *fieldNames[] = {@"to", @"cc", @"bcc"};
unsigned int count;
allRecipients = [NSMutableArray arrayWithCapacity: 16];
for (count = 0; count < 3; count++)
while ((s = [enumerator nextObject]))
{
recipients = [[self headersForKey: fieldNames[count]] objectEnumerator];
while ((s = [recipients nextObject]))
{
parser = [NGMailAddressParser mailAddressParserWithString: s];
addressList = [[parser parseAddressList] objectEnumerator];
while ((address = [addressList nextObject]))
[allRecipients addObject: [address address]];
}
parser = [NGMailAddressParser mailAddressParserWithString: s];
addressList = [[parser parseAddressList] objectEnumerator];
while ((address = [addressList nextObject]))
[recipients addObject: [address address]];
}
return allRecipients;
}
- (NSArray *) allBareRecipients
- (NSArray *) allRecipients
{
NSMutableArray *bareRecipients;
NSEnumerator *allRecipients;
NSString *recipient;
NSMutableArray *recipients;
bareRecipients = [NSMutableArray array];
recipients = [NSMutableArray array];
allRecipients = [[self allRecipients] objectEnumerator];
while ((recipient = [allRecipients nextObject]))
[bareRecipients addObject: [recipient pureEMailAddress]];
[self _addRecipients: [[self headersForKey: @"to"] objectEnumerator]
toArray: recipients];
return bareRecipients;
[self _addRecipients: [[self headersForKey: @"cc"] objectEnumerator]
toArray: recipients];
[self _addRecipients: [[self headersForKey: @"bcc"] objectEnumerator]
toArray: recipients];
return recipients;
}
@end
+21 -135
View File
@@ -29,12 +29,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "NGVCard+ActiveSync.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGExtensions/NSString+misc.h>
#import <NGCards/CardElement.h>
#import <Contacts/NGVCard+SOGo.h>
#import <SOGo/NSString+Utilities.h>
@@ -83,8 +87,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSArray *emails, *addresses, *categories, *elements;
NSMutableArray *other_addresses;
CardElement *n, *homeAdr, *workAdr, *otherAdr;
CardElement *n, *homeAdr, *workAdr;
NSMutableString *s, *a;
NSString *url;
id o;
@@ -99,19 +102,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ((o = [n flattenedValueAtIndex: 1 forKey: @""]))
[s appendFormat: @"<FirstName xmlns=\"Contacts:\">%@</FirstName>", [o activeSyncRepresentationInContext: context]];
if ((o = [n flattenedValueAtIndex: 2 forKey: @""]))
[s appendFormat: @"<MiddleName xmlns=\"Contacts:\">%@</MiddleName>", [o activeSyncRepresentationInContext: context]];
if ((o = [n flattenedValueAtIndex: 3 forKey: @""]))
[s appendFormat: @"<Title xmlns=\"Contacts:\">%@</Title>", [o activeSyncRepresentationInContext: context]];
if ((o = [n flattenedValueAtIndex: 4 forKey: @""]))
[s appendFormat: @"<Suffix xmlns=\"Contacts:\">%@</Suffix>", [o activeSyncRepresentationInContext: context]];
if ((o = [self fn]))
[s appendFormat: @"<FileAs xmlns=\"Contacts:\">%@</FileAs>", [o activeSyncRepresentationInContext: context]];
if ((o = [self workCompany]))
[s appendFormat: @"<CompanyName xmlns=\"Contacts:\">%@</CompanyName>", [o activeSyncRepresentationInContext: context]];
@@ -151,7 +142,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<JobTitle xmlns=\"Contacts:\">%@</JobTitle>", [o activeSyncRepresentationInContext: context]];
if ((o = [self preferredEMail]))
[s appendFormat: @"<Email1Address xmlns=\"Contacts:\">%@</Email1Address>", [o activeSyncRepresentationInContext: context]];
[s appendFormat: @"<Email1Address xmlns=\"Contacts:\">%@</Email1Address>", o];
// Secondary email addresses (2 and 3)
@@ -161,7 +152,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
o = [[emails objectAtIndex: i] flattenedValuesForKey: @""];
[s appendFormat: @"<Email%dAddress xmlns=\"Contacts:\">%@</Email%dAddress>", i+2, [o activeSyncRepresentationInContext: context], i+2];
[s appendFormat: @"<Email%dAddress xmlns=\"Contacts:\">%@</Email%dAddress>", i+2, o, i+2];
if (i == 1)
break;
@@ -194,12 +185,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
a = [NSMutableString string];
if ((o = [homeAdr flattenedValueAtIndex: 2 forKey: @""]))
[a appendString: [o activeSyncRepresentationInContext: context]];
[a appendString: o];
if ((o = [homeAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length])
[a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]];
[a appendFormat: @"\n%@", o];
[s appendFormat: @"<HomeStreet xmlns=\"Contacts:\">%@</HomeStreet>", a];
[s appendFormat: @"<HomeStreet xmlns=\"Contacts:\">%@</HomeStreet>", [a activeSyncRepresentationInContext: context]];
if ((o = [homeAdr flattenedValueAtIndex: 3 forKey: @""]))
[s appendFormat: @"<HomeCity xmlns=\"Contacts:\">%@</HomeCity>", [o activeSyncRepresentationInContext: context]];
@@ -225,12 +216,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
a = [NSMutableString string];
if ((o = [workAdr flattenedValueAtIndex: 2 forKey: @""]))
[a appendString: [o activeSyncRepresentationInContext: context]];
[a appendString: o];
if ((o = [workAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length])
[a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]];
[a appendFormat: @"\n%@", o];
[s appendFormat: @"<BusinessStreet xmlns=\"Contacts:\">%@</BusinessStreet>", a];
[s appendFormat: @"<BusinessStreet xmlns=\"Contacts:\">%@</BusinessStreet>", [a activeSyncRepresentationInContext: context]];
if ((o = [workAdr flattenedValueAtIndex: 3 forKey: @""]))
[s appendFormat: @"<BusinessCity xmlns=\"Contacts:\">%@</BusinessCity>", [o activeSyncRepresentationInContext: context]];
@@ -245,39 +236,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<BusinessCountry xmlns=\"Contacts:\">%@</BusinessCountry>", [o activeSyncRepresentationInContext: context]];
}
// Other Address
other_addresses = [[self childrenWithTag: @"adr"] mutableCopy];
[other_addresses removeObjectsInArray: [self childrenWithTag: @"adr" andAttribute: @"type" havingValue: @"work"]];
[other_addresses removeObjectsInArray: [self childrenWithTag: @"adr" andAttribute: @"type" havingValue: @"home"]];
if ([other_addresses count])
{
otherAdr = [other_addresses objectAtIndex: 0];
a = [NSMutableString string];
if ((o = [otherAdr flattenedValueAtIndex: 2 forKey: @""]))
[a appendString: [o activeSyncRepresentationInContext: context]];
if ((o = [otherAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length])
[a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]];
[s appendFormat: @"<OtherStreet xmlns=\"Contacts:\">%@</OtherStreet>", a];
if ((o = [otherAdr flattenedValueAtIndex: 3 forKey: @""]))
[s appendFormat: @"<OtherCity xmlns=\"Contacts:\">%@</OtherCity>", [o activeSyncRepresentationInContext: context]];
if ((o = [otherAdr flattenedValueAtIndex: 4 forKey: @""]))
[s appendFormat: @"<OtherState xmlns=\"Contacts:\">%@</OtherState>", [o activeSyncRepresentationInContext: context]];
if ((o = [otherAdr flattenedValueAtIndex: 5 forKey: @""]))
[s appendFormat: @"<OtherPostalCode xmlns=\"Contacts:\">%@</OtherPostalCode>", [o activeSyncRepresentationInContext: context]];
if ((o = [otherAdr flattenedValueAtIndex: 6 forKey: @""]))
[s appendFormat: @"<OtherCountry xmlns=\"Contacts:\">%@</OtherCountry>", [o activeSyncRepresentationInContext: context]];
}
// Other, less important fields
if ((o = [self birthday]))
{
@@ -313,11 +271,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
inContext: (WOContext *) context
{
CardElement *element;
NSMutableArray *addressLines, *other_addresses;
id o, l, m, f, p, s;
l = m = f = p = s = nil;
NSMutableArray *addressLines;
id o;
// Contact's note
if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"]))
[self setNote: o];
@@ -446,63 +402,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
atIndex: 6 forKey: @""];
}
// OtherCountry
//
other_addresses = [[self childrenWithTag: @"adr"] mutableCopy];
[other_addresses removeObjectsInArray: [self childrenWithTag: @"adr" andAttribute: @"type" havingValue: @"work"]];
[other_addresses removeObjectsInArray: [self childrenWithTag: @"adr" andAttribute: @"type" havingValue: @"home"]];
if ([other_addresses count])
element = [other_addresses objectAtIndex: 0];
else
{
element = [CardElement elementWithTag: @"adr"];
[self addChild: element];
}
if ((o = [theValues objectForKey: @"OtherStreet"]) || ![self _isGhosted: @"OtherStreet" inContext: context])
{
addressLines = [NSMutableArray arrayWithArray: [o componentsSeparatedByString: @"\n"]];
[element setSingleValue: @""
atIndex: 1 forKey: @""];
[element setSingleValue: [addressLines count] ? [addressLines objectAtIndex: 0] : @""
atIndex: 2 forKey: @""];
// Extended address line. If there are more then 2 address lines we add them to the extended address line.
if ([addressLines count] > 1)
{
[addressLines removeObjectAtIndex: 0];
[element setSingleValue: [addressLines componentsJoinedByString: @" "]
atIndex: 1 forKey: @""];
}
}
if ((o = [theValues objectForKey: @"OtherCity"]) || ![self _isGhosted: @"OtherCity" inContext: context])
{
[element setSingleValue: [theValues objectForKey: @"OtherCity"]
atIndex: 3 forKey: @""];
}
if ((o = [theValues objectForKey: @"OtherState"]) || ![self _isGhosted: @"OtherState" inContext: context])
{
[element setSingleValue: [theValues objectForKey: @"OtherState"]
atIndex: 4 forKey: @""];
}
if ((o = [theValues objectForKey: @"OtherPostalCode"]) || ![self _isGhosted: @"OtherPostalCode" inContext: context])
{
[element setSingleValue: [theValues objectForKey: @"OtherPostalCode"]
atIndex: 5 forKey: @""];
}
if ((o = [theValues objectForKey: @"OtherCountry"]) || ![self _isGhosted: @"OtherCountry" inContext: context])
{
[element setSingleValue: [theValues objectForKey: @"OtherCountry"]
atIndex: 6 forKey: @""];
}
// Company's name
if ((o = [theValues objectForKey: @"CompanyName"]))
[self setOrg: o units: nil];
@@ -543,23 +442,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ((o = [theValues objectForKey: @"FileAs"]) || ![self _isGhosted: @"FileAs" inContext: context])
[self setFn: [theValues objectForKey: @"FileAs"]];
if ((o = [theValues objectForKey: @"LastName"]) || ![self _isGhosted: @"LastName" inContext: context])
l = o ? o : @"";
if ((o = [theValues objectForKey: @"FirstName"]) || ![self _isGhosted: @"FirstName" inContext: context])
f = o ? o : @"";
if ((o = [theValues objectForKey: @"MiddleName"]) || ![self _isGhosted: @"MiddleName" inContext: context])
m = o ? o : @"";
if ((o = [theValues objectForKey: @"Title"]) || ![self _isGhosted: @"Title" inContext: context])
p = o ? o : @"";
if ((o = [theValues objectForKey: @"Suffix"]) || ![self _isGhosted: @"Suffix" inContext: context])
s = o ? o : @"";
[self setNWithFamily: l given: f additional: m prefixes: p suffixes: s];
[self setNWithFamily: [theValues objectForKey: @"LastName"]
given: [theValues objectForKey: @"FirstName"]
additional: nil prefixes: nil suffixes: nil];
// IM information
if ((o = [theValues objectForKey: @"IMAddress"]) || ![self _isGhosted: @"IMAddress" inContext: context])
[[self uniqueChildWithTag: @"x-aim"]
+1
View File
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "NSCalendarDate+ActiveSync.h"
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#define ONE_DAY 86400
+6 -3
View File
@@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "NSData+ActiveSync.h"
#import <Foundation/NSProcessInfo.h>
#import <Foundation/NSString.h>
#import <SOGo/SOGoSystemDefaults.h>
@@ -37,6 +38,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <NGExtensions/NSObject+Logs.h>
#include <wbxml/wbxml.h>
#include <wbxml/wbxml_conv.h>
#include <wbxml/wbxml_errors.h>
#define WBXMLDEBUG 0
@@ -114,7 +117,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (ret != WBXML_OK)
{
[self errorWithFormat: @"wbxml2xml failed: %s\n", wbxml_errors_string(ret)];
[self errorWithFormat: @"wbxml2xmlFromContent: failed: %s\n", wbxml_errors_string(ret)];
[self _dumpToFile];
return nil;
}
@@ -147,7 +150,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (ret != WBXML_OK)
{
[self logWithFormat: @"xml2wbxml failed: %s\n", wbxml_errors_string(ret)];
[self logWithFormat: @"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)];
[self _dumpToFile];
return nil;
}
@@ -162,7 +165,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (ret != WBXML_OK)
{
[self errorWithFormat: @"xml2wbxml failed: %s\n", wbxml_errors_string(ret)];
[self errorWithFormat: @"xml2wbxmlFromContent: failed: %s\n", wbxml_errors_string(ret)];
[self _dumpToFile];
free(wbxml);
wbxml_conv_xml2wbxml_destroy(conv);
+1 -1
View File
@@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define __NSSTRINGACTIVESYNC_H__
#import <Foundation/NSString.h>
#include "SOGoActiveSyncConstants.h"
@class NSCalendarDate;
@@ -52,7 +53,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSString *) itemid;
- (BOOL) acceptsMultiPart;
- (NSData *) convertHexStringToBytes;
- (NSString *) protocolVersion;
@end
+4 -31
View File
@@ -31,6 +31,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <Foundation/NSArray.h>
#include <Foundation/NSCalendarDate.h>
#include <Foundation/NSData.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSTimeZone.h>
#include <SOGo/NSString+Utilities.h>
#include <SOGo/NSData+Crypto.h>
@@ -135,31 +138,6 @@ static NSArray *easCommandParameters = nil;
return o;
}
- (NSString *) protocolVersion
{
NSMutableArray *components;
components = [NSMutableArray arrayWithArray: [[[self componentsSeparatedByString: @"?"] lastObject] componentsSeparatedByString: @"&"]];
// We handle BASE64 encoded queryStrings. See http://msdn.microsoft.com/en-us/library/ee160227%28v=exchg.80%29.aspx for details.
if ([components count] == 1)
{
NSData *queryString;
const char* qs_bytes;
queryString = [[components objectAtIndex: 0] dataByDecodingBase64];
if (![queryString length])
return nil;
qs_bytes = (const char*)[queryString bytes];
return [NSString stringWithFormat:@"%.1f", (float)((uint8_t)qs_bytes[0]/10)];
}
return nil;
}
- (NSString *) _valueForParameter: (NSString *) theParameter
{
NSMutableArray *components;
@@ -200,11 +178,6 @@ static NSArray *easCommandParameters = nil;
// Command code, 1 byte, ie.: cmd=
cmd_code = qs_bytes[1];
// Check whether the command code is within the known range.
if (cmd_code < 0 || cmd_code > 22)
return nil;
[components addObject: [NSString stringWithFormat: @"cmd=%@", [easCommandCodes objectAtIndex: cmd_code]]];
// Device ID length and Device ID (variable)
@@ -234,7 +207,7 @@ static NSArray *easCommandParameters = nil;
// parameter_code 7 == Options
// http://msdn.microsoft.com/en-us/library/ee237789(v=exchg.80).aspx
if (parameter_code == 7 && ! [parameterValue isEqualToString: @"\000"] )
if (parameter_code == 7)
[components addObject: [NSString stringWithFormat: @"%@=%@", [easCommandParameters objectAtIndex: parameter_code],
([parameterValue isEqualToString: @"\001"]) ? @"SaveInSent" : @"AcceptMultiPart"]];
else
@@ -33,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "SOGoActiveSyncDispatcher.h"
#import <DOM/DOMElement.h>
#import <DOM/DOMProtocols.h>
@class WOResponse;
File diff suppressed because it is too large. Load diff
-1
View File
@@ -27,7 +27,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <Foundation/NSObject.h>
#include "SOGoActiveSyncConstants.h"
File diff suppressed because it is too large. Load diff
-3
View File
@@ -42,9 +42,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context;
- (void) takeActiveSyncValues: (NSDictionary *) theValues
inContext: (WOContext *) context;
- (NSString *) storeMail: (NSDictionary *) theValues
inBuffer: (NSMutableString *) theBuffer
inContext: (WOContext *) _context;
@end
+68 -443
View File
@@ -29,45 +29,40 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "SOGoMailObject+ActiveSync.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSCharacterSet.h>
#import <Foundation/NSTimeZone.h>
#import <Foundation/NSValue.h>
#import <NGCards/iCalCalendar.h>
#import <NGCards/iCalDateTime.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalPerson.h>
#import <NGCards/iCalTimeZone.h>
#import <NGExtensions/NGBase64Coding.h>
#import <NGExtensions/NGQuotedPrintableCoding.h>
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSString+Encoding.h>
#import <NGExtensions/NGHashMap.h>
#import <NGImap4/NGImap4Envelope.h>
#import <NGImap4/NGImap4EnvelopeAddress.h>
#import <NGImap4/NSString+Imap4.h>
#import <NGImap4/NGImap4Connection.h>
#import <NGImap4/NGImap4Client.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WOApplication.h>
#import <NGObjWeb/WORequest.h>
#import <NGMime/NGMimeBodyPart.h>
#import <NGMime/NGMimeFileData.h>
#import <NGMime/NGMimeMultipartBody.h>
#import <NGMime/NGMimeType.h>
#import <NGMime/NGMimeHeaderFields.h>
#import <NGMail/NGMimeMessageParser.h>
#import <NGMail/NGMimeMessage.h>
#import <NGMail/NGMimeMessageGenerator.h>
#import <Mailer/SOGoMailLabel.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/NSArray+Utilities.h>
#include "iCalTimeZone+ActiveSync.h"
#include "NSData+ActiveSync.h"
@@ -76,22 +71,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <Appointments/iCalEntityObject+SOGo.h>
#include <Appointments/iCalPerson+SOGo.h>
#include <Mailer/SOGoMailBodyPart.h>
#include <Mailer/NSString+Mail.h>
#import <Mailer/SOGoMailLabel.h>
#import <Mailer/SOGoMailFolder.h>
#import <Mailer/SOGoMailObject.h>
#import <Mailer/SOGoMailAccount.h>
#import <Mailer/SOGoMailAccounts.h>
#include <Mailer/SOGoMailBodyPart.h>
#include <SOGo/SOGoUser.h>
#include <SOGo/NSString+Utilities.h>
#import <Appointments/SOGoAptMailNotification.h>
unsigned char strToChar(char a, char b) {
char encoder[3] = {'\0','\0','\0'};
encoder[0] = a;
@@ -177,7 +163,7 @@ struct GlobalObjectId {
const char *bytes;
uid = [event uid];
uidAsASCII = [uid dataUsingEncoding: NSASCIIStringEncoding];
uidAsASCII = [uid decodeFromHexidecimal];
newGlobalId = (struct GlobalObjectId*)calloc(sizeof(uint8_t), sizeof(struct GlobalObjectId) + 0x0c + [uidAsASCII length]);
prefix = @"040000008200e00074c5b7101a82e008";
@@ -259,68 +245,6 @@ struct GlobalObjectId {
return rc;
}
//
//
//
- (NSString *) _personalNameFrom: (NSArray *) enveloppeAddresses
{
NGImap4EnvelopeAddress *address;
NSString *email, *rc, *name;
NSMutableArray *addresses;
int i, max;
rc = nil;
max = [enveloppeAddresses count];
if (max > 0)
{
addresses = [NSMutableArray array];
for (i = 0; i < max; i++)
{
address = [enveloppeAddresses objectAtIndex: i];
name = [address personalName];
email = [NSString stringWithFormat: @"%@", (name ? name : [address baseEMail])];
if (email)
[addresses addObject: email];
}
rc = [addresses componentsJoinedByString: @";"];
}
return rc;
}
// Format replyTo
//
// If there are multiple e-mail addresses, they are separated by a semi-colon.
- (NSString *) _replyToAddressesFrom: (NSArray *) enveloppeAddresses
{
NSMutableArray *addresses;
NSString *rc;
NGImap4EnvelopeAddress *address;
NSString *email;
int count, max;
rc = nil;
max = [enveloppeAddresses count];
if (max > 0)
{
addresses = [NSMutableArray array];
for (count = 0; count < max; count++)
{
address = [enveloppeAddresses objectAtIndex: count];
email = [NSString stringWithFormat: @"%@", [address email]];
[addresses addObject: email];
}
rc = [addresses componentsJoinedByString: @"; "];
}
return rc;
}
//
//
//
@@ -410,7 +334,7 @@ struct GlobalObjectId {
charset = [[[self lookupInfoForBodyPart: key] objectForKey: @"parameterList"] objectForKey: @"charset"];
if (![charset length] || [charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
if (![charset length])
charset = @"utf-8";
s = [NSString stringWithData: d usingEncodingNamed: charset];
@@ -457,7 +381,7 @@ struct GlobalObjectId {
body = [thePart body];
if ([body isKindOfClass: [NGMimeMultipartBody class]] || [body isKindOfClass: [NGMimeMessage class]])
if ([body isKindOfClass: [NGMimeMultipartBody class]])
{
[self _sanitizedMIMEPart: body
performed: b];
@@ -500,7 +424,7 @@ struct GlobalObjectId {
mimeType = [NGMimeType mimeType: [[thePart contentType] type]
subType: [[thePart contentType] subType]
parameters: [NSDictionary dictionaryWithObject: @"utf-8" forKey: @"charset"]];
[(NGMimeBodyPart *)thePart setHeader: mimeType forKey: @"content-type"];
[thePart setHeader: mimeType forKey: @"content-type"];
fdata = [[NGMimeFileData alloc] initWithBytes: [body bytes]
length: [body length]];
@@ -509,13 +433,6 @@ struct GlobalObjectId {
RELEASE(fdata);
*b = YES;
}
else if ([body isKindOfClass: [NSData class]])
{
[thePart setHeader: @"base64" forKey: @"content-transfer-encoding"];
[thePart setBody: [body dataByEncodingBase64]];
[thePart setHeader: [NSString stringWithFormat:@"%d", (int)[[thePart body] length]]
forKey: @"content-length"];
}
}
}
@@ -708,7 +625,7 @@ struct GlobalObjectId {
charset = [[[self lookupInfoForBodyPart: @""] objectForKey: @"parameterList"] objectForKey: @"charset"];
if (![charset length] || [charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
if (![charset length])
charset = @"utf-8";
d = [[self fetchPlainTextParts] objectForKey: @""];
@@ -799,75 +716,22 @@ struct GlobalObjectId {
break;
}
// If we didn't find a "space" character search again for &# to avoid
// truncating the content in the middle of a XML entity
if (i < 0)
{
for (i = len-2 ; i >= 0; i--)
{
if ([theContent characterAtIndex: i] == '&' && [theContent characterAtIndex: i+1] == '#')
break;
}
}
if (i >= 0)
return [theContent substringToIndex: i];
return [theContent substringToIndex: i];
}
*wasTruncated = 0;
return theContent;
}
//
//
//
- (iCalCalendar *) _calendarFromParts: (NSArray *) parts
parent: (id) parent
{
NSDictionary *part;
id bodyPart;
int i;
for (i = 0; i < [parts count]; i++)
{
part = [parts objectAtIndex: i];
bodyPart = [parent lookupImap4BodyPartKey: [NSString stringWithFormat: @"%d", i+1]
inContext: self->context];
if ([[part objectForKey: @"type"] isEqualToString: @"text"] &&
[[part objectForKey: @"subtype"] isEqualToString: @"calendar"])
{
if (bodyPart)
{
iCalCalendar *calendar;
NSData *calendarData;
calendarData = [bodyPart fetchBLOBWithPeek: YES];
calendar = nil;
NS_DURING
calendar = [iCalCalendar parseSingleFromSource: calendarData];
NS_HANDLER
calendar = nil;
NS_ENDHANDLER
return calendar;
}
}
else if ([[part objectForKey: @"type"] isEqualToString: @"multipart"])
return [self _calendarFromParts: [part objectForKey: @"parts"] parent: bodyPart];
}
return nil;
}
//
//
//
- (iCalCalendar *) calendarFromIMIPMessage
{
NSDictionary *part;
NSString *type, *subtype;
NSArray *parts;
int i;
type = [[[self bodyStructure] valueForKey: @"type"] lowercaseString];
subtype = [[[self bodyStructure] valueForKey: @"subtype"] lowercaseString];
@@ -900,7 +764,38 @@ struct GlobalObjectId {
parts = [[self bodyStructure] objectForKey: @"parts"];
if ([parts count] > 1)
return [self _calendarFromParts: parts parent: self];
{
for (i = 0; i < [parts count]; i++)
{
part = [parts objectAtIndex: i];
if ([[part objectForKey: @"type"] isEqualToString: @"text"] &&
[[part objectForKey: @"subtype"] isEqualToString: @"calendar"])
{
id bodyPart;
bodyPart = [self lookupImap4BodyPartKey: [NSString stringWithFormat: @"%d", i+1]
inContext: self->context];
if (bodyPart)
{
iCalCalendar *calendar;
NSData *calendarData;
calendarData = [bodyPart fetchBLOBWithPeek: YES];
calendar = nil;
NS_DURING
calendar = [iCalCalendar parseSingleFromSource: calendarData];
NS_HANDLER
calendar = nil;
NS_ENDHANDLER
return calendar;
}
}
}
}
return nil;
}
@@ -930,13 +825,7 @@ struct GlobalObjectId {
// If there are multiple e-mail addresses, they are separated by commas."
value = [self _emailAddressesFrom: [[self envelope] to]];
if (value)
{
[s appendFormat: @"<To xmlns=\"Email:\">%@</To>", [value activeSyncRepresentationInContext: context]];
// DisplayTo - If there are multiple display names, they are separated by semi-colons.
value = [self _personalNameFrom: [[self envelope] to]];
if (value)
[s appendFormat: @"<DisplayTo xmlns=\"Email:\">%@</DisplayTo>", [value activeSyncRepresentationInContext: context]];
}
[s appendFormat: @"<To xmlns=\"Email:\">%@</To>", [value activeSyncRepresentationInContext: context]];
// From
value = [self _emailAddressesFrom: [[self envelope] from]];
@@ -955,9 +844,10 @@ struct GlobalObjectId {
value = [self date];
if (value)
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationInContext: context]];
else
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [[NSDate date] activeSyncRepresentationInContext: context]];
// DisplayTo
[s appendFormat: @"<DisplayTo xmlns=\"Email:\">%@</DisplayTo>", [[context activeUser] login]];
// Cc - same syntax as the To field
value = [self _emailAddressesFrom: [[self envelope] cc]];
if (value)
@@ -1044,7 +934,7 @@ struct GlobalObjectId {
else if ([method isEqualToString: @"COUNTER"])
className = @"IPM.Schedule.Meeting.Resp.Tent";
else if ([method isEqualToString: @"CANCEL"])
className = @"IPM.Schedule.Meeting.Canceled";
className = @"IPM.Schedule.Meeting.Cancelled";
else
className = @"IPM.Appointment";
@@ -1058,7 +948,7 @@ struct GlobalObjectId {
if ([event startDate])
[s appendFormat: @"<StartTime xmlns=\"Email:\">%@</StartTime>", [[event startDate] activeSyncRepresentationInContext: context]];
if ([event timeStampAsDate] && [[event timeStampAsDate] dayOfMonth] > 0 && [[event timeStampAsDate] monthOfYear] > 0)
if ([event timeStampAsDate])
[s appendFormat: @"<DTStamp xmlns=\"Email:\">%@</DTStamp>", [[event timeStampAsDate] activeSyncRepresentationInContext: context]];
else if ([event created])
[s appendFormat: @"<DTStamp xmlns=\"Email:\">%@</DTStamp>", [[event created] activeSyncRepresentationInContext: context]];
@@ -1072,12 +962,7 @@ struct GlobalObjectId {
// Location
if ([[event location] length])
{
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 16.0)
[s appendFormat: @"<Location xmlns=\"AirSyncBase:\"><DisplayName>%@</DisplayName></Location>", [[event location] activeSyncRepresentationInContext: context]];
else
[s appendFormat: @"<Location xmlns=\"Email:\">%@</Location>", [[event location] activeSyncRepresentationInContext: context]];
}
[s appendFormat: @"<Location xmlns=\"Email:\">%@</Location>", [[event location] activeSyncRepresentationInContext: context]];
[s appendFormat: @"<Organizer xmlns=\"Email:\">%@</Organizer>", [[[event organizer] mailAddress] activeSyncRepresentationInContext: context]];
@@ -1118,7 +1003,7 @@ struct GlobalObjectId {
[s appendFormat: @"<GlobalObjId xmlns=\"Email:\">%@</GlobalObjId>", [globalObjId activeSyncRepresentationInContext: context]];
// We set the right message type - we must set AS version to 14.1 for this
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.1)
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.1"])
[s appendFormat: @"<MeetingMessageType xmlns=\"Email2:\">%d</MeetingMessageType>", 1];
[s appendString: @"</MeetingRequest>"];
@@ -1139,11 +1024,10 @@ struct GlobalObjectId {
[s appendFormat: @"<ContentClass xmlns=\"Email:\">%@</ContentClass>", @"urn:content-classes:message"];
}
// ReplyTo
value = [self _replyToAddressesFrom: [self replyToEnvelopeAddresses]];
if (value)
[s appendFormat: @"<Reply-To xmlns=\"Email:\">%@</Reply-To>", [value activeSyncRepresentationInContext: context]];
// Reply-To - FIXME
//NSArray *replyTo = [[message objectForKey: @"envelope"] replyTo];
//if ([replyTo count])
// [s appendFormat: @"<Reply-To xmlns=\"Email:\">%@</Reply-To>", [addressFormatter stringForArray: replyTo]];
// InternetCPID - 65001 == UTF-8, we use this all the time for now.
// - 20127 == US-ASCII
@@ -1285,7 +1169,7 @@ struct GlobalObjectId {
truncated = 0;
}
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
[s appendFormat: @"<Body xmlns=\"Email:\">%@</Body>", content];
[s appendFormat: @"<BodyTruncated xmlns=\"Email:\">%d</BodyTruncated>", truncated];
@@ -1305,22 +1189,10 @@ struct GlobalObjectId {
else
[s appendFormat: @"<Type>%d</Type>", preferredBodyType];
if ([[context objectForKey: @"MultiPartsLen"] isKindOfClass: [NSArray class]])
{
[[context objectForKey: @"MultiPartsLen"] addObject: [NSNumber numberWithInteger: [sanitizedData length]]];
[[context objectForKey: @"MultiParts"] appendData: sanitizedData];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
[s appendFormat: @"<Part xmlns=\"ItemOperations:\">%d</Part>", [[context objectForKey: @"MultiPartsLen"] count]];
}
else
{
[s appendFormat: @"<Truncated>%d</Truncated>", truncated];
[s appendFormat: @"<Preview></Preview>"];
[s appendFormat: @"<Data>%@</Data>", content];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
}
[s appendFormat: @"<Truncated>%d</Truncated>", truncated];
[s appendFormat: @"<Preview></Preview>"];
[s appendFormat: @"<Data>%@</Data>", content];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
[s appendString: @"</Body>"];
}
}
@@ -1332,7 +1204,7 @@ struct GlobalObjectId {
{
int i;
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
[s appendString: @"<Attachments xmlns=\"Email:\">"];
else
[s appendString: @"<Attachments xmlns=\"AirSyncBase:\">"];
@@ -1347,24 +1219,18 @@ struct GlobalObjectId {
// FileReference must be a unique identifier across the whole store. We use the following structure:
// mail/<foldername>/<message UID/<pathofpart>
// mail/INBOX/2
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
[s appendFormat: @"<AttName>mail/%@/%@/%@</AttName>", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]];
else
[s appendFormat: @"<FileReference>mail/%@/%@/%@</FileReference>", [[[self container] relativeImap4Name] stringByEscapingURL], [self nameInContainer], [value objectForKey: @"path"]];
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
[s appendFormat: @"<AttMethod>%d</AttMethod>", 1];
[s appendFormat: @"<AttSize>%d</AttSize>", [[value objectForKey: @"size"] intValue]];
}
else
{
if ([[value objectForKey: @"bodyId"] length])
{
[s appendFormat: @"<ContentId>%@</ContentId>", [[[value objectForKey: @"bodyId"] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString: @"<>"]] activeSyncRepresentationInContext: context]];
[s appendFormat: @"<IsInline>%d</IsInline>", 1];
}
[s appendFormat: @"<Method>%d</Method>", 1]; // See: http://msdn.microsoft.com/en-us/library/ee160322(v=exchg.80).aspx
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", [[value objectForKey: @"size"] intValue]];
//[s appendFormat: @"<IsInline>%d</IsInline>", 1];
@@ -1401,7 +1267,8 @@ struct GlobalObjectId {
[s appendFormat: @"</Categories>"];
}
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 14.0)
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.0"] ||
[[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"14.1"])
{
id value;
NSString *reference;
@@ -1419,13 +1286,6 @@ struct GlobalObjectId {
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[[self inReplyTo] dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
else if ([[self messageId] length] > 0)
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[[self messageId] dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
if ([self replied])
[s appendFormat: @"<LastVerbExecuted xmlns=\"Email2:\">%d</LastVerbExecuted>", 1];
else if ([self forwarded])
[s appendFormat: @"<LastVerbExecuted xmlns=\"Email2:\">%d</LastVerbExecuted>", 3];
else
[s appendFormat: @"<LastVerbExecuted xmlns=\"Email2:\">%d</LastVerbExecuted>", 0];
}
// FIXME - support these in the future
@@ -1550,239 +1410,4 @@ struct GlobalObjectId {
}
}
- (NSString *) storeMail: (NSDictionary *) theValues
inBuffer: (NSMutableString *) theBuffer
inContext: (WOContext *) _context
{
NSString *dateReceived, *folder, *s, *serverId, *messageId;
NGMimeMessageGenerator *generator;
NGMimeMessage *draftMessage;
NGMimeBodyPart *bodyPart;
NGMimeMultipartBody *body;
NSDictionary *identity;
NGMutableHashMap *map;
NGImap4Client *client;
NSData *message_data;
NSArray *attachmentKeys;
id o, a, result, attachments;
int bodyType, i;
identity = [[context activeUser] primaryIdentity];
message_data = nil;
bodyType = 1;
if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Type"]))
bodyType = [o intValue];
if (bodyType == 4)
{
s = [[theValues objectForKey: @"Body"] objectForKey: @"Data"];
message_data = [s dataUsingEncoding: NSUTF8StringEncoding];
}
if (bodyType == 1 || bodyType == 2)
{
map = [[[NGMutableHashMap alloc] initWithCapacity: 1] autorelease];
[map setObject: [NSString stringWithFormat: @"%@ <%@>", [identity objectForKey: @"fullName"], [identity objectForKey: @"email"]] forKey: @"from"];
if ((o = [theValues objectForKey: @"To"]))
[map setObject: o forKey: @"to"];
if ((o = [theValues objectForKey: @"Cc"]))
[map setObject: o forKey: @"cc"];
if ((o = [theValues objectForKey: @"Bcc"]))
[map setObject: o forKey: @"bcc"];
if ((o = [theValues objectForKey: @"Reply-To"]))
[map setObject: o forKey: @"Reply-To"];
if ((o = [theValues objectForKey: @"Subject"]))
[map setObject: o forKey: @"subject"];
o = [[theValues objectForKey: @"DateReceived"] calendarDate];
if (!o)
o = [NSCalendarDate date];
#if GNUSTEP_BASE_MINOR_VERSION < 21
dateReceived = [o descriptionWithCalendarFormat: @"%a, %d %b %Y %H:%M:%S %z"
timeZone: [NSTimeZone timeZoneWithName: @"GMT"]
locale: nil];
#else
dateReceived = [o descriptionWithCalendarFormat: @"%a, %d %b %Y %H:%M:%S %z"
timeZone: [NSTimeZone timeZoneWithName: @"GMT"]
locale: [NSDictionary dictionaryWithObjectsAndKeys:
[NSArray arrayWithObjects: @"Jan", @"Feb", @"Mar", @"Apr",
@"May", @"Jun", @"Jul", @"Aug",
@"Sep", @"Oct", @"Nov", @"Dec", nil],
@"NSShortMonthNameArray",
[NSArray arrayWithObjects: @"Sun", @"Mon", @"Tue", @"Wed", @"Thu",
@"Fri", @"Sat", nil],
@"NSShortWeekDayNameArray",
nil]];
#endif
[map setObject: dateReceived forKey: @"date"];
messageId = [NSString generateMessageID];
[map setObject: messageId forKey: @"message-id"];
attachmentKeys = [self fetchFileAttachmentKeys];
if ((attachments = [theValues objectForKey: @"Attachments"]) || [attachmentKeys count])
{
[map setObject: @"multipart/mixed" forKey: @"content-type"];
draftMessage = [[[NGMimeMessage alloc] initWithHeader: map] autorelease];
body = [[[NGMimeMultipartBody alloc] initWithPart: draftMessage] autorelease];
map = [[[NGMutableHashMap alloc] initWithCapacity: 1] autorelease];
[map setObject: (bodyType == 1 ? @"text/plain; charset=utf-8" : @"text/html; charset=utf-8")
forKey: @"content-type"];
[map setObject: @"quoted-printable" forKey: @"content-transfer-encoding"];
bodyPart = [[[NGMimeBodyPart alloc] initWithHeader:map] autorelease];
[bodyPart setBody: [[NSString stringWithFormat: @"%@", [[theValues objectForKey: @"Body"] objectForKey: @"Data"] ] dataUsingEncoding: NSUTF8StringEncoding]];
[body addBodyPart: bodyPart];
// Add attachments from the original mail - skip deletions
if ([attachmentKeys count])
{
id currentAttachment;
NGHashMap *response;
NSData *bodydata;
NSArray *paths;
NGMimeFileData *fdata;
int i, ii;
BOOL found;
paths = [attachmentKeys keysWithFormat: @"BODY[%{path}]"];
response = [[self fetchParts: paths] objectForKey: @"RawResponse"];
for (i = 0; i < [attachmentKeys count]; i++)
{
currentAttachment = [attachmentKeys objectAtIndex: i];
found = NO;
for (ii = 0; ii < [attachments count]; ii++)
{
// no ClientId means its a deletio
if (![[attachments objectAtIndex: ii] objectForKey: @"ClientId"] &&
[[[[attachments objectAtIndex: ii] objectForKey: @"FileReference"] lastPathComponent] isEqualToString: [currentAttachment objectForKey: @"path"]])
{
found = YES;
break;
}
}
// skip deletions
if (found)
continue;
bodydata = [[[response objectForKey: @"fetch"] objectForKey: [NSString stringWithFormat: @"body[%@]", [currentAttachment objectForKey: @"path"]]] valueForKey: @"data"];
map = [[[NGMutableHashMap alloc] initWithCapacity: 1] autorelease];
[map setObject: [currentAttachment objectForKey: @"mimetype"] forKey: @"content-type"];
[map setObject: [currentAttachment objectForKey: @"encoding"] forKey: @"content-transfer-encoding"];
[map addObject: [NSString stringWithFormat: @"attachment; filename=\"%@\"", [currentAttachment objectForKey: @"filename"]] forKey: @"content-disposition"];
bodyPart = [[[NGMimeBodyPart alloc] initWithHeader: map] autorelease];
fdata = [[NGMimeFileData alloc] initWithBytes:[bodydata bytes] length:[bodydata length]];
[bodyPart setBody: fdata];
RELEASE(fdata);
[body addBodyPart: bodyPart];
}
}
// add new attachments
for (i = 0; i < [attachments count]; i++)
{
map = [[[NGMutableHashMap alloc] initWithCapacity: 1] autorelease];
a = [attachments objectAtIndex: i];
// no ClientId means its a deletion
if (![a objectForKey: @"ClientId"])
continue;
[map setObject: @"application/octet-stream" forKey: @"content-type"]; // FIXME ?? can we guess the right content-type
[map setObject: @"base64" forKey: @"content-transfer-encoding"];
[map setObject: [NSString stringWithFormat: @"attachment; filename=\"%@\"", [a objectForKey: @"DisplayName"]] forKey: @"content-disposition"];
bodyPart = [[[NGMimeBodyPart alloc] initWithHeader:map] autorelease];
[bodyPart setBody: [[a objectForKey: @"Content"] stringByDecodingBase64]];
[body addBodyPart: bodyPart];
}
[draftMessage setBody: body];
}
else
{
[map setObject: (bodyType == 1 ? @"text/plain; charset=utf-8" : @"text/html; charset=utf-8")
forKey: @"content-type"];
[map setObject: @"quoted-printable" forKey: @"content-transfer-encoding"];
draftMessage = [[[NGMimeMessage alloc] initWithHeader: map] autorelease];
[draftMessage setBody: [[NSString stringWithFormat: @"%@", [[theValues objectForKey: @"Body"] objectForKey: @"Data"] ] dataUsingEncoding: NSUTF8StringEncoding]];
}
generator = [[[NGMimeMessageGenerator alloc] init] autorelease];
message_data = [generator generateMimeFromPart: draftMessage];
}
if (message_data)
{
client = [[self imap4Connection] client];
if (![imap4 doesMailboxExistAtURL: [container imap4URL]])
{
[[self imap4Connection] createMailbox: [[self imap4Connection] imap4FolderNameForURL: [container imap4URL]]
atURL: [[self mailAccountFolder] imap4URL]];
[imap4 flushFolderHierarchyCache];
}
folder = [imap4 imap4FolderNameForURL: [container imap4URL]];
result = [client append: message_data
toFolder: folder
withFlags: [NSArray arrayWithObjects: @"draft", nil]];
serverId = [NSString stringWithFormat: @"%d", [self IMAP4IDFromAppendResult: result]];
[theBuffer appendString: @"<ApplicationData>"];
[theBuffer appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[messageId dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
if ([attachments count])
{
[theBuffer appendString: @"<Attachments xmlns=\"AirSyncBase:\">"];
for (i = 0; i < [attachments count]; i++)
{
a = [attachments objectAtIndex: i];
[theBuffer appendString: @"<Attachment>"];
[theBuffer appendFormat: @"<ClientId xmlns=\"AirSyncBase:\">%@</ClientId>", [a objectForKey: @"ClientId"]];
[theBuffer appendFormat: @"<FileReference xmlns=\"AirSyncBase:\">mail/%@/%@/%d</FileReference>", [[[self container] relativeImap4Name] stringByEscapingURL], serverId, i+2];
[theBuffer appendString: @"</Attachment>"];
}
[theBuffer appendString: @"</Attachments>"];
}
[theBuffer appendString: @"</ApplicationData>"];
if ([[result objectForKey: @"result"] boolValue])
return serverId;
}
return nil;
}
@end
@@ -27,11 +27,9 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <NGObjWeb/SoObjectWebDAVDispatcher.h>
#include <NGObjWeb/SoObject+SoDAV.h>
#include <NGObjWeb/WEClientCapabilities.h>
#include <NGObjWeb/WOContext.h>
#include <NGObjWeb/WORequest.h>
@@ -39,7 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/NSArray.h>
@interface SoObjectWebDAVDispatcher (ActiveSync)
- (id)_callObjectMethod:(NSString *)_method inContext:(WOContext *)_ctx;
+36 -58
View File
@@ -30,39 +30,36 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "iCalAlarm+ActiveSync.h"
#import <Foundation/NSDictionary.h>
#import <NGExtensions/NSCalendarDate+misc.h>
#import <Foundation/NSString.h>
#import <NGExtensions/NSString+misc.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGCards/iCalAlarm.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalTrigger.h>
#import <NGCards/NSCalendarDate+NGCards.h>
#include "NSDate+ActiveSync.h"
@implementation iCalAlarm (ActiveSync)
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSMutableString *s;
NSCalendarDate *nextAlarmDate;
NSInteger delta;
s = [NSMutableString string];
nextAlarmDate = [self nextAlarmDate];
delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60);
if ([parent isKindOfClass: [iCalEvent class]])
if ([[self action] caseInsensitiveCompare: @"DISPLAY"] == NSOrderedSame)
{
NSCalendarDate *nextAlarmDate;
NSInteger delta;
nextAlarmDate = [self nextAlarmDate];
delta = (int)(([[(iCalEvent *)parent startDate] timeIntervalSince1970] - [nextAlarmDate timeIntervalSince1970])/60);
// don't send negative reminder - not supported
if (delta > 0)
[s appendFormat: @"<Reminder xmlns=\"Calendar:\">%d</Reminder>", (int)delta];
}
else
{
[s appendFormat: @"<ReminderTime xmlns=\"Task:\">%@</ReminderTime>", [nextAlarmDate activeSyncRepresentationInContext: context]];
}
return s;
}
@@ -73,56 +70,37 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
iCalTrigger *trigger;
id o;
if ((o = [theValues objectForKey: @"Reminder"]))
o = [theValues objectForKey: @"Reminder"];
// Outlook: if reminder is set to 0 minutes before start save it as 1 minute since -> 0 minutes in not accepted by SOGo
if ([o isEqualToString: @"0"])
o = @"1";
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
[trigger setValueType: @"DURATION"];
[self setTrigger: trigger];
[self setAction: @"DISPLAY"];
// SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days)
// 1week = -P1W
// 2weeks > -PxD
// xdays > -PxD
// xhours -> -PTxH
// xmin -> -PTxM
if ([o intValue] == 10080)
[trigger setSingleValue: [NSString stringWithFormat: @"-P1W" ] forKey: @""];
else
{
// Outlook: if reminder is set to 0 minutes before starttime, save it as 1 minute since -> 0 minutes in not accepted by SOGo
if ([o isEqualToString: @"0"])
o = @"1";
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
[trigger setValueType: @"DURATION"];
[self setTrigger: trigger];
if (![[self action] length])
[self setAction: @"DISPLAY"];
// SOGo web ui only supports 1w but not 2w (custom reminder only supports min/hours/days)
// 1week = -P1W
// 2weeks > -PxD
// xdays > -PxD
// xhours -> -PTxH
// xmin -> -PTxM
if ([o intValue] == 10080)
[trigger setSingleValue: [NSString stringWithFormat: @"-P1W" ] forKey: @""];
if (([o intValue] % 1440) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-P%dD", ([o intValue] / 1440)] forKey: @""];
else
{
if (([o intValue] % 1440) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-P%dD", ([o intValue] / 1440)] forKey: @""];
if (([o intValue] % 60) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%dH", ([o intValue] / 60)] forKey: @""];
else
{
if (([o intValue] % 60) == 0)
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%dH", ([o intValue] / 60)] forKey: @""];
else
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%@M", o] forKey: @""];
}
[trigger setSingleValue: [NSString stringWithFormat: @"-PT%@M", o] forKey: @""];
}
}
else if ((o = [theValues objectForKey: @"ReminderTime"]))
{
o = [o calendarDate];
trigger = [iCalTrigger elementWithTag: @"TRIGGER"];
[trigger setValueType: @"DATE-TIME"];
[trigger setSingleValue: [NSString stringWithFormat: @"%@Z", [o iCalFormattedDateTimeString]] forKey: @""];
if ((o = [theValues objectForKey: @"ReminderSet"]))
{
if ([o intValue] == 0)
[trigger setValue: 0 ofAttribute: @"x-webstatus" to: @"triggered"];
}
[self setTrigger: trigger];
if (![[self action] length])
[self setAction: @"DISPLAY"];
}
}
@end
+43 -104
View File
@@ -30,19 +30,26 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import "iCalEvent+ActiveSync.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGExtensions/NSString+misc.h>
#import <NGExtensions/NSCalendarDate+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
#import <NGCards/iCalCalendar.h>
#import <NGCards/iCalDateTime.h>
#import <NGCards/iCalPerson.h>
#import <NGCards/NSCalendarDate+NGCards.h>
#import <NGCards/NSString+NGCards.h>
#import <NGCards/iCalCalendar.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
@@ -63,7 +70,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- (int) _attendeeStatus: (iCalPerson *) attendee
{
int attendee_status;
attendee_status = 5;
if ([[attendee partStat] caseInsensitiveCompare: @"ACCEPTED"] == NSOrderedSame)
attendee_status = 3;
@@ -75,29 +82,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
return attendee_status;
}
//
// Possible values are:
// 0 Free
// 1 Tentative
// 2 Busy
// 3 Out of Office
// 4 Working elsewhere
//
- (int) _busyStatus: (iCalPerson *) attendee
{
int attendee_status;
attendee_status = 2;
if ([[attendee partStat] caseInsensitiveCompare: @"DECLINED"] == NSOrderedSame)
attendee_status = 0;
else if ([[attendee partStat] caseInsensitiveCompare: @"TENTATIVE"] == NSOrderedSame)
attendee_status = 1;
return attendee_status;
}
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSMutableString *s;
@@ -128,7 +112,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// StartTime -- http://msdn.microsoft.com/en-us/library/ee157132(v=exchg.80).aspx
if ([self startDate])
{
if ([self isAllDay] && !tz && [[context objectForKey: @"ASProtocolVersion"] floatValue] < 16.0)
if ([self isAllDay] && !tz)
[s appendFormat: @"<StartTime xmlns=\"Calendar:\">%@</StartTime>",
[[[self startDate] dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
@@ -141,7 +125,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// EndTime -- http://msdn.microsoft.com/en-us/library/ee157945(v=exchg.80).aspx
if ([self endDate])
{
if ([self isAllDay] && !tz && [[context objectForKey: @"ASProtocolVersion"] floatValue] < 16.0)
if ([self isAllDay] && !tz)
[s appendFormat: @"<EndTime xmlns=\"Calendar:\">%@</EndTime>",
[[[self endDate] dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
@@ -187,10 +171,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
attendee = [attendees objectAtIndex: i];
[s appendFormat: @"<Attendee_Email xmlns=\"Calendar:\">%@</Attendee_Email>", [[attendee rfc822Email] activeSyncRepresentationInContext: context]];
if ([[attendee cn] length])
[s appendFormat: @"<Attendee_Name xmlns=\"Calendar:\">%@</Attendee_Name>", [[attendee cn] activeSyncRepresentationInContext: context]];
else
[s appendFormat: @"<Attendee_Name xmlns=\"Calendar:\">%@</Attendee_Name>", [[attendee rfc822Email] activeSyncRepresentationInContext: context]];
[s appendFormat: @"<Attendee_Name xmlns=\"Calendar:\">%@</Attendee_Name>", [[attendee cn] activeSyncRepresentationInContext: context]];
attendee_status = [self _attendeeStatus: attendee];
@@ -209,7 +190,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
else
{
meetingStatus = 0; // The event is an appointment, which has no attendees.
meetingStatus = 0; // appointment
}
// This depends on the 'NEEDS-ACTION' parameter.
@@ -230,13 +211,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<DisallowNewTimeProposal xmlns=\"Calendar:\">%d</DisallowNewTimeProposal>", 1];
// BusyStatus -- http://msdn.microsoft.com/en-us/library/ee202290(v=exchg.80).aspx
[s appendFormat: @"<BusyStatus xmlns=\"Calendar:\">%d</BusyStatus>", [self _busyStatus: attendee]];
}
else
{
// If it's a normal event (i.e. with no organizer/attendee) or we are the organizer of an event
// invitation, we set the busy status depending on TRANSP.
[s appendFormat: @"<BusyStatus xmlns=\"Calendar:\">%d</BusyStatus>", (([self isOpaque]) ? 2 : 0)];
[s appendFormat: @"<BusyStatus xmlns=\"Calendar:\">%d</BusyStatus>", 2];
}
[s appendFormat: @"<MeetingStatus xmlns=\"Calendar:\">%d</MeetingStatus>", meetingStatus];
@@ -247,12 +222,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Location
if ([[self location] length])
{
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 16.0)
[s appendFormat: @"<Location xmlns=\"AirSyncBase:\"><DisplayName>%@</DisplayName></Location>", [[self location] activeSyncRepresentationInContext: context]];
else
[s appendFormat: @"<Location xmlns=\"Calendar:\">%@</Location>", [[self location] activeSyncRepresentationInContext: context]];
}
[s appendFormat: @"<Location xmlns=\"Calendar:\">%@</Location>", [[self location] activeSyncRepresentationInContext: context]];
// Importance - NOT SUPPORTED - DO NOT ENABLE
//o = [self priority];
@@ -281,7 +251,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details.
o = [o activeSyncRepresentationInContext: context];
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
[s appendFormat: @"<Body xmlns=\"Calendar:\">%@</Body>", o];
[s appendString: @"<BodyTruncated xmlns=\"Calendar:\">0</BodyTruncated>"];
@@ -324,7 +294,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
iCalAlarm *alarm;
alarm = [self firstSupportedAlarm];
alarm = [self firstDisplayOrAudioAlarm];
[s appendString: [alarm activeSyncRepresentationInContext: context]];
}
@@ -450,7 +420,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
NSCalendarDate *oldstart;
NSTimeZone *userTimeZone;
iCalTimeZone *tz;
iCalAlarm *alarm;
id o;
int deltasecs;
@@ -460,7 +429,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
occurences = [NSMutableArray arrayWithArray: [[self parent] events]];
if ((o = [theValues objectForKey: ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 16.0) ? @"ClientUid" : @"UID"]))
if ((o = [theValues objectForKey: @"UID"]))
[self setUid: o];
// FIXME: merge with iCalToDo
@@ -483,10 +452,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
if ((o = [theValues objectForKey: @"BusyStatus"]))
{
if ([o boolValue])
[self setTransparency: @"OPAQUE"];
else
[self setTransparency: @"TRANSPARENT"];
[o intValue];
}
//
@@ -528,7 +494,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
// FIXME: merge with iCalToDo
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
if ((o = [theValues objectForKey: @"Body"]))
[self setComment: o];
@@ -539,13 +505,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[self setComment: o];
}
if ([[context objectForKey: @"ASProtocolVersion"] floatValue] < 16.0 && (o = [theValues objectForKey: @"Location"]))
if ((o = [theValues objectForKey: @"Location"]))
[self setLocation: o];
else if ([[context objectForKey: @"ASProtocolVersion"] floatValue] >= 16.0 && (o = [theValues objectForKey: @"Location"]) && [o isKindOfClass: [NSDictionary class]])
[self setLocation: [o objectForKey: @"DisplayName"]];
deltasecs = 0;
start = nil;
if ((o = [theValues objectForKey: @"StartTime"]))
{
@@ -554,8 +515,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
oldstart = [start dateTime];
[start setTimeZone: tz];
if (isAllDay)
{
if (isAllDay)
{
[start setDate: o];
[start setTimeZone: nil];
}
@@ -566,7 +527,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Calculate delta if start date has been changed.
if (oldstart)
deltasecs = [[start dateTime ] timeIntervalSinceDate: oldstart] * -1;
deltasecs = [[start dateTime ] timeIntervalSinceDate: oldstart] * -1;
else
deltasecs = 0;
}
if ((o = [theValues objectForKey: @"EndTime"]))
@@ -586,19 +549,23 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
}
if ((o = [theValues objectForKey: @"Reminder"]) && [o length])
//
// If an alarm is deinfed with an action != DISPLAY, we ignore the alarm - don't want to overwrite.
//
if ([self hasAlarms] && [[[[self alarms] objectAtIndex: 0] action] caseInsensitiveCompare: @"DISPLAY"] != NSOrderedSame)
{
// Ignore the alarm for now
}
else if ((o = [theValues objectForKey: @"Reminder"]))
{
if ([self hasAlarms])
alarm = [[self firstSupportedAlarm] mutableCopy];
else
alarm = [[iCalAlarm alloc] init];
// NOTE: Outlook sends a 15 min reminder (18 hour for allday) if no reminder is specified
// although no default reminder is defined (File -> Options -> Clendar -> Calendar Options - > Default Reminders)
//
// http://answers.microsoft.com/en-us/office/forum/office_2013_release-outlook/desktop-outlook-calendar-creates-entries-with/9aef72d8-81bb-4a32-a6ab-bf7d216fb811?page=5&tm=1395690285088
//
iCalAlarm *alarm;
alarm = [[iCalAlarm alloc] init];
[alarm takeActiveSyncValues: theValues inContext: context];
[self removeAllAlarms];
@@ -612,7 +579,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
// Recurrence
if ((o = [theValues objectForKey: @"Recurrence"]) && [o isKindOfClass: [NSDictionary class]])
if ((o = [theValues objectForKey: @"Recurrence"]))
{
iCalRecurrenceRule *rule;
@@ -840,6 +807,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
}
// Attendees - we don't touch the values if we're an attendee. This is gonna
// be done automatically by the ActiveSync client when invoking MeetingResponse.
if (![self userIsAttendee: [context activeUser]])
@@ -861,13 +829,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// { "Attendee_Email" = "sogo3@example.com"; "Attendee_Name" = "Wolfgang Fritz"; "Attendee_Status" = 5; "Attendee_Type" = 1; }
attendee = [o objectAtIndex: i];
if ([self isOrganizer: [attendee objectForKey: @"Attendee_Email"]])
continue;
person = [iCalPerson elementWithTag: @"attendee"];
[person setCn: [attendee objectForKey: @"Attendee_Name"]];
[person setEmail: [attendee objectForKey: @"Attendee_Email"]];
status = [[attendee objectForKey: @"Attendee_Status"] intValue];
switch (status)
@@ -884,10 +849,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
case 0:
case 5:
default:
{
[person setPartStat: @"NEEDS-ACTION"];
[person setRsvp: @"TRUE"];
}
[person setPartStat: @"NEEDS-ACTION"];
break;
}
@@ -899,8 +861,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[self setAttendees: attendees];
}
}
[self setLastModified: [NSCalendarDate calendarDate]];
}
- (void) changeParticipationStatus: (NSDictionary *) theValues
@@ -908,15 +868,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
component: (id) component
{
NSString *status;
iCalAlarm *alarm;
iCalPerson *attendee;
id o;
attendee = [self userAsAttendee: [context activeUser]];
status = [attendee partStat];
alarm = nil;
// See: https://msdn.microsoft.com/en-us/library/ee202290(v=exchg.80).aspx
//
// 0 == Free
@@ -935,25 +888,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
else
status = @"TENTATIVE";
// There's no delegate in EAS
[(SOGoAppointmentObject *) component changeParticipationStatus: status
withDelegate: nil
alarm: nil];
}
if ((o = [theValues objectForKey: @"Reminder"]) && [o length])
{
if ([self hasAlarms])
alarm = [[self firstSupportedAlarm] mutableCopy];
else
alarm = [[iCalAlarm alloc] init];
[alarm takeActiveSyncValues: theValues inContext: context];
}
// There's no delegate in EAS
[(SOGoAppointmentObject *) component changeParticipationStatus: status
withDelegate: nil
alarm: alarm];
RELEASE(alarm);
}
@end
+24 -51
View File
@@ -35,42 +35,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <Foundation/NSString.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalToDo.h>
#import <NGCards/iCalByDayMask.h>
#import <NGCards/iCalDateTime.h>
#import <NGCards/iCalTimeZone.h>
#import "NSCalendarDate+ActiveSync.h"
#import "NSDate+ActiveSync.h"
@implementation iCalRecurrenceRule (ActiveSync)
- (NSCalendarDate *) _adjustedStartDate
{
iCalTimeZone *timeZone;
timeZone = [(iCalDateTime *)[[self parent] firstChildWithTag: @"dtstart"] timeZone];
if (timeZone)
return [timeZone computedDateForDate: [[self parent] startDate]];
else
return [[self parent] startDate];
}
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
NSMutableString *s;
NSString *t;
int type;
s = [NSMutableString string];
if ([[self parent] isKindOfClass: [iCalToDo class]])
t = @"Tasks";
else
t = @"Calendar";
[s appendFormat: @"<Recurrence xmlns=\"%@:\">", t];
[s appendString: @"<Recurrence xmlns=\"Calendar:\">"];
// 0 -> daily, 1 -> weekly, 2 -> montly, 5 -> yearly
type = 0;
@@ -82,11 +61,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// 1 -> sunday, 2 -> monday, 4 -> tuesday, 8 -> wednesday, 16 -> thursday, 32 -> friday, 64 -> saturday, 127 -> last day of month (montly or yearl recurrences only)
if ([[self byDayMask] isWeekDays])
{
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"%@:\">%d</Recurrence_DayOfWeek>", t, (2|4|8|16|32)];
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", (2|4|8|16|32)];
}
else
{
[s appendFormat: @"<Recurrence_Interval xmlns=\"%@:\">%d</Recurrence_Interval>", t, [self repeatInterval]];
[s appendFormat: @"<Recurrence_Interval xmlns=\"Calendar:\">%d</Recurrence_Interval>", [self repeatInterval]];
}
}
else if ([self frequency] == iCalRecurrenceFrequenceWeekly)
@@ -111,11 +90,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
// No byDayMask, we take the event's start date to compute the DayOfWeek
// 0 == Sunday, 6 == Saturday
v = (1 << [[self _adjustedStartDate] dayOfWeek]);
v = (1 << [[[self parent] startDate] dayOfWeek]);
}
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"%@:\">%d</Recurrence_DayOfWeek>", t, v];
[s appendFormat: @"<Recurrence_Interval xmlns=\"%@:\">%d</Recurrence_Interval>", t, [self repeatInterval]];
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", v];
[s appendFormat: @"<Recurrence_Interval xmlns=\"Calendar:\">%d</Recurrence_Interval>", [self repeatInterval]];
}
else if ([self frequency] == iCalRecurrenceFrequenceMonthly)
{
@@ -132,9 +111,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (firstOccurrence < 0)
firstOccurrence = 5;
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"%@:\">%d</Recurrence_DayOfWeek>", t, (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"%@:\">%d</Recurrence_WeekOfMonth>", t, firstOccurrence];
[s appendFormat: @"<Recurrence_Interval xmlns=\"%@:\">%d</Recurrence_Interval>", t, [self repeatInterval]];
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"Calendar:\">%d</Recurrence_WeekOfMonth>", firstOccurrence];
}
else if ([[self byMonthDay] count])
{
@@ -148,9 +126,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
iCalByDayMask *dm;
dm = [self byDayMask];
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"%@:\">%d</Recurrence_DayOfWeek>", t, (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"%@:\">%d</Recurrence_WeekOfMonth>", t, 5];
[s appendFormat: @"<Recurrence_Interval xmlns=\"%@:\">%d</Recurrence_Interval>", t, [self repeatInterval]];
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"Calendar:\">%d</Recurrence_WeekOfMonth>", 5];
}
else
{
@@ -162,7 +139,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{
// Simple reccurrence rule of type "Monthly"
type = 2;
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"%@:\">%d</Recurrence_DayOfMonth>", t, [[self _adjustedStartDate] dayOfMonth]];
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%d</Recurrence_DayOfMonth>",
(int)[[[self parent] startDate] dayOfMonth]];
}
}
else if ([self frequency] == iCalRecurrenceFrequenceYearly)
@@ -181,39 +159,33 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if (firstOccurrence < 0)
firstOccurrence = 5;
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"%@:\">%d</Recurrence_DayOfWeek>", t, (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"%@:\">%d</Recurrence_WeekOfMonth>", t, firstOccurrence];
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"%@:\">%@</Recurrence_MonthOfYear>", t,
[s appendFormat: @"<Recurrence_DayOfWeek xmlns=\"Calendar:\">%d</Recurrence_DayOfWeek>", (1 << [dm firstDay])];
[s appendFormat: @"<Recurrence_WeekOfMonth xmlns=\"Calendar:\">%d</Recurrence_WeekOfMonth>", firstOccurrence];
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"Calendar:\">%@</Recurrence_MonthOfYear>",
[self flattenedValuesForKey: @"bymonth"]];
}
else
{
type = 5; // Yearly
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"%@:\">%@</Recurrence_DayOfMonth>", t,
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"Calendar:\">%@</Recurrence_DayOfMonth>",
[self flattenedValuesForKey: @"bymonthday"]];
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"%@:\">%@</Recurrence_MonthOfYear>", t,
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"Calendar:\">%@</Recurrence_MonthOfYear>",
[self flattenedValuesForKey: @"bymonth"]];
}
}
else
{
type = 5;
[s appendFormat: @"<Recurrence_DayOfMonth xmlns=\"%@:\">%d</Recurrence_DayOfMonth>", t, [[self _adjustedStartDate] dayOfMonth]];
[s appendFormat: @"<Recurrence_MonthOfYear xmlns=\"%@:\">%d</Recurrence_MonthOfYear>", t, [[self _adjustedStartDate] monthOfYear]];
}
type = 5;
}
[s appendFormat: @"<Recurrence_Type xmlns=\"%@:\">%d</Recurrence_Type>", t, type];
if ([[self parent] isKindOfClass: [iCalToDo class]])
[s appendFormat: @"<Recurrence_Start xmlns=\"%@:\">%@</Recurrence_Start>", t, [[[self parent] startDate] activeSyncRepresentationInContext: context]];
[s appendFormat: @"<Recurrence_Type xmlns=\"Calendar:\">%d</Recurrence_Type>", type];
// Occurrences / Until
//[s appendFormat: @"<Recurrence_Occurrences xmlns=\"Calendar:\">%d</Recurrence_Occurrences>", 5];
if ([self repeatCount])
{
[s appendFormat: @"<Recurrence_Occurrences xmlns=\"%@:\">%@</Recurrence_Occurrences>", t,
[s appendFormat: @"<Recurrence_Occurrences xmlns=\"Calendar:\">%@</Recurrence_Occurrences>",
[self flattenedValuesForKey: @"count"]];
}
else if ([self untilDate])
@@ -224,10 +196,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//ud = [[context activeUser] userDefaults];
//[date setTimeZone: [ud timeZone]];
[s appendFormat: @"<Recurrence_Until xmlns=\"%@:\">%@</Recurrence_Until>", t,
[s appendFormat: @"<Recurrence_Until xmlns=\"Calendar:\">%@</Recurrence_Until>",
[date activeSyncRepresentationWithoutSeparatorsInContext: context]];
}
[s appendString: @"</Recurrence>"];
return s;
+17 -34
View File
@@ -31,10 +31,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <Foundation/NSArray.h>
#include <Foundation/NSCalendarDate.h>
#include <Foundation/NSData.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSString.h>
#import <NGCards/iCalByDayMask.h>
#import <NGCards/iCalTimeZonePeriod.h>
#import <NGCards/iCalRecurrenceRule.h>
#import <NGExtensions/NGBase64Coding.h>
#include "NSData+ActiveSync.h"
@@ -78,28 +83,10 @@ struct SYSTEMTIME {
tzData->wDay = ([mask firstOccurrence] == -1) ? 5 : [mask firstOccurrence];
dateValue = [self startDate];
if (![dateValue hourOfDay])
{
if ([mask firstDay]-1 < 0)
tzData->wDayOfWeek = 6;
else
tzData->wDayOfWeek = [mask firstDay]-1;
tzData->wHour = 23;
tzData->wMinute = 59;
tzData->wSecond = 59;
tzData->wMilliseconds = 999;
}
else
{
tzData->wDayOfWeek = [mask firstDay];
tzData->wHour = [dateValue hourOfDay];
tzData->wMinute = [dateValue minuteOfHour];
tzData->wSecond = [dateValue secondOfMinute];
tzData->wMilliseconds = 0;
}
tzData->wHour = [dateValue hourOfDay];
tzData->wMinute = [dateValue minuteOfHour];
tzData->wSecond = [dateValue secondOfMinute];
tzData->wMilliseconds = 0;
}
}
@@ -141,7 +128,7 @@ struct SYSTEMTIME {
//uint16_t wStandardYear;
struct SYSTEMTIME stStandardDate;
//uint16_t wDaylightYear;
struct SYSTEMTIME stDaylightDate = {0,0,0,0,0,0,0,0};
struct SYSTEMTIME stDaylightDate;
char standardName[64], daylightName[64];
@@ -157,17 +144,13 @@ struct SYSTEMTIME {
period = [self _mostRecentPeriodWithName: @"DAYLIGHT"];
if (!period)
{
stStandardDate.wMonth = 0;
lDaylightBias = 0;
}
else
{
lDaylightBias = (uint32_t) -([period secondsOffsetFromGMT] / 60) - lBias;
[period _fillTZDate: &stDaylightDate];
//wStandardYear = stStandardDate.wYear;
//wDaylightYear = stDaylightDate.wYear;
}
stStandardDate.wMonth = 0;
lDaylightBias = (uint32_t) -([period secondsOffsetFromGMT] / 60) - lBias;
[period _fillTZDate: &stDaylightDate];
//wStandardYear = stStandardDate.wYear;
//wDaylightYear = stDaylightDate.wYear;
// We build the timezone
[bytes appendBytes: &lBias length: 4];
+10 -68
View File
@@ -29,10 +29,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "iCalToDo+ActiveSync.h"
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGExtensions/NSString+misc.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
@@ -42,14 +46,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#import <NGCards/iCalCalendar.h>
#import <NGCards/iCalDateTime.h>
#import <NGCards/iCalTimeZone.h>
#import <NGCards/iCalTrigger.h>
#import <Appointments/iCalEntityObject+SOGo.h>
#include "NSDate+ActiveSync.h"
#include "NSString+ActiveSync.h"
#include "iCalRecurrenceRule+ActiveSync.h"
#include "iCalAlarm+ActiveSync.h"
@implementation iCalToDo (ActiveSync)
@@ -84,10 +84,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendFormat: @"<DueDate xmlns=\"Tasks:\">%@</DueDate>", [o activeSyncRepresentationInContext: context]];
[s appendFormat: @"<UTCDueDate xmlns=\"Tasks:\">%@</UTCDueDate>", [o activeSyncRepresentationInContext: context]];
}
// Recurrence rules
if ([self isRecurrent])
[s appendString: [[[self recurrenceRules] lastObject] activeSyncRepresentationInContext: context]];
// Importance
o = [self priority];
@@ -99,31 +95,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
v = 1;
[s appendFormat: @"<Importance xmlns=\"Tasks:\">%d</Importance>", v];
// Reminder
if ([self hasAlarms])
{
iCalAlarm *alarm;
NSString *webstatus;
if ((alarm = [self firstSupportedAlarm]))
{
webstatus = [[alarm trigger] value: 0 ofAttribute: @"x-webstatus"];
if (!webstatus || ([webstatus caseInsensitiveCompare: @"TRIGGERED"] != NSOrderedSame))
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 1];
else
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
[s appendString: [alarm activeSyncRepresentationInContext: context]];
}
else
{
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
}
}
else
{
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
}
// Reminder - FIXME
[s appendFormat: @"<ReminderSet xmlns=\"Tasks:\">%d</ReminderSet>", 0];
// Sensitivity
if ([[self accessClass] isEqualToString: @"PRIVATE"])
@@ -158,7 +131,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details.
o = [o activeSyncRepresentationInContext: context];
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
[s appendFormat: @"<Body xmlns=\"Tasks:\">%@</Body>", o];
[s appendString: @"<BodyTruncated xmlns=\"Tasks:\">0</BodyTruncated>"];
@@ -172,7 +145,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[s appendString: @"</Body>"];
}
}
return s;
}
@@ -192,7 +165,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[self setSummary: o];
// FIXME: merge with iCalEvent
if ([[context objectForKey: @"ASProtocolVersion"] isEqualToString: @"2.5"])
if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"])
{
if ((o = [theValues objectForKey: @"Body"]))
[self setComment: o];
@@ -276,39 +249,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
if ((o = [theValues objectForKey: @"ReminderTime"]))
{
iCalAlarm *alarm;
alarm = [[iCalAlarm alloc] init];
[alarm takeActiveSyncValues: theValues inContext: context];
[self removeAllAlarms];
[self addToAlarms: alarm];
RELEASE(alarm);
}
// Recurrence
if ((o = [theValues objectForKey: @"Recurrence"]) && !([[o objectForKey: @"Recurrence_DeadOccur"] intValue]))
{
iCalRecurrenceRule *rule;
rule = [[iCalRecurrenceRule alloc] init];
[self setRecurrenceRules: [NSArray arrayWithObject: rule]];
RELEASE(rule);
[rule takeActiveSyncValues: o inContext: context];
if (!([theValues objectForKey: @"StartDate"]))
{
iCalDateTime *start;
start = (iCalDateTime *) [self uniqueChildWithTag: @"dtstart"];
[start setTimeZone: tz];
[start setDate: [[o objectForKey: @"Recurrence_Start"] calendarDate]];
}
}
}
@end
+2 -2
View File
@@ -28,7 +28,7 @@
ProxyPass /SOGo http://127.0.0.1:20000/SOGo interpolate
ProxyPass / http://127.0.0.1:20000/SOGo/dav/ interpolate
<Location />
<IfVersion < 2.4>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
@@ -40,7 +40,7 @@
<Proxy http://127.0.0.1:20000>
RequestHeader set "x-webobjects-server-port" "8843"
RequestHeader set "x-webobjects-server-name" "CHANGETHIS:8843"
RequestHeader set "x-webobjects-server-url" "https://CHANGETHIS:8843"
RequestHeader set "x-webobjects-server-url" "http://CHANGETHIS:8843"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
AddDefaultCharset UTF-8
</Proxy>
+14 -29
View File
@@ -6,7 +6,7 @@ Alias /SOGo/WebServerResources/ \
<Directory /usr/lib/GNUstep/SOGo/>
AllowOverride None
<IfVersion < 2.4>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
@@ -22,14 +22,6 @@ Alias /SOGo/WebServerResources/ \
</IfModule>
</Directory>
# Don't send the Referer header for cross-origin requests
Header always set Referrer-Policy "same-origin"
<Location /SOGo>
# Don't cache dynamic content
Header set Cache-Control "max-age=0, no-cache, no-store"
</Location>
## Uncomment the following to enable proxy-side authentication, you will then
## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and
## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section
@@ -53,12 +45,8 @@ Header always set Referrer-Policy "same-origin"
#</Location>
ProxyRequests Off
ProxyPreserveHost On
SetEnv proxy-nokeepalive 1
# Uncomment the following lines if you experience "Bad gateway" errors with mod_proxy
#SetEnv proxy-initial-not-pooled 1
#SetEnv force-proxy-request-1.0 1
ProxyPreserveHost On
# When using CAS, you should uncomment this and install cas-proxy-validate.py
# in /usr/lib/cgi-bin to reduce server overloading
@@ -69,9 +57,6 @@ SetEnv proxy-nokeepalive 1
# Allow from your-cas-host-addr
# </Proxy>
# Redirect / to /SOGo
#RedirectMatch ^/$ https://mail.yourdomain.com/SOGo
# Enable to use Microsoft ActiveSync support
# Note that you MUST have many sogod workers to use ActiveSync.
# See the SOGo Installation and Configuration guide for more details.
@@ -80,24 +65,23 @@ SetEnv proxy-nokeepalive 1
# http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync \
# retry=60 connectiontimeout=5 timeout=360
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 nocanon
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
<Proxy http://127.0.0.1:20000/SOGo>
## Adjust the following to your configuration
## and make sure to enable the headers module
<IfModule headers_module>
RequestHeader set "x-webobjects-server-port" "443"
SetEnvIf Host (.*) HTTP_HOST=$1
RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST
RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST
## adjust the following to your configuration
## and do not forget to enable the headers module
<IfModule headers_module>
RequestHeader set "x-webobjects-server-port" "443"
# RequestHeader set "x-webobjects-server-name" "yourhostname"
# RequestHeader set "x-webobjects-server-url" "https://yourhostname"
## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
RequestHeader unset "x-webobjects-remote-user"
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER
RequestHeader unset "x-webobjects-remote-user"
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" env=REMOTE_USER
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
</IfModule>
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
</IfModule>
AddDefaultCharset UTF-8
@@ -111,3 +95,4 @@ ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 nocanon
RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>
-3867
View File
File diff suppressed because it is too large. Load diff
+25406 -87060
View File
File diff suppressed because it is too large. Load diff
+5655
View File
File diff suppressed because it is too large. Load diff
+5 -26
View File
@@ -1,29 +1,8 @@
all: pdf html
all: $(patsubst %.asciidoc,%.pdf,$(wildcard *.asciidoc))
ASCIIDOCS = $(wildcard SOGo*.asciidoc)
PDFS = $(patsubst %.asciidoc,%.pdf, $(ASCIIDOCS))
HTML = $(patsubst %.asciidoc,%.html, $(ASCIIDOCS))
%.pdf: %.asciidoc asciidoctor-pdf-theme.yml $(wildcard includes/*.asciidoc)
asciidoctor-pdf \
-a pdf-fontsdir=fonts \
-a release_version=`git describe --abbrev=0 --tags | cut -d'-' -f 2` \
-a release_month=`LANG=en_US.UTF-8 date +%B` \
-a pdf-theme=asciidoctor-pdf-theme.yml \
--trace \
$<
%.html: %.asciidoc $(wildcard includes/*.asciidoc)
asciidoctor \
-D . \
-a release_version=`git describe --abbrev=0 --tags | cut -d'-' -f 2` \
-a release_month=`LANG=en_US.UTF-8 date +%B` \
-n \
$<
pdf: $(PDFS)
html: $(HTML)
%.pdf : %.asciidoc
asciidoc -a docinfo1 -b docbook -d book -o $<.docbook $<
fop -c fonts/fop-config.xml -xsl docbook/xsl/sogo-fo.xsl -xml $<.docbook -pdf $@
clean:
rm -f *.pdf *.html
rm *.asciidoc.docbook *.pdf
-194
View File
@@ -1,194 +0,0 @@
Developer's Guide
=================
////
This file is part of the SOGo project.
See includes/global-attributes.asciidoc
for authors, copyright and license information.
////
include::includes/global-attributes.asciidoc[]
UI and UX
---------
* https://material.io/design/
Frameworks & Tools
------------------
GNUstep
~~~~~~~
SOPE
~~~~
JavaScript libraries
~~~~~~~~~~~~~~~~~~~~
* https://angularjs.org/
* https://material.angularjs.org/
* http://angular-ui.github.io/ui-router/
* http://lodash.com/
* https://github.com/nervgh/angular-file-upload
* https://github.com/a5hik/ng-sortable
Code Style
----------
Objective-C
~~~~~~~~~~~
* To document the Web APIs, we follow the http://apidocjs.com/[APIDOC] standards.
apidoc -f ".*\\.m" -i UI -o Documentation/JSON-API
* When returning JSON from an object extending UIxComponent, use the following method:
- (WOResponse *) responseWithStatus: (unsigned int) status
andJSONRepresentation: (NSObject *) contentObject;
HTML
~~~~
* Localize your strings:
<var:string label:value="I'm localized!"/>
* Localize your attributes:
<input type="text" label:placeholder="I'm localized!"/>
* Reuse existing localized strings as much as possible. Otherwise don't forget to update the English Localizable.strings file of the appropriate module.
JavaScript
~~~~~~~~~~
* http://eslint.org/
* http://standardjs.com
* https://github.com/toddmotto/angularjs-styleguide
* https://github.com/angular/material/blob/master/docs/guides/CODING.md
* http://jshint.com/
* https://github.com/angular/material/tree/master/docs/guides
* We conform to https://github.com/airbnb/javascript[Airbnb coding standards]. Use https://github.com/jscs-dev/node-jscs[jscs] with the 'airbnb' preset to validate your code style:
jscs -p airbnb *.js
* For documentation, we follow the http://usejsdoc.org/[JSDoc3] standards:
jsdoc UI/WebServerResources/js/{Common,Contacts,Mailer,Preferences,Scheduler}/*.js -d Documentation/JavaScript-API
Models (facades)
^^^^^^^^^^^^^^^^
////
http://trochette.github.io/Angular-Design-Patterns-Best-Practices/
////
* Move business logic into models and share them.
* Keep it simple, separate server interaction and error handling from the model. That way model only handle data processing and code is easier to maintain.
Controllers
^^^^^^^^^^^
* Functions not exposed in the controller must be prefixed with an underscore.
SASS/CSS
~~~~~~~~
* http://componentcss.com/
* https://github.com/styleguide/css
* https://smacss.com/
* http://cssguidelin.es/
* http://sixrevisions.com/css/css-methodologies/
* https://css-tricks.com/what-a-css-code-review-might-look-like/
* http://una.im/classy-css/
* http://stylelint.io/
A `@mixin` is like a stamp: it creates a duplicated version of the property block (optionally) with arguments provided. An `@extend` appends the element you are extending to the property block. It is your "yes, and ___" statement.
* For documentation, we follow http://sassdoc.com/[SassDoc] annotations.
* FlexBox compatibility http://caniuse.com/#feat=flexbox
Fonts
^^^^^
* http://mozilla.github.io/Fira/[Mozilla Fira]
* https://material.io/tools/icons/[Material icons]
Building frontend
-----------------
* Install the latest stable release of https://nodejs.org[Node.js]
* Install grunt
npm install -g grunt-cli
npm install -g bower
* We need the SASS files of Angular Material to build our CSS. The git repository of Angular Material is included as a submodule of SOGo:
git submodule init
git submodule update
* Generate the JavaScript and CSS files
cd UI/WebServerResources
npm install
bower install
grunt build
Defining an alternate color theme
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOGo relies on the https://material.angularjs.org/latest/Theming/01_introduction[theming system of Angular Material] to define the colors of the Web interface.
To overwrite the default theme in SOGo, set the following parameter in `/etc/sogo/sogo.conf`:
SOGoUIAdditionalJSFiles = (js/theme.js);
Edit `theme.js` under `/usr/lib64/GNUstep/SOGo/WebServerResources/js` or `/usr/lib/GNUstep/SOGo/WebServerResources/js` depending on your platform and restart sogod.
If the configuration parameter `SOGoUIxDebugEnabled` is unset or set to `NO` in `/etc/sogo/sogo.conf`, you'll need to generate a new `theme-default.css` stylesheet for the new theme.
. Temporarily set `SOGoUIxDebugEnabled` to `YES`;
. Restart sogod;
. From your favorite browser, open the JavaScript console and type the following:
copy([].slice.call(document.styleSheets)
.map(e => e.ownerNode)
.filter(e => e.hasAttribute('md-theme-style'))
.map(e => e.textContent)
.join('\n')
)
. Overwrite the content of `WebServerResources/css/theme-default.css` with the content of the clipboard;
. Restore the value of `SOGoUIxDebugEnabled` (`NO` or unset);
. Restart sogod.
Version Control
---------------
* https://devcharm.com/articles/46/improve-your-git-workflow/
* https://github.com/angular/material/blob/master/docs/guides/CONTRIBUTING.md#-commit-message-format
* Each commit should cover only one thing;
* Begin the commit message with a single short (less than 50 characters) line summarizing the change, followed by a blank line and then a more thorough description;
* When fixing a bug, commit to the devel branch as well as the maintenance branch of the latest release version (named maintenance/x.y). When a ticket is associated to the bug, add to the description a line saying *Fixes #1234*.
* `git pull` may introduce http://stackoverflow.com/questions/15316601/in-what-cases-could-git-pull-be-harmful[inconsistencies and problems]. Replace it with the following alias:
git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'
Testing
-------
* https://github.com/angular/protractor
* http://karma-runner.github.io/
JSON API
~~~~~~~~
One practical way to test the JSON API is to use `curl`. To do so, you need to enable `SOGoTrustProxyAuthentication` and configure HTTP authentifcation in Apache. You can pipe the result to http://stedolan.github.io/jq/[jq] to nicely format and filter the output:
curl -u username:password http://localhost/SOGo/so/username/Calendar/calendarslist | jq '.'
curl -u username:password -H 'Content-Type: application/json' -d '{}' http://localhost/SOGo/so/francis/Calendar/personal/71B6-54904400-1-7C308500.ics/save
File diff suppressed because it is too large. Load diff
@@ -1,13 +1,15 @@
Mobile Devices Configuration Guide
==================================
////
This file is part of the SOGo project.
See includes/global-attributes.asciidoc
for authors, copyright and license information.
See SOGo Mobile Devices Configuration-docinfo.xml for authors,
copyright and license information.
////
include::includes/global-attributes.asciidoc[]
About this Guide
@@ -22,7 +24,7 @@ devices (iPhone, iPod touch, and iPad).
The instructions are based on version {release_version} of SOGo.
The latest version of this guide is available at
https://sogo.nu/downloads/documentation.html.
http://www.sogo.nu/downloads/documentation.html.
Introduction
------------
@@ -1,13 +1,15 @@
Mozilla Thunderbird Configuration Guide
=======================================
////
This file is part of the SOGo project.
See includes/global-attributes.asciidoc
for authors, copyright and license information.
See SOGo Mozilla Thunderbird Configuration Guide-docinfo.xml for
authors, copyright and license information.
////
include::includes/global-attributes.asciidoc[]
About this Guide
@@ -46,7 +48,7 @@ device, or Outlook 2013
SOGo is developed by a community of developers located mainly in North
America and Europe. More information can be found on
https://www.sogo.nu/.
http://www.sogo.nu/.
Installation
------------
@@ -59,8 +61,9 @@ Mozilla Thunderbird
Mozilla Thunderbird is the official front end client of SOGo.
Mozilla Thunderbird versions 31, 38, 45 and above are supported
and it is recommended to use the latest version of Thunderbird.
Mozilla Thunderbird version 2, 3.1, 10 ESR (Extended Support Release),
17 ESR, 24 and 31 are supported and it is recommended to use version 31 of
Thunderbird.
In order to download and install Mozilla Thunderbird, please visit:
@@ -69,16 +72,33 @@ https://www.mozilla.org/en-US/thunderbird/organizations/all-esr.html
Mozilla Lightning
~~~~~~~~~~~~~~~~~
When using Thunderbird, you can use the latest version of Mozilla
Lightning. Use the Add-ons manager of Thunderbird or visit:
When using version 24 or 31 of Thunderbird, you can use the latest version of
Mozilla Lightning. Use the Add-ons manager of Thunderbird or visit:
https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
When using version 17 ESR of Thunderbird, you can use Mozilla Lightning
version 1.9.1. In order to download the extension, please visit:
https://addons.mozilla.org/en-US/thunderbird/addon/lightning/versions/1.9.1
For Thunderbird 2 and 3.1, you need the _Inverse Edition_of Mozilla
Lightning. It provides back ported features, bug fixes and security
fixes from the current development version of Mozilla Lightning. For
Thunderbird 2, it is based on release version 0.9 of Lightning. For
Thunderbird 3.1, it is based on 1.0b2.
In order to download and install Mozilla Lightning – Inverse Edition for
Thunderbird 2 or 3.1, please visit:
http://www.sogo.nu/downloads/frontends.html
SOGo Connector and SOGo Integrator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The SOGo Connector and Integrator extensions are provided to perfect the
integration of Mozilla Thunderbird with the SOGo groupware solution.
integration of Mozilla Thunderbird 2, 3.1, 10 ESR, 17 ESR, 24 and 31 with
the SOGo groupware solution.
First of all, the SOGo Connector extension transforms Thunderbird into a
full DAV client for groupware servers such as SOGo, eGroupware or
@@ -116,7 +136,7 @@ extensions, please visit:
http://www.sogo.nu/downloads/frontends.html
Prior to installing the SOGo Integrator extension, you should read the
following chapter - _SOGo Integrator Customization_.
following chapter – _SOGo Integrator Customization_.
SOGo Integrator Customization
-----------------------------
@@ -137,7 +157,7 @@ the same user name used to connect to the first email server configured
in Thunderbird. It is a current limitation but it will fit nearly all
configurations out there.
For testing purpose, it is strongly recommended to create and
For testing purpose, you are strongly recommended to create and
configure an additional user profile for Thunderbird. This is for two
reasons. The first is because of the limitation mentioned above. The
second is because the Integrator will synchronize your personal address
@@ -148,7 +168,7 @@ you may want to make a copy of that address book beforehand.
The second part requires editing one file in the extension file sub tree
to specify where the SOGo server is located. This is done by hand. In an
enterprise environment, this step is only required once per release
since the updates are expected to propagate automatically.
since the updates are expected to propagate automatically. 
Uncompress (using a ZIP or jar tool) the SOGo Integrator XPI and locate
the following file:
@@ -167,7 +187,7 @@ For example, one would replace:
by:
<Seq about="https://sogo.nu" isi:updateURL="https://sogo.acme.com/plugins/updates.php?plugin=%ITEM_ID%&amp;version=%ITEM_VERSION%&amp;platform=%PLATFORM%">
<Seq about="http://inverse.ca/sogo-integrator/extensions" isi:updateURL="https://sogo.acme.com/plugins/updates.php?plugin=%ITEM_ID%&amp;version=%ITEM_VERSION%&amp;platform=%PLATFORM%">
if the SOGo server is accessible from the following URL:
@@ -175,7 +195,7 @@ if the SOGo server is accessible from the following URL:
Note that if you changed the `x-webobjects-server-url` configuration
setting from your HTTP server configuration file for SOGo, the
value *must* match the one you specify in `isi:updateURL` - even the
value *must* match the one you specify in `isi:updateURL` – even the
port number.
Moreover, you *must* change the value of the
@@ -196,7 +216,7 @@ In this section, you will learn how to install and configure the SOGo
Update Server.
The SOGo Update Server can be used to automatically install or uninstall
Mozilla Thunderbird extensions, push user settings and more - all from a
Mozilla Thunderbird extensions, push user settings and more – all from a
central place managed by system administrators.
Installation
@@ -259,7 +279,7 @@ The syntax is:
----
"<extension ID>"
=> array( "application" => "thunderbird",
"version" => "<exact version found in the extension's manifest.json file>",
"version" => "<exact version found in the extension's install.rdf file>",
"filename" => "<exact filename on the filesystem>" )
----
@@ -0,0 +1,880 @@
Native Microsoft Outlook Configuration Guide
============================================
////
This file is part of the SOGo project.
See SOGo Native Microsoft Outlook Configuration-docinfo.xml for
authors, copyright and license information.
////
include::includes/global-attributes.asciidoc[]
About this Guide
----------------
This guide will walk you through the installation and configuration of
the native Microsoft Outlook compatibility layer SOGo offers.
Prior going over this guide, you should have a working SOGo
installation. Please refer to the _SOGo Installation and Configuration
Guide_ for more information on installing and configuring SOGo.
This guide also includes instructions for configuring Microsoft Outlook
with SOGo.
The instructions are based on version {release_version} of SOGo.
The latest version of this guide is available
at http://www.sogo.nu/downloads/documentation.html.
Introduction
------------
SOGo is a free and modern scalable groupware server. It offers shared
calendars, address books, and emails through your favourite Web browser
and by using a native client such as Mozilla Thunderbird and Lightning.
SOGo is standard-compliant. It supports CalDAV, CardDAV, GroupDAV, iMIP
and iTIP and reuses existing IMAP, SMTP and database servers — making
the solution easy to deploy and interoperable with many applications.
SOGo features:
* Scalable architecture suitable for deployments from dozen to many
thousand users
* Rich Web-based interface that shares the look and feel, the features
and the data of Mozilla Thunderbird and Lightning
* Improved integration with Mozilla Thunderbird and Lightning by using
the SOGo Connector and the SOGo Integrator
* Native compatibility for Microsoft Outlook 2003, 2007, 2010, and 2013
* Two-way synchronization support with any Microsoft ActiveSync-capable
device, and Outlook 2013
SOGo is developed by a community of developers located mainly in North
America and Europe. More information can be found
on http://www.sogo.nu/.
Architecture
------------
The following diagram demonstrates the architecture of the native
Outlook compatibility layer of SOGo.
image::images/openchange.png[]
With Samba 4 and OpenChange, Microsoft Outlook clients can communicate
natively with SOGo using the Microsoft Exchange protocol, without
requiring costly and hard-to-maintain third-party MAPI connectors for
Microsoft Outlook.
Requirements
------------
Organizations generally have solutions to authenticate users such as
LDAP servers or Microsoft Active Directory servers.
The solution being used will influence how users are provisioned in
Samba 4, a key component for native Outlook compatibility in SOGo.
LDAP Server
~~~~~~~~~~~
If your organization uses a LDAP server such OpenLDAP, Novell
eDirectory, Apache Directory or any other solution, you must use
Samba 4's internal directory server and synchronize the data between
both.
Synchronization scripts are not provided and unless you have clear-text
passwords of your existing users, they will have to be changed during
your initial synchronization so that your LDAP's server passwords are
identical to the ones from Samba 4.
Any modifications to your existing LDAP server (password change, user
addition or deletion, etc.) will have to be replicated to Samba 4's
internal directory server.
Note that if you install Samba 4 on a server that is already running a
LDAP service, you will have to change to TCP port on which your LDAP
server listens to. Samba 4 will use the TCP port 389 and it can't be
changed.
For example, with OpenLDAP, you can use the `-h` parameter for `slapd`
to make it listen on an other TCP port.
Microsoft Active Directory
~~~~~~~~~~~~~~~~~~~~~~~~~~
If your organization uses Microsoft Active Directory, Samba 4 will need
to be joined to your Active Directory domain, as a DC.
Samba 4 will be able to reuse all the information contained in Microsoft
Active Directory and no synchronization process needs to be put in place
as information will get replicated to Samba 4 automatically.
For more information on joining Samba 4 to an existing Microsoft Active
Directory domain, please refer to the Samba 4 documentation available at
the following URL:
http://wiki.samba.org/index.php/Samba4
More specifically, have a look at the `samba-tool domain join` command.
Note that joining Samba 4 to your Active Directory domain as a member
will currently not work. An authentication bug is present in Samba 4
which then prevents all Outlook users to successfully authenticate
through Samba 4. This issue has been reported to the Samba team and is
being worked on.
Other or No Solution
~~~~~~~~~~~~~~~~~~~~
If your organization neither uses a LDAP server or Microsoft Active
Directory, you can start using Samba 4 as your directory server.
Samba 4's directory can be queried over LDAP just like Microsoft Active
Directory and can also serve as a domain controller for Windows-based
environments.
For example, SOGo can very well use Samba 4's built-in directory server
to authenticate users. A SOGoUserSources entry to achieve this wold look
like this:
----
su – sogo
defaults write sogod SOGoUserSources '(
{
CNFieldName = displayName;
IDFieldName = cn;
UIDFieldName = sAMAccountName;
baseDN = "cn=Users,dc=example,dc=com";
bindDN = "cn=Administrator,cn=Users,dc=example,dc=com";
bindFields = (
sAMAccountName
);
bindPassword = "%1OpenChange";
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = "127.0.0.1";
id = samba;
isAddressBook = YES;
port = 389;
}
)'
----
Please refer to the _SOGo Installation and Configuration Guide_ for more
information regarding `SOGoUserSources`.
IMAP Server and Trust
~~~~~~~~~~~~~~~~~~~~~
An IMAP server supporting the ACL, UIDPLUS and QRESYNC IMAP extensions
is required, such as Cyrus IMAP version 2.4 or later, or Dovecot version
2.1 or later. If your current IMAP server does not support these
extensions, you can use Dovecot's proxying capabilities. The follow
configuration example makes Dovecot proxy all IMAP request to an
existing server:
----
auth_mechanisms = plain login
imapc_host = inverse.ca
imapc_port = 993
imapc_ssl = imaps
imapc_ssl_verify = no
mail_gid = imapproxy
mail_home = /home/imapproxy/%u
mail_location = imapc:~/imapc
mail_uid = imapproxy
passdb {
args = host=inverse.ca ssl=imaps port=993 ssl_ca_dir=/etc/pki/tls/certs
default_fields = userdb_imapc_user=%u userdb_imapc_password=%w
driver = imap
}
protocols = imap
ssl = no
userdb {
driver = prefetch
}
----
SOGo would then be configured to use Dovecot's proxy as the IMAP server.
Moreover, the authentication mode in use by Windows with Samba and
Exchange servers prevent the backend from knowing the real password
being used by the user. This implies that the IMAP server must accept
any passwords from the host on which Samba is running.
To accomplish this with Cyrus IMAP Server, set `sasl_pwcheck_method`
to `alwaystrue` in `/etc/imapd.conf`. You should restrain this to
an `imapd` instance dedicated to SOGo.
For Dovecot, use an authentication source similar to:
----
passdb {
driver = static
args = nopassword=y allow_nets=127.0.0.1/32
}
----
You should also make sure that you restrain this only to the SOGo
processes.
For any other IMAP server, refer to the product's documentation. If such
capability is not offered, you can alternatively define the cleartext
password for each user. Please refer to the _Adding Users_ section from
this document.
Installation
------------
This section will guide you through the installation of the native
Microsoft Outlook compatibility layer SOGo offers.
////
Red Hat Enterprise Linux v6 x86_64
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are using Red Hat Enterprise Linux version 6 x86_64, packages
for Samba 4, OpenChange and SOGo and the SOGo OpenChange backend are
available from SOGo's web site. Please follow the instructions from
http://www.sogo.nu/english/downloads/backend.html.
In order to satisfy certain dependencies, you should also add the EPEL
source corresponding to your distribution and architecture. More
information on this is available here:
http://fedoraproject.org/wiki/EPEL – or more specifically,
http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F.
Once ready, install the OpenChange packages on top of an existing SOGo
installation:
----
yum clean all && yum makecache
yum install samba \
openchange \
sogo-openchange-backend \
openchange-ocsmanager \
openchange-rpcproxy \
mysql-server \
MySQL-python
----
Once the packages are installed, refer to the _Configuration_ chapter
from this guide.
[NOTE]
Samba4/OpenChange are not available for now on CentOS 5 i386/x86_64,
and CentOS 7. On Debian-based systems, packages are available only on
the x86_64 platform.
Debian 7 (Wheezy) and Ubuntu 12.04 (Precise Pangolin)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOGo, OpenChange and the SOGo OpenChange backend are now
available from SOGo's web site. Please follow the instructions from
http://www.sogo.nu/english/downloads/backend.html to setup your
apt sources.
On Debian7, for some Samba 4 dependencies, you need to use the
_wheezy-backports_ repository. To do so, create
`/etc/apt/sources.list.d/backports.list` with the following
content:
deb http://http.debian.net/debian wheezy-backports main
Then install Samba 4 on top of an existing SOGo
installation:
----
apt-get update
apt-get install samba samba-dev
----
Once completed, install the packages related to OpenChange and the SOGo
provider:
----
apt-get install openchangeserver \
sogo-openchange \
openchangeproxy \
python-ocsmanager \
mysql-server \
python-mysqldb \
openchange-ocsmanager \
openchange-rpcproxy \
python-sievelib \
python-spyne \
python-rpclib
----
Once the packages are installed, refer to the _Configuration_ chapter
from this guide.
[NOTE]
On Ubuntu 12.04, the Samba init scripts need to be modified to
disable the upstart check. For more details, refer to:
https://wiki.samba.org/index.php/Samba4/InitScript
////
Debian 8 (Jessie) and Ubuntu 14.04 (Trusty Tahr)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please follow the instructions from
http://www.sogo.nu/english/downloads/backend.html to setup your
apt sources.
Then install Samba 4 on top of an existing SOGo
installation:
----
apt-get update
apt-get install samba samba-dev
----
Once completed, install the packages related to OpenChange and the SOGo
provider:
----
apt-get install openchangeserver \
sogo-openchange \
openchangeproxy \
python-ocsmanager \
mysql-server \
python-mysqldb \
openchange-ocsmanager \
openchange-rpcproxy \
python-sievelib \
python-spyne \
python-rpclib
----
Once the packages are installed, refer to the _Configuration_ chapter
from this guide.
[NOTE]
The `ocsmanager.conf` and `rpcproxy.conf` are currently located in
`/etc/apache2/conf.d`. These should be moved to `/etc/apache2/conf-available`.
This is a packaging error that will soon be fixed.
[NOTE]
You might have to adjust the `rpcproxy.conf` configuration file to add the
`Require all granted` permission if you get Apache errors such as
`client denied by server configuration`.
Configuration
-------------
In this section, you'll learn how to configure the native Microsoft
Outlook compatibility layer that SOGo offers.
SOGo Configuration
~~~~~~~~~~~~~~~~~~
First thing to do is to configure SOGo to use your current services,
which are your IMAP, SMTP and SQL database servers. The configuration
instructions for this are available in the SOGo Installation and
Configuration Guide available from http://www.sogo.nu/.
Please refer to that documentation before continuing with the
instructions included in this guide.
Samba 4 Configuration
~~~~~~~~~~~~~~~~~~~~~
Run the following commands as root: 
----
samba-tool domain provision --realm=example.com \
--domain=EXAMPLE \
--adminpass='%1OpenChange' \
--server-role='domain controller'
samba-tool user setexpiry administrator --noexpiry
----
You might consider changing the realm and domain used, to suit your
environment.
You might also have to
remove `/etc/samba/smb.conf` prior running this command.
Add the following parameters to the `[global]` section of the
`/etc/samba/smb.conf` configuration file:
----
### Configuration required by OpenChange server ###
dsdb:schema update allowed = true
dcerpc endpoint servers = epmapper, mapiproxy, dnsserver
dcerpc_mapiproxy:server = true
dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
### Configuration required by OpenChange server ###
----
Your Samba 4 configuration file should look like this:
----
# Global parameters
[global]
server role = active directory domain controller
workgroup = EXAMPLE
realm = example.com
netbios name = sogo
passdb backend = samba4
### Configuration required by OpenChange server ###
dsdb:schema update allowed = true
dcerpc endpoint servers = +epmapper, +mapiproxy
dcerpc_mapiproxy:server = true
dcerpc_mapiproxy:interfaces = exchange_emsmdb, exchange_nsp, exchange_ds_rfr
### Configuration required by OpenChange server ###
[netlogon]
path = /var/lib/samba/sysvol/example.com/scripts
read only = No
[sysvol]
path = /var/lib/samba/sysvol
read only = No
----
OpenChange Configuration
~~~~~~~~~~~~~~~~~~~~~~~~
Since v2.2, OpenChange stores its metadata in MySQL so you need to have it installed.
First, create the OpenChange MySQL user:
----
$ mysql -u root -p
mysql> CREATE USER 'openchange-user'@'localhost' IDENTIFIED BY 'openchange$123';
mysql> GRANT ALL PRIVILEGES ON `openchange`.* TO 'openchange-user'@'localhost' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
----
The Samba AD schema needs to be filled with additional object
definitions by running the following commands: 
----
openchange_provision --standalone
NOTE: This operation can take several minutes
[+] Step 1: Register Exchange OIDs
[+] Step 2: Add Exchange attributes to Samba schema
[+] Step 3: Add Exchange auxiliary classes to Samba schema
[+] Step 4: Add Exchange objectCategory to Samba schema
[+] Step 5: Add Exchange containers to Samba schema
[+] Step 6: Add Exchange *sub* containers to Samba schema
[+] Step 7: Add Exchange CfgProtocol subcontainers to Samba schema
[+] Step 8: Add Exchange mailGateway subcontainers to Samba schema
[+] Step 9: Add Exchange classes to Samba schema
[+] Step 10: Add possSuperior attributes to Exchange classes
[+] Step 11: Extend existing Samba classes and attributes
[+] Step 12: Generic Exchange configuration objects
[+] Step 13: Finalize generic Exchange configuration objects
[SUCCESS] Done!
[+] Step 1: Exchange Samba registration
[SUCCESS] Done!
[+] Step 1: Register Exchange Samba as the main server
[SUCCESS] Done!
----
Create the OpenChange database: 
----
openchange_provision --openchangedb --openchangedb-uri 'mysql://openchange-user:openchange$123@localhost/openchange'
Setting up openchange db
[+] Public Folders
===================
* Public Folder Root : 0x0100000000000001 (72057594037927937)
* IPM_SUBTREE : 0x0200000000000001 (144115188075855873)
* NON_IPM_SUBTREE : 0x0300000000000001 (216172782113783809)
* EFORMS REGISTRY : 0x0400000000000001 (288230376151711745)
* OFFLINE ADDRESS BOOK : 0x0500000000000001 (360287970189639681)
* /o=First Organization/cn=addrlists/cn=oabs/cn=Default Offline Address Book: 0x0600000000000001 (432345564227567617)
* SCHEDULE+ FREE BUSY : 0x0700000000000001 (504403158265495553)
* EX:/o=first organization/ou=first administrative group: 0x0800000000000001 (576460752303423489)
* Events Root : 0x0900000000000001 (648518346341351425)
----
Finally, modify `/etc/samba/smb.conf` to specify OpenChange connection information
for its indexing database. Add the following at the end of the `[global]` section:
----
mapistore:namedproperties = mysql
namedproperties:mysql_user = openchange-user
namedproperties:mysql_pass = openchange$123
namedproperties:mysql_host = localhost
namedproperties:mysql_db = openchange
mapistore:indexing_backend = mysql://openchange-user:openchange$123@localhost/openchange
mapiproxy:openchangedb = mysql://openchange-user:openchange$123@localhost/openchange
----
////
On RHEL, make sure SELinux is disabled:
setenforce 0
////
Next, you can start Samba using the usual command:
/etc/init.d/samba start
On upstart-based distributions, use:
start samba-ad-dc
You can also launch the OpenChange web services:
/etc/init.d/openchange-ocsmanager start
Apache Configuration for Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The OpenChange web services consist of two components:
1. *OCS Manager* which is used for autodiscovery and freebusy lookups on
Outlook 2007 and 2010. This service runs in its own application server
which listens on `127.0.0.1:5000` by default. Apache needs to be
configured to forward certain requests to it to make it accessible from
the outside.
Note that this service *MUST* be accessible over*HTTPS*, otherwise Outlook
won't use it.
2. *RPC Proxy* which is used for RPC over HTTP ("Outlook Anywhere").
This service runs as a WSGI application under apache (mod_wsgi).
While HTTPS is not required to access this service, it is strongly
recommended.
////
On RHEL-based distributions, the apache configuration required by these
services can be found in `/etc/httpd/conf.d/ocsmanager.conf` and
`/etc/httpd/conf.d/rpcproxy.conf`.
////
For Debian-based distributions, these files can be found
in `/etc/apache2/conf.d/` or `/etc/apache2/conf-available`.
The configuration requires three Apache modules:  _mod_proxy_,
_mod_proxy_http_ and _mod_wsgi_. These are usually already installed but
might need to be activated on Debian-based installations:
a2enmod proxy proxy_http wsgi
The OCS Manager and RPC Proxy configuration module can be enabled using:
a2enconf ocsmanager
a2enconf rpcproxy
////
On RHEL-based distributions, make sure the `LoadModule` directive is
uncommented in `/etc/httpd/conf.d/wsgi.conf`.
////
The _reqtimeout_ apache module is known to cause problems when using the
default configuration shipped with Debian-based systems. On such
distributions, Apache will close (HTTP/1.1 500) any HTTP request for
which the HTTP body hasn't arrived in 10 seconds.
While this is arguably good practice with regular HTTP, it will disrupt
the RPC over HTTP protocol implemented by RPC Proxy: Outlook will
continuously disconnect and reconnect leading to suboptimal performance.
To avoid this problem, use a much higher timeout or disable the module:
a2dismod reqtimeout
You should now restart the Apache service and make sure it will start on
boot.
////
On RHEL-based distributions, do:
chkconfig httpd on && /etc/init.d/httpd restart
////
On Debian-based distributions, do:
update-rc.d apache2 defaults && /etc/init.d/apache2 restart
Finally, you must adjust the OCS Manager configuration file, which is
located in `/etc/ocsmanager/ocsmanager.ini`. You should enable LDAP-based
authentication in the `main` section and configure it accordingly. You should
also enable rpcproxy. You file should be similar to this one:
----
[DEFAULT]
debug = true
email_to = you@yourdomain.com
smtp_server = localhost
error_email_from = paste@localhost
[main]
auth = ldap
mapistore_root = /var/lib/samba/private
mapistore_data = /var/lib/samba/private/mapistore
debug = yes
[auth:file]
[auth:ldap]
host = ldap://127.0.0.1
port = 389
bind_dn = cn=administrator,cn=Users,dc=example,dc=com
bind_pw = %1OpenChange
basedn = cn=Users,dc=example,dc=com
[auth:single]
username = openchange
password = {SSHA}I6Hy5Wv0wuxyXvMBFWFQDVVN12_CLaX9
[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 5000
protocol_version = HTTP/1.1
[app:main]
use = egg:ocsmanager
full_stack = true
static_files = true
cache_dir = %(here)s/data
beaker.session.key = ocsmanager
beaker.session.secret = SDyKK3dKyDgW0mlpqttTMGU1f
app_instance_uuid = {ee533ebc-f266-49d1-ae10-d017ee6aa98c}
NTLMAUTHHANDLER_WORKDIR = /var/cache/ntlmauthhandler
SAMBA_HOST = 127.0.0.1
[rpcproxy:ldap]
host = localhost
port = 389
basedn = CN=Users,DC=example,DC=com
set debug = true
----
----
[autodiscover]
[autodiscover:rpcproxy]
enabled = true
[outofoffice]
[outofoffice:file]
sieve_script_path = /var/vmail/$domain/$user/sieve-script
sieve_script_path_mkdir = false
[outofoffice:managesieve]
secret = secret
[loggers]
keys = root
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] [%(threadName)s] %(message)s
----
Once completed, start the OCS Manager service:
/etc/init.d/openchange-ocsmanager start
Name Service Configuration for Web Services
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The autodiscovery service must be made accessible in order to advertise
the web services provided by OpenChange. This can be done in two ways.
1. The first is to associate the FQDN `autodiscover.example.com.` with
the machine that hosts Samba 4 / OpenChange, by adding a `CNAME` entry
in your DNS configuration. Note that, instead or changing your DNS
server configuration, you can simply add a similar entry to the _hosts_
file of the Windows machine from where you'll run Outlook, which is
handy for testing purposes.
2. The second option is to add a `SRV` entry to your DNS configuration
where the `_service` value would be `Autodiscover` and the `_protocol`
would be `_tcp`.
For example:
_autodiscover._tcp.example.com. IN SRV 0 0 443 sogo.example.com.
Again, the autodiscovery service must be accessible over HTTPS.
Adding Users
------------
Users that wish to connect natively to SOGo must be provisioned in
Samba 4 and in OpenChange – even if they already exist in your current
LDAP or Microsoft Active Directory server.
To add a user, execute the following commands: 
----
# add user to samba
samba-tool domain passwordsettings set --complexity=off
samba-tool domain passwordsettings set --min-pwd-length=1
samba-tool user add <username>
samba-tool user setexpiry <username> --noexpiry
# create user in openchange
openchange_newuser --create <username>
----
If you don't have a trust between your IMAP server and SOGo, you must at
this point set the cleartext password of the newly created user in
`/var/lib/samba/private/mapistore/<username/password`.
This per-user file contains the cleartext password of the user as a
UTF-8 string, on a single line. This password will be used to
authenticate SOGo/OpenChange storage provider to your IMAP server.
Microsoft Outlook Configuration
-------------------------------
To connect Microsoft Outlook, you can either use the IP address of the
server or its DNS name. If you prefer using the DNS name, add an entry
like the following to the `c:\windows\system32\drivers\etc\hosts` file
in order to associate the IP address with the right DNS names:
192.168.1.1 sogo.example.com autodiscover.example.com
Next, you must configure Microsoft Outlook.
* Open the Control Panel => Mail => Email Accounts.
* Select _Add a new e-mail account_
* Choose _Microsoft Exchange Server_
* Fill the required information. Enter the DNS name or the IP address of
your SOGo server in the _Microsoft Exchange Server_ field
* Leave the _Use Cached Exchange Mode_ checkbox enabled
* Enter your username in the _User Name_ field
* Click on _More Settings_ and ignore the warning, if any, about
Exchange being offline by clicking on Cancel
* From the Security tab, enable Always prompt for user name and password
* From the _Connection_ tab, enable _"Outlook Anywhere"_ if you plan to
use Outlook outside of your LAN. Moreover, click on the _Exchange Proxy
Settings..._ button to enable it for slow and fast networks. Specify
also the host, which should be the same value you specified in the
Microsoft Exchange Server field.
* Finally, click on Check Name and confirm your username and password
Start Microsoft Outlook and enter your username and password. It will
start to synchronize your mailbox. This could take a long time if you
have many emails, events, tasks and contacts. Once this step is
completed, check the autodiscovery service with Outlook 2007 or 2010 by
simultaneously holding the CTRL key on your keyboard and right-clicking
on the Outlook icon in the notification toolbar. A special entry named
"Test E-mail AutoConfiguration..." will appear and will enable you to
check the service.
Known Issues or Limitations
---------------------------
* Make sure you periodically backup all your data regarding SOGo.
* Make sure you have no firewalls activated between your Microsoft
Outlook clients and the SOGo server with Native Outlook Compatibility
module. If you do, use "Outlook Anywhere" to connect Outlook to
SOGo/OpenChange.
Current Limitations
~~~~~~~~~~~~~~~~~~~
The current version of the Native Microsoft Outlook compatibility layer
has some limitations.
Those limitations will be overcome in the upcoming releases. If you are
interested in having those limitations fixed more rapidly, please
contact Inverse by sending an email to support@inverse.ca.
General
^^^^^^^
* If you can't see any email's content with Microsoft Outlook 2007,
install the latest Service Pack available from Microsoft's website for
this specific version. Microsoft Outlook 2007 (12.0.6423.100) SP2 MSO
(12.0.6425.1000) is known to work.
* When you create a new Microsoft Outlook profile, not all folders might
be synchronized during the first start. Simply select the appropriate
folder and click "Send and Receive". Synchronizing a folder may take
some time. For example, a folder with 1000 email messages might take
around 5 minutes based on the underlying hardware.
* Errors when synchronizing the "Offline Address Book" are normal and
can be ignored for now. This feature is currently not supported.
* If you face strange issues from Microsoft Outlook, you might want to
remove any data associated with the user from the SOGo server and
recreate a Microsoft Outlook profile.
To remove any data associated to a user, use
the `openchange_user_cleanup` script distributed with OpenChange. The script
can be found in `/usr/share/openchange/`.
To reset a user, run the script as root:
`openchange_user_cleanup username`. See the usage output for additional options.
* The "Out of Office Assistant" will not currently work. This feature
has not been implemented.
* Creating folders below INBOX (when not normally permitted by the IMAP
server), below the Personal Calendar or Personal Address Book will work
in Outlook cached mode but the server-side operation will fail and these
folders will never be created. Potentially data loss can occur if the
Outlook profile is destroyed. If you wan to create additional top-level
mail folders, calendars or address books, open Outlook's folder list,
select the top level node (usually, "email@example.com") and choose "New
Folder..." from the contextual menu. Choose the relevant item types.
Mail
^^^^
* Sharing mail folders is not supported.
* To avoid possibly lossy conversion from RTF to HTML, Outlook should be
configured to send all mails as HTML (or plaintext) instead of _Outlook
Rich Text Format_.
Calendar
^^^^^^^^
* Labels will not work.
* It might be impossible to view event details from a shared calendar.
This issue is being worked on.
Tasks
^^^^^
* Tasks with start/due dates created from Outlook might not appear
correctly in SOGo due to a timezone issue.
* Reminders are not yet supported.
* Assigning tasks will not work.
Contacts
^^^^^^^^
* Categories will not work.
* Distribution lists will not work.
* Under Microsoft Outlook 2010, the special folder "Suggested Contacts"
will not work.
* The "Offline Address Book" will not work. This feature is not yet
supported.
Notes
^^^^^
* Notes are not synchronized in any ways with SOGo. The current version
of SOGo lacks support for notes.
If you notice anything else, please send contact Inverse by sending an
email to support@inverse.ca.
include::includes/additional-info.asciidoc[]
include::includes/commercial-support.asciidoc[]
@@ -1,495 +0,0 @@
Microsoft Outlook CalDAVSynchronizer Configuration Guide
========================================================
////
This file is part of the SOGo project.
See includes/global-attributes.asciidoc
for authors, copyright and license information.
////
include::includes/global-attributes.asciidoc[]
About this Guide
----------------
This guide will walk you through the installation and configuration of Microsoft Outlook for a better integration with SOGo through the use of the CalDavSynchronizer addon.
Prior going over this guide, you should have a working SOGo
installation. Please refer to the _SOGo Installation and Configuration
Guide_ for more information on installing and configuring SOGo.
The instructions are based on version {release_version} of SOGo.
The latest version of this guide is available
at https://sogo.nu/downloads/documentation.html.
Introduction
------------
Outlook CalDav Synchronizer is an open source addon for Microsoft Windows Outlook. It synchronizes events, tasks and contacts between Microsoft Outlook and CalDAV or CardDAV servers. Supported Outlook versions are Outlook 2007 to Outlook 2016.
Together with other open source solutions like SOGo, a full open source Microsoft Exchange server replacement for desktop users is finally possible and enterprise ready.
Outlook CalDav Synchronizer is Free and Open-Source Software (FOSS) , licensed under AGPL3 and developed by
* https://sourceforge.net/u/nertsch/profile/[Gerhard Zehetbauer]
* https://sourceforge.net/u/nimm/profile/[Alexander Nimmervoll]
Project Links
~~~~~~~~~~~~~
The project source and binaries for installation are hosted on GitHub and SourceForge or can be downloaded from https://caldavsynchronizer.org[caldavsynchronizer.org]
* https://github.com/aluxnimm/outlookcaldavsynchronizer
* https://sourceforge.net/projects/outlookcaldavsynchronizer/
Social Media
~~~~~~~~~~~~
https://www.facebook.com/caldavsynchronizer/[CalDav Synchronizer on Facebook]
Enterprise Support
~~~~~~~~~~~~~~~~~~
Alinto (https://alinto.com/[http://alinto.com]) offers professional services around SOGo to help organizations deploy the solution and
migrate from their legacy systems.
For enterprise support on the integration between SOGo and Microsoft Outlook using the Outlook CalDav Synchronizer, please visit https://caldavsynchronizer.org/enterprise
Features
--------
The most important features are
* Open Source, the only free Outlook CalDAV and CardDAV addon
* two-way-sync
* support for CalDAV calendars and tasks, CardDAV contacts
* support for Google native Contacts and Tasks API
* full support for timezones and recurring events with exceptions
* SSL/TLS support, support for self-signed certificates
* proxy support
* Autodiscovery of calendars and addressbooks
* configurable sync timerange filter
* time-triggered-sync and sync changes from Outlook immediately
* Category Filtering (sync CalDAV calendar/tasks to Outlook categories)
* map CalDAV server colors to Outlook category colors
* Use server settings from Outlook IMAP/POP3 account profile
* Mapping of Distribution Lists to SOGo VLIST contact groups
* Configurable mapping of Outlook custom properties
Installation
------------
Download and extract the `OutlookCalDavSynchronizer-<Version>.zip` into any directory and start setup.exe. You can change the default install path, but you need to use a directory on the `C:\` drive. Follow the instructions and restart Outlook after the installation is finished.
image::images/installer1.png[scaledwidth="100%",alt="Installer Step 1"]
image::images/installer2.png[scaledwidth="100%",alt="Installer Step 2"]
Next, you will see a ribbon CalDav Synchronizer in Outlook and can add synchronization profiles for you SOGo calendars, addressbooks and tasks.
image::images/outlook_ribbon.png[scaledwidth="100%",alt="Outlook Ribbon"]
In the Synchronization profiles dialog, press *Add new profile* if you just need to synchronize one resource or *Add multiple profiles* if you need to synchronize multiple calendars, addressbooks or task folders.
image::images/add_multiple.png[scaledwidth="75%",alt="Add multiple profiles"]
Next, select the SOGo profile type
image::images/select_profiletype.png[scaledwidth="100%",alt="Select Profile type"]
In the multiple profile setup dialog you can configure the details of the sync profiles.
image::images/configure_multiple.png[scaledwidth="100%",alt="Multiple Profile Configuration"]
First, you should change the profile name and configure the server settings, the DAV URL is prefilled with the default SOGo DAV path and you should only change the hostname of your SOGo server, enter Username and Password. If you also have configured an IMAP account and your domain supports autodiscovery using DNS SRV records you can also try to fetch the server settings from your existing mail account in Outlook by pressing *Get IMAP/POP3 account settings*. If successful, username and password will be used from the existing mail account and the DAV URL will be discovered.
If all server settings are configured press *Discover resources and assign to Outlook folders* to start the autodiscovery of all server resources.
You can assign Outlook folders to found calendar, addressbook and task resources in the three tab views.
image::images/select_calendar.png[scaledwidth="100%",alt="Add calendar resources"]
image::images/select_addressbook.png[scaledwidth="100%",alt="Add addressbook resources"]
image::images/select_task.png[scaledwidth="100%",alt="Add task resources"]
To assign a folder click on the "..." button for the corresponding resource and either choose an existing Outlook folder or create a new one in the folder dialog.
image::images/select_folder.png[scaledwidth="60%",alt="Select Outlook folder"]
image::images/new_folder.png[scaledwidth="60%",alt="Add new Outlook folder"]
If you chose *Add new profile* for only one resource you can also choose the Outlook folder and dependent on the folder type you will create a calendar, addressbook or task profile.
image::images/profile_config.png[scaledwidth="100%",alt="Single Profile Configuration"]
If you know the correct calendar CalDAV URL, you can also enter that directly into the DAV Url textbox or paste it from the SOGo Web Frontend, when selecting Link in the calendar properties. For the personal calendar it looks like
https://server.example/remote.php/dav/calendars/caldav/personal/
Furthermore, you can configure sync settings and intervals or keep the default settings which are automatic Two-Way-Sync every 30 minutes for all events from 60 days in the past to 365 days in the future.
image::images/profile_advanced.png[scaledwidth="100%",alt="Advanced Settings"]
For addressbooks, the profile setup is similar, just choose an Outlook contacts folder for synchronization.
If needed, you can configure network and proxy options or special mapping configuration parameters in the corresponding option pages.
image::images/profile_network.png[scaledwidth="100%",alt="Network settings"]
image::images/profile_advanced_event_mapping.png[scaledwidth="100%",alt="Event mapping configuration"]
image::images/profile_advanced_contact_mapping.png[scaledwidth="100%",alt="Contact mapping configuration"]
image::images/profile_advanced_task_mapping.png[scaledwidth="100%",alt="Task mapping configuration"]
image::images/profile_advanced_custom_mapping.png[scaledwidth="100%",alt="Custom mapping configuration"]
See *Advanced settings* below for a detailed description of all available options.
After the configuration of the sync profile is finished you can start the synchronization with pressing *Synchronize now* in the CalDav Synchronizer ribbon and your Outlook resources will be in sync with your SOGo resources.
You can check the status of the last sync runs with the *Status* button in the ribbon.
image::images/status_report.png[scaledwidth="50%",alt="Status report"]
Should there be any errors or warnings during synchronization, you can check the *Reports* in the ribbon.
image::images/sync_report.png[scaledwidth="100%",alt="Sync report"]
Configuration Options
---------------------
Synchronization Settings
~~~~~~~~~~~~~~~~~~~~~~~~
* *Outlook → Server (Replicate):* syncronize everything from Outlook to the server (one way)
* *Outlook ← Server (Replicate):* synchronize everything from the server to Outlook (one way)
* *Outlook → Server (Merge):* synchronize everything from Outlook to the server but don’t change events created on the server
* *Outlook ← Server (Merge):* synchronize everything from the server to Outlook but don’t change events created in Outlook
* *Outlook ←→ Server (Two-Way):* Two-Way synchronization between Outlook and the server with one of the following conflict resolution
* *Conflict resolution*
(only used in Two-Way synchronization mode and only available in *advanced settings*)
** *Outlook Wins:* If an event is modified in Outlook and in the server since last snyc, use the Outlook version. If an event is modified in Outlook and deleted in the server since last snyc, also use the Outlook version. If an event is deleted in Outlook and modified in the server, also delete it in the server.
** *Server Wins:* If an event is modified in Outlook and in the server since last snyc, use the server version. If an event is modified in Outlook and deleted in the server since last snyc, also delete it in Outlook. If an event is deleted in Outlook and modified in the server, recreate it in Outlook.
** *Automatic:* If event is modified in Outlook and in the server since last snyc, use the last recent modified version. If an event is modified in Outlook and deleted in the server since last snyc, delete it also in Outlook. If an event is deleted in Outlook and modified in the server, also delete it in the server.
* *Synchronization interval (minutes):* Choose the interval for synchronization in minutes, if 'Manual only' is choosen, there is no automatic sync but you can use the 'Synchronize now' menu item.
* *Perform synchronization in chunks* perform CalDAV/CardDAV sync in chunks with configurable chunk size to avoid OutOfMemoryEceptions, enabled by default because of lower memory consumption for huge resources. *(only in advanced settings)*
* *Use time range filter* *(only in advanced settings)*
For performance reasons it is useful to sync only a given timespan of a big calendar, especially past events are normally not necessary to sync after a given timespan. But be aware that Outlook and Google and some other CalDAV servers calculate the intersection with the time-range differently for recurring events which can cause doubled or deleted events, so it is recommended to select a time-range which is larger than the largest interval of your recurring events (e.g. 1 year for birthdays).
Advanced Settings
~~~~~~~~~~~~~~~~~
When *Show advanced settings* is enabled, you can expand the tree view of the profile to configure network and proxy options and mapping configuration options.
Network and Proxy Options
^^^^^^^^^^^^^^^^^^^^^^^^^
Here you can configure advanced network options and proxy settings.
* *Close connection after each request* Don’t use KeepAlive, only useful for servers which don’t support it.
* *Use Preemptive Authentication* Send Authentication header with each request to avoid 401 responses and resending the request, disable only if the server has problems with preemptive authentication.
* *Force basic authentication* Set basic authentication headers to avoid problems with negotiation or digest authentication with servers like Apple OS X / macOS. This is only recommended if you use a secure HTTPS connection, otherwise passwords are sent in cleartext.
* *Use System Default Proxy* Use proxy settings from Internet Explorer or config file, uses default credentials if available for NTLM authentication.
* *Use manual proxy configuration* Specify proxy URL as `http://<your-proxy-domain>:<your-proxy-port>` and optional Username and Password for Basic Authentication.
Mapping Configuration
^^^^^^^^^^^^^^^^^^^^^
Here you can configure what properties should be synced.
Event Mapping Configuration
+++++++++++++++++++++++++++
For appointments you can choose if you want to map reminders (just upcoming, all or none) and the description body.
* *Export html description X-ALT-DESC converted from RTF Body* If enabled, convert formatted RTF Body of Outlook appointment to html and export it as X-ALT-DESC property. The RTF to html conversion is experimental, inline images and some formatting properties can’t be converted! Be aware that some servers like Google Calendar drop this attribute!
* *Set RTF Body from X-ALT-DESC html description* If enabled, convert X-ALT-DESC description html property to RTF and set Outlook appointment RTF Body. The html to RTF conversion is experimental, not all html formatting options can be converted! This overwrites also the plaintext Body!
* *Timezone settings* See section Timezone mapping below.
*Use GlobalAppointmentID for UID attribute:* Use Outlook GlobalAppointmendID instead of random Guid for UID attribute in new CalDAV events. This can avoid duplicate events from invitations.
* In *Privacy settings* you can configure if you want to map Outlook private appointments to CLASS:CONFIDENTIAL and vice versa. This could be useful for Owncloud for example, if you share your calendar with others and they should see start/end dates of your private appointments. You can also map all CLASS:PUBLIC events to Outlook private appointments.
* In *Scheduling settings* you can configure if you want to map attendees and organizer and if notifications should be sent by the server.
* Use *Don’t send appointment notifications* for SOGo servers and *SCHEDULE-AGENT=CLIENT* for other servers if you want to send invitations from Outlook and avoid that the server sends invitations too, but be aware that not all servers (e.g. Google) support the SCHEDULE-AGENT=CLIENT setting.
* In *Outlook settings* you can also define a filter category so that multiple CalDAV-Calendars can be synchronized into one Outlook calendar via the defined category (see Category Filter and Color below).
* *Cleanup duplicate events after each sync run:* removes duplicate Outlook appointments based on start,end and subject of the events after each sync run, be aware of possible performance penalties with this option enabled.
Contact Mapping Configuration
+++++++++++++++++++++++++++++
* For contacts you can configure if birthdays should be mapped or not. If birthdays are mapped, Outlook also creates an recurring appointment for every contact with a defined birthday.
* You can also configure if contact photos should be mapped or not. Contact photo mapping from Outlook to the server doesn’t work in Outlook 2007. You can also add an option to not overwrite the contact photo in Outlook when it changes on the server, which could happen due to other mobile clients reducing the resolution for example.
* Don’t overwrite FileAs in Outlook uses the Outlook settings for FileAs and doesn’t overwrite the contact FileAs with the FN from the server.
* Fix imported phone number format adds round brackets to the area code of phone numbers, so that Outlook can show correct phone number details with country and area code, e.g. +1 23 45678 is mapped to +1 (23) 45678.
* Map OutlookEmailAddress1 to WORK instead of HOME, enable when you need to change the order of email address mapping.
* Write IM addresses as IMPP attributes. If enabled IMPP is used instead of X-AIM,X-ICQ,X-JABBER etc. for writing Instant messenger addresses in vCards. (SOGo is only using X-AIM atm.)
* Default IM protocol. Choose the default IM service type protocol which will be added to the chat address field from Outlook when writing vCards, defaults to AIM.
* Map Distribution Lists enables the sync of contact groups / Distribution Lists, right now the DAV contact group format SOGo VLIST or vCards with KIND:group are available, see *Distribution Lists* below.
Task Mapping Configuration
++++++++++++++++++++++++++
* For tasks (not for Google task profiles) you can configure if you want to map reminders (just upcoming, all or none), the priority of the task, the description body and if recurring tasks should be synchronized.
* You can also define if task start and due dates should be mapped as floating without timezone to avoid issues with tasks across different timezones.
* Similar to calendars you can also define a filter category so that multiple CalDAV Tasklists can be synchronized into one Outlook task folder via the defined category.
Timezone Settings
^^^^^^^^^^^^^^^^^
Outlook and Windows use different timezone definitions than most CalDAV servers and other clients. When adding new events on the server you have different options how the timezone of the newly created VEVENT is generated. The default setting uses the default Windows timezone from Outlook (e.g. W. Europe Standard Time) or the selected timezones for the start and end of the appointment. Since some servers have problems with that timezone definitions you can change that behaviour in the event mapping configuration with the following options:
* *Create events on server in UTC* Use UTC instead of Outlook Appointment Timezone for creating events on CalDAV server. Not recommended for general use, because recurrence exceptions over DST changes can’t be mapped and Appointments with different start and end timezones can’t be represented.
* *Create events on server in downloaded IANA Timezones* Use IANA instead of Windows Timezones for creating events on CalDAV server. Needed for servers which do not accept non standard Windows Timezones like GMX for example. Timezone definitions will be downloaded from http://tzurl.org.
* *Use IANA Timezone* Use this IANA timezone for default Outlook/Windows timezone. Manually selected different timezones in Outlook appointments will be mapped to first corresponding IANA timezone.
* *Include full IANA zone with historical data* Use full IANA timezone definition with historical data. Needs more bandwith and can be incompatible when manually importing in Outlook.
Custom Properties Mapping
^^^^^^^^^^^^^^^^^^^^^^^^^
When you expand the tree view of the profile for events and tasks, you can configure the mapping of custom properties.
* *Map all Outlook custom properties to X-CALDAVSYNCHRONIZER attributes* If enabled, all Outlook custom text properties of the appointment/task are mapped to DAV attributes with the prefix X-CALDAVSYNCHRONIZER- and vice versa.
* You can also define manual mapping pairs of Outlook custom attributes and DAV X-Attributes. This will overrule the general mapping of all Outlook custom properties if both is activated. Outlook properties that don’t exist, will be created. DAV properties MUST start with X-. Only Outlook custom properties of type Text can be mapped.
Managing Meetings and Invites
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Outlook can only track meeting responses and invites in the main calender folder. If you schedule meetings from Outlook which are synced with the CalDAV server you have two possibilities to avoid double invitation mails for all attendees. First, you can enable the option *Don’t send appointment notifications (enabled by default for SOGo profiles)* or *SCHEDULE-AGENT=CLIENT* (for other servers) and let only Outlook send the meeting invites, if the server supports this option. Or you can disable this option and let the server schedule the meetings after syncing the meeting. Then you need to disable the invitation mails sent from Outlook. This is possible by unchecking the checkbox left to the attendee name in the meeting planning dialog. When syncing meetings created in Outlook to the server, the option *Use GlobalAppointmentID for UID attribute* is recommended. This can avoid duplicate events from invitations.
The response status of all attendees can be synced from Outlook to the server but only the status of the own Outlook identity (if included in the attendees) can be synced from the server to Outlook due to limitations of the Outlook Object Model.
When receiving invites from the CalDAV server and via Email in your INBOX, Outlook will automatically create a tentative meeting in the main calendar folder
To avoid double meetings the option *Cleanup duplicate events after each sync run* in event mapping configuration is recommended.
Free/busy Lookups
^^^^^^^^^^^^^^^^^
You can configure free/busy lookups globally in the Outlook options.
Select Options/Calendar and there free/busy information and use a free/busy URL of your server with placeholder like %Name%, e.g. http://myserver/freebusy.php/%Name%
For SOGo the URL looks like: http://<hostname>/SOGo/dav/public/%NAME%/freebusy.ifb
And `SOGoEnablePublicAccess` must be set to `YES`
Then every attendee in the Outlook planning view gets resolved with that URL for a free/busy lookup against your server.
Scheduling Settings and Resources
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If your server supports resources (for SOGo see http://wiki.sogo.nu/ResourceConfiguration disable *set SCHEDULE-AGENT=CLIENT* in Mapping Configuration, so that the server can handle the resource invitation mails, add the resource email adress as attendee in the Outlook appointment and choose type ressource (house icon) for it.
Category Filter and Color
~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to sync multiple CalDAV calendars or task lists into one Outlook folder you can configure an Outlook category for filtering in the *Mapping Configuration*. You can choose a category from the dropdown list of all available Outlook categories or enter a new category name.
For all events/tasks from the server the defined category is added in Outlook, when syncing back from Outlook to the server only appointments/tasks with that category are considered but the filter category is removed. The category name must not contain any commas or semicolons!
With the checkbox *Sync also Appointments without any category* also all appointments/tasks without a category are synced to the server.
With the checkbox below you can alternatively negate the filter and sync all appointments/tasks except this category.
For calendars it is also possible to choose the color of the category or to fetch the calendar color from the server and map it to the nearest supported Outlook category color with the button *Fetch Color*. With *Set DAV Color* it is also possible to sync the choosen category color back to set the server calendar color accordingly. With *Category Shortcut Key* you can define the shortcut key of the selected category for easier access when creating appointments.
Reminders
~~~~~~~~~
In event and task mapping configuration you can define if you want to map (all/non/just upcoming) reminders. If you get the following error message when trying to set reminders in Outlook
`The reminder will not appear because the item is in a folder that doesn’t support reminders.`
you can try to change the Outlook options as discussed in
http://answers.microsoft.com/en-us/office/forum/office_2016-outlook/outlook-2016-calendar-reminders/8f40bcdd-e3fc-4f29-acaf-544f48d63992
or try the following reported by user __Todo18__
1. Create a new storage folder in Outlook via the File menu, Info, Account Settings. In the Data Files tab, you can Add a new (.pst) data file. After the file has been added, Make it the default [data file], and close the dialog.
2. Go to the Calendar window, right click on the calendar that’s giving you problems, and select Move Calendar. In the dialog, pick the data file that you created in the first step, and confirm. Don’t forget to update the storage folder in the CalDav Synchronizer settings!
Distribution Lists
~~~~~~~~~~~~~~~~~~
When enabled in Contact Mapping configuration you can now also sync Outlook Distribution Lists with your server contact groups. Since different servers use different formats to store contact groups, you will be able to choose the used DAV contact group format. Right now, the VLIST format for SOGo servers and vCards with KIND:group are supported. Don’t enable any of these options when your server doesn’t support it!
Since Outlook Distribution Lists also support list members which aren’t in the addressbook but SOGo VLISTs don’t, we add them as custom X-Attributes. With this workaround those members aren’t displayed in SOGo but won’t get lost when syncing back to Outlook.
Since vCard in version 3.0 doesn’t support contact groups we use X-ADDRESSBOOK-SERVER attributes for KIND and MEMBER for contact groups.
General Options and SSL settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the General Options Dialog you can change settings which are used for all synchronization profiles.
* *Automatically check for newer versions* set to false to disable checking for updates.
* *Check Internet connection before sync run* checks if an interface is up and try DNS query to dns.msftncsi.com first and if that fails try to download http://www.msftncsi.com/ncsi.txt with the configured proxy before each sync run to avoid error reports if network is unavailable after hibernate for example. Disable this option if you are in a local network where DNS and that URL is blocked.
* *Store data in roaming folder* set to true if you need to store state and profile data in the AppData\Roaming\ directory for roaming profiles in a AD domain for example. When changing this option, a restart of Outlook is required.
* *Include custom message classes in Outlook filter* Disabled by default, enable only if you have custom forms with message_classes other than the default IPM.Appointment/Contact/Task. For better performance, Windows Search Service shouldn’t be deactivated if this option is enabled.
* *Use fast queries for Outlook folders* Enabled by default, uses fast GetTable queries when accessing Outlook folders. Disable only if you get errors in GetVersions, when disabled every item needs to be requested which causes a performance penalty!
* *Trigger sync after Outlook Send/Receive and on Startup* If checked a manual sync is triggered after the Outlook Send/Receive finishes and on Outlook startup.
* *Show advanced settings as default* Show the advanced settings in synchronization profiles as default if enabled.
* *Expand all nodes in Synchronization profiles* Enabled by default, expands all nodes in the synchronization profiles to see the suboptions for network settings and mapping configuration.
* *Enable Tray Icon* Enabled by default, you can disable the tray icon in the Windows Taskbar if you don’t need it.
* *Fix invalid settings* Fixes invalid settings automatically, when synchronization profiles are edited.
* *Show Sync Progress Bar* and *Sync Progress Bar Threshold (Items)* Enabled by default, show a progress bar if more than the treshold of items need to be loaded during a synchronization run. If disabled, no progress bar is shown but be aware that for larger changes Outlook can freeze, since some operations need to be performed in the Outlook main thread.
* *Accept invalid chars in server response* If checked invalid characters in XML server responses are allowed. A typical invalid char, sent by some servers is Form feed (0x0C).
* * Enable useUnsafeHeaderParsing* Enable, if the server sends invalid http headers, see common network errors. Needed for Yahoo and cPanel Horde servers for example. The general option overrides the setting in the app.config file.
* *CalDav Connection Timeout (secs)* For slow server connections you can increaste the timeout value (default 90 secs).
SSL/TLS settings
^^^^^^^^^^^^^^^^
If you have problems with SSL/TLS and self-signed certificates, you can change the following settings at your own risk.
The recommended way would be to add the self signed cert to the Local Computer Trusted Root Certification Authorities
You can import the cert by running the MMC as Administrator.
* *Disable Certificate Validation* set to true to disable SSL/TLS certificate validation, major security risk, use with caution!
* *Enable Client Certificates* If enabled, the available client certificates from the Windows user certificate store will automatically be provided.
* *Enable Tls12* set to false to disable TLS12, not recommended!
* *Enable Ssl3* set to true to enable deprecated SSLv3, major security risk, use with caution!
Logging
^^^^^^^
In the *General Logging* section you can show or clear the log file and define the log level. Possible log levels are `INFO` and `DEBUG`.
You can also configure Synchronization reports for all profiles, this can be configured via general Options:
* *Log* You can choose if you want to generate reports for *"Only sync runs with errors"* or *"Sync runs with errors or warnings"* or *"All sync runs"*.
* *Show immediately* configures if the Sync reports should be shown immediately after a sync run with errors, with warnings or errors, or not at all.
* *Delete reports older than (days)* Automatically delete reports which are older than the days configured.
You can show reports manually with the *Reports* button in the CalDav Synchronizer Ribbon. There you can choose from available reports (shown as profile name with timestamp of the sync run) and see informations about items synced and if there were any warnings or errors. You can also delete reports or add them to a zip file via the context menu. If the last sync run lead to any errors, a warning symbol is shown in the Ribbon or the Report window opens if configured in the general options.
Profile Import/Export
~~~~~~~~~~~~~~~~~~~~~
In the toolbar of the synchronization profiles you can export all profiles to a file and import profiles from an earlier exported file. When exporting, you can choose a filename, the extension is *.cdsp and all options are saved in an xml format into this file. When importing the file, existing profiles are merged with the imported ones. If the selected Outlook folder for the profile doesn’t exist during import, you need to manually select a folder before you can save the options, they are not automatically created. You need also be aware of the fact, that saved profile passwords won’t work on other accounts or machines, since the encryption is dependant on the current user. But you can use the account password from the IMAP/POP3 account if available. General options are not saved in that file, but in the registry in `HKEY_CURRENT_USER\Software\CalDavSynchronizer`.
Troubleshooting
---------------
Synchronization Status
~~~~~~~~~~~~~~~~~~~~~~
With the *Status* button in the CalDav Synchronizer Ribbon or via doubleclick from the TrayIcon you can access the status of the active sync profiles with their last sync run shown in minutes ago and the status OK, error, or warning. When clicking on the profile name you get to the according sync profile settings, when clicking the status icon, you can open the according sync report. When a sync run has any errors or warnings you will get a notification from the CalDav Synchronizer TrayIcon.
Debugging
~~~~~~~~~
Options and state information is normally stored in the following folder:
----
C:\Users\<Your Username>\AppData\Local\CalDavSychronizer
----
If you activated Store data in roaming folder the location is changed to the following folder:
----
C:\Users\<Your Username>\AppData\Roaming\CalDavSychronizer
----
There is one `options_<your outlook profile>.xml` file which stores the options for each outlook profile.
For each sync profile there is a subfolder with state information stored in a relations.xml file after the inital sync. If you delete that folder, a fresh inital sync is performed. In the Synchronization profiles dialog a context menu is available in each profile (right click), which allows to open the cache directory and read the relations.xml file.
Each synchronization attempt is logged in the `log.txt` file. There you can find information about sync duration and the amount of added, deleted or modified events. Errors and Exceptions are logged aswell. You can view and clear the log file in *General Options*. There you can also change the log level from `INFO` to `DEBUG`.
In the install dir (The default is `C:\Program Files (x86)\CalDavSynchronizer`) you will find the app config file
` CalDavSynchronizer.dll.config`
In that xml file you can config timeout parameters and config options in the section `appSettings`
After changing parameters you have to restart Outlook.
* *wpfRenderModeSoftwareOnly*: When set to true, turn off hardware acceleration and use Software Rendering only. Useful if you have issues with WPF and your graphics card driver.
You can also change defaults for some of the general options like CheckForNewVersions, StoreAppDatainRoamingFolder, IncludeCustomMessageClasses and SSL/TLS options, useful for All Users deployment, because general options are stored per user in the HKCU registry hive.
In the section `system.net` you can define proxy settings, e.g. use of NTLM credentials
----
<defaultProxy useDefaultCredentials="true">
</defaultProxy>
----
In this section you can also allow UnsafeHeaderParsing if the server sends invalid http headers.
----
<system.net>
<settings>
<servicePointManager expect100Continue="false" />
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
----
This setting can also be enabled in the general options, starting with version 2.10.0.
In the section `log4net` you can define the log level for the main log (also possible in general options now).
level value can be DEBUG or INFO, e.g.:
----
<root>
<level value="DEBUG" />
<appender-ref ref="MainLogAppender" />
</root>
----
Common network errors
^^^^^^^^^^^^^^^^^^^^^
* System.Net.Http.HttpRequestException: Response status code does not indicate success: '401' ('Unauthorized').
** Wrong Username and/or Password provided.
* System.Net.Http.HttpRequestException: An error occurred while sending the request. --→ System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
** The server has KeepAlive disabled. Use *"Close connection after each request"* in *Network and proxy options*.
* System.Net.Http.HttpRequestException: An error occurred while sending the request. --→ System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine
** The server sends invalid headers. Enable the general option *Enable useUnsafeHeaderParsing* or the commented out option *useUnsafeHeaderparsing* in the app config file.
-323
View File
@@ -1,323 +0,0 @@
#
# https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc
#
font:
catalog:
# Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
#Noto Serif:
# normal: notoserif-regular-subset.ttf
# bold: notoserif-bold-subset.ttf
# italic: notoserif-italic-subset.ttf
# bold_italic: notoserif-bold_italic-subset.ttf
Lato-Light:
normal: lato/Lato-Light.ttf
bold: lato/Lato-Regular.ttf
italic: lato/Lato-LightItalic.ttf
bold_italic: lato/Lato-Italic.ttf
# M+ 1mn supports ASCII and the circled numbers used for conums
#M+ 1mn:
# normal: mplus1mn-regular-subset.ttf
# bold: mplus1mn-bold-subset.ttf
# italic: mplus1mn-italic-subset.ttf
# bold_italic: mplus1mn-bold_italic-subset.ttf
Inconsolata:
normal: inconsolata.ttf
bold: inconsolata.ttf
italic: inconsolata.ttf
bold_italic: inconsolata.ttf
page:
background_color: FFFFFF
layout: portrait
initial_zoom: FitH
margin: [1in, 1in, 1in, 1in]
# margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress
margin_inner: 1in
margin_outer: 1in
size: Letter
base:
align: justify
# color as hex string (leading # is optional)
font_color: 333333
font_color: 000000
# color as RGB array
#font_color: [51, 51, 51]
# color as CMYK array (approximated)
#font_color: [0, 0, 0, 0.92]
#font_color: [0, 0, 0, 92%]
font_family: Lato-Light
# choose one of these font_size/line_height_length combinations
#font_size: 14
#line_height_length: 20
#font_size: 11.25
#line_height_length: 18
#font_size: 11.2
#line_height_length: 16
font_size: 10
#line_height_length: 15
# correct line height for Noto Serif metrics
line_height_length: 10
#font_size: 11.25
#line_height_length: 18
line_height: $base_line_height_length / $base_font_size
font_size_large: round($base_font_size * 1.25)
font_size_small: round($base_font_size * 0.85)
font_size_min: $base_font_size * 0.75
font_style: normal
border_color: EEEEEE
border_radius: 4
border_width: 0.5
section:
indent: [0.67in, 0]
role:
line-through:
text_decoration: line-through
underline:
text_decoration: underline
big:
font_size: $base_font_size_large
small:
font_size: $base_font_size_small
subtitle:
font_size: 0.8em
font_color: 999999
# FIXME vertical_rhythm is weird; we should think in terms of ems
#vertical_rhythm: $base_line_height_length * 2 / 3
# correct line height for Noto Serif metrics (comes with built-in line height)
vertical_rhythm: $base_line_height_length
horizontal_rhythm: $base_line_height_length
# QUESTION should vertical_spacing be block_spacing instead?
vertical_spacing: $vertical_rhythm
link:
font_color: 428BCA
font_color: 007BFF
# literal is currently used for inline monospaced in prose and table cells
literal:
font_color: 333333
font_color: B12146
font_color: E83E8C
font_family: Inconsolata
button:
content: "[\u2009%s\u2009]"
font_style: bold
key:
background_color: F5F5F5
background_color: F8F8F8
border_color: CCCCCC
border_offset: 2
border_radius: 2
border_width: 0.5
font_family: $literal_font_family
separator: "\u202f+\u202f"
mark:
background_color: FFFF00
border_offset: 1
menu:
caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
heading:
align: left
font_color: $base_font_color
font_style: bold
# h1 is used for part titles (book doctype) or the doctitle (article doctype)
h1_font_size: floor($base_font_size * 2.6)
# h2 is used for chapter titles (book doctype only)
h2_font_size: floor($base_font_size * 2.15)
h3_font_size: round($base_font_size * 1.7)
h4_font_size: $base_font_size_large
h5_font_size: $base_font_size
h6_font_size: $base_font_size_small
#line_height: 1.4
# correct line height for Noto Serif metrics (comes with built-in line height)
line_height: 1
margin_top: $vertical_rhythm * 0.4
margin_bottom: $vertical_rhythm * 0.9
min_height_after: $base_line_height_length * 1.5
h2-margin_bottom: 60
#h2-text_decoration: underline
title_page:
align: right
logo:
top: 10%
title:
top: 55%
font_size: $heading_h1_font_size
font_color: 999999
font_color: $base_font_color
line_height: 0.9
subtitle:
font_size: $heading_h3_font_size
font_style: bold_italic
line_height: 1
authors:
margin_top: $base_font_size * 1.25
font_size: $base_font_size_large
font_color: 181818
revision:
margin_top: $base_font_size * 1.25
block:
margin_top: 0
margin_bottom: $vertical_rhythm
caption:
align: left
font_size: $base_font_size * 0.95
font_style: italic
# FIXME perhaps set line_height instead of / in addition to margins?
margin_inside: $vertical_rhythm / 3
#margin_inside: $vertical_rhythm / 4
margin_outside: 0
lead:
font_size: $base_font_size_large
line_height: 1.4
abstract:
font_color: 5C6266
font_size: $lead_font_size
line_height: $lead_line_height
font_style: italic
first_line_font_style: bold
title:
align: center
font_color: $heading_font_color
font_size: $heading_h4_font_size
font_style: $heading_font_style
admonition:
column_rule_color: $base_border_color
column_rule_width: $base_border_width
padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
# icon:
# caution:
# name: far-lightbulb
# name: fa-fire
# stroke_color: 111111
# size: 24
label:
text_transform: uppercase
font_style: bold
# caution:
# font_color: F77D05
blockquote:
font_size: $base_font_size_large
border_color: $base_border_color
border_width: 0
border_left_width: 5
# FIXME disable negative padding bottom once margin collapsing is implemented
padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_left_width / 2]
cite_font_size: $base_font_size_small
cite_font_color: 999999
verse:
font_size: $blockquote_font_size
border_color: $blockquote_border_color
border_width: $blockquote_border_width
border_left_width: $blockquote_border_left_width
padding: $blockquote_padding
cite_font_size: $blockquote_cite_font_size
cite_font_color: $blockquote_cite_font_color
# code is used for source blocks (perhaps change to source or listing?)
code:
font_color: $base_font_color
#font_color: FFFFFF
font_family: $literal_font_family
font_size: ceil($base_font_size)
padding: $code_font_size
line_height: 1.25
# line_gap is an experimental property to control how a background color is applied to an inline block element
line_gap: 3.8
background_color: F5F5F5
background_color: F8F8F8
#background_color: 6C757D
border_color: CCCCCC
border_radius: $base_border_radius
border_radius: 0
border_width: 0.75
border_width: 0
conum:
font_family: $literal_font_family
font_color: $literal_font_color
font_size: $base_font_size
line_height: 4 / 3
glyphs: circled
example:
border_color: $base_border_color
border_radius: $base_border_radius
border_width: 0.75
background_color: $page-background-color
# FIXME reenable padding bottom once margin collapsing is implemented
padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
image:
align: left
prose:
margin_top: $block_margin_top
margin_bottom: $block_margin_bottom
sidebar:
background_color: EEEEEE
border_color: E1E1E1
border_radius: $base_border_radius
border_width: $base_border_width
# FIXME reenable padding bottom once margin collapsing is implemented
padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25]
title:
align: center
font_color: $heading_font_color
font_size: $heading_h4_font_size
font_style: $heading_font_style
thematic_break:
border_color: $base_border_color
border_style: solid
border_width: $base_border_width
margin_top: $vertical_rhythm * 0.5
margin_bottom: $vertical_rhythm * 1.5
description_list:
term_font_style: bold
term_spacing: $vertical_rhythm / 4
description_indent: $horizontal_rhythm * 1.25
outline_list:
indent: $horizontal_rhythm * 1.5
#marker_font_color: 404040
# NOTE outline_list_item_spacing applies to list items that do not have complex content
item_spacing: $vertical_rhythm / 2
table:
background_color: $page_background_color
border_color: DDDDDD
border_width: $base_border_width
cell_padding: 3
head:
font_style: bold
border_bottom_width: $base_border_width * 2.5
body:
stripe_background_color: F9F9F9
foot:
background_color: F0F0F0
toc:
indent: $horizontal_rhythm
line_height: $base_line_height
dot_leader:
#content: ". "
font_color: A9A9A9
#levels: 2 3
footnotes:
font_size: round($base_font_size * 0.75)
item_spacing: $outline_list_item_spacing / 2
header:
# Can't show chapter number. See https://github.com/asciidoctor/asciidoctor-pdf/issues/1373
font_size: $base_font_size_small
line_height: 1
vertical_align: middle
footer:
font_size: $base_font_size_small
# NOTE if background_color is set, background and border will span width of page
#border_color: DDDDDD
border_width: 0.25
#height: $base_line_height_length * 2.5
height: $base_line_height_length * 5
line_height: 1
padding: [$base_line_height_length / 2, 1, 0, 1]
vertical_align: top
recto: &shared_footer
#columns: "<50% =0% >50%"
left:
content: 'Copyright © Inverse inc.'
center:
content: '{chapter-title}'
right:
content: '{page-number}'
verso: *shared_footer
#columns: $footer_recto_columns
+16
View File
@@ -0,0 +1,16 @@
#
# fop fix to build our documentation on CentOS 6
#
# Inverse inc. <info@inverse.ca>
#
--- /usr/bin/fop.orig 2012-01-17 21:25:50.000000000 -0500
+++ /usr/bin/fop 2012-01-17 21:26:04.000000000 -0500
@@ -26,7 +26,7 @@
# Set parameters
set_jvm
set_classpath commons-io batik-all avalon-framework xmlgraphics-commons \
- commons-logging fop
+ commons-logging fop xalan-j2
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
@@ -0,0 +1,17 @@
#
# xmlgraphics-fop fix to build our documentation on CentOS 5
# taken from https://build.opensuse.org/request/show/68994
#
# Inverse inc. <info@inverse.ca>
#
--- /usr/bin/xmlgraphics-fop.orig 2012-01-17 18:42:08.000000000 -0500
+++ /usr/bin/xmlgraphics-fop 2012-01-17 18:42:18.000000000 -0500
@@ -24,7 +24,7 @@
# Rest of the configuration
MAIN_CLASS=org.apache.fop.cli.Main
-BASE_JARS="xmlgraphics-fop xmlgraphics-batik/util xml-commons-jaxp-1.3-apis excalibur/avalon-framework-api xerces-j2 xalan-j2 xalan-j2-serializer"
+BASE_JARS="xmlgraphics-fop batik-all xml-commons-jaxp-1.3-apis excalibur/avalon-framework-impl excalibur/avalon-framework-api xerces-j2 xalan-j2 xalan-j2-serializer"
# Set parameters
set_jvm
@@ -0,0 +1,107 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- ********************************************************************
Header / Footer customizations
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
Copyright (C) 2011-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
******************************************************************** -->
<!--
Here we are re-defining docbook-xsl/fo/pagesetup.xsl to fit our needs.
- top: chapter number on the left
- bottom: copyright, chapter name, page
-->
<xsl:param name="header.rule" select="0"/>
<xsl:template name="header.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
<xsl:when test="$sequence = 'blank'">
<!-- nothing -->
</xsl:when>
<xsl:when test="($sequence='first' or $sequence='odd' or $sequence='even') and $position='left'">
<xsl:if test="$pageclass != 'titlepage' and $pageclass != 'lot'">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'chapter'"/>
</xsl:call-template>
<xsl:call-template name="gentext.space"/>
<xsl:number count="chapter" from="book" level="any"/>
</xsl:if>
</xsl:when>
<!-- draft -->
<xsl:when test="$position='right'">
<xsl:call-template name="draft.text"/>
</xsl:when>
<xsl:otherwise>
<!-- nop -->
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
<xsl:param name="footer.rule" select="0"/>
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<!-- pageclass can be front, body, back -->
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
<xsl:when test="$pageclass = 'titlepage'">
<!-- nop; no footer on title pages -->
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='left'">
<xsl:apply-templates select="//copyright[1]" mode="titlepage.mode"/>
</xsl:when>
<xsl:when test="($sequence='first' or $sequence='odd' or $sequence='even') and $position='center'">
<xsl:if test="$pageclass != 'titlepage' and $pageclass != 'lot'">
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
</xsl:if>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='right'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$sequence='blank'">
<!-- nop -->
</xsl:when>
<xsl:otherwise>
<!-- nop -->
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
</xsl:stylesheet>
<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
+182
View File
@@ -0,0 +1,182 @@
<?xml version='1.0'?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- ********************************************************************
SOGo Documentation Docbook FO Parameters
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
Copyright (C) 2011-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
******************************************************************** -->
<!--
Global Tasks
TODO prettier revhistory
TODO prettier Table of Contents
TODO generate PDF table of contents (like OSX's Preview shows on the right hand side)
TODO title 2
- align with text?
- more above whitespace
TODO change the bullet for a prettier one
TODO title 3 and 4
- align with text?
- should be easier to differentiate (check network guide)
TODO icon on line wrap in monospace boxes
TODO caution, notes, warnings, etc.
- box around it
- sexy icon
TODO -> is converted into an arrow but it's not pretty (is it font or docbook-thingy?)
-->
<!--
Load default values
Real upstream schema is at:
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
but we decided to load all sensible local xsd since it only produce a warning on missing imports.
-->
<!-- CentOS / RHEL -->
<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/>
<!-- Debian / Ubuntu -->
<xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl"/>
<!-- OSX through mac ports -->
<xsl:import href="/opt/local/share/xsl/docbook-xsl/fo/docbook.xsl"/>
<!-- title page extra styling -->
<xsl:import href="titlepage-fo.xsl"/>
<!-- header / footer extra styling -->
<xsl:import href="headerfooter-fo.xsl"/>
<!-- attaching an image to the verso legalnotice component -->
<xsl:template match="legalnotice" mode="book.titlepage.verso.mode">
<xsl:apply-templates mode="titlepage.mode"/>
<fo:block text-align="right">
<fo:external-graphic src="url('images/inverse-logo.jpg')" width="3in" content-width="scale-to-fit"/>
</fo:block>
</xsl:template>
<!-- stylesheet options -->
<xsl:param name="title.font.family">Lato-Medium</xsl:param>
<xsl:param name="chapter.autolabel" select="0"/>
<xsl:attribute-set name="component.title.properties">
<xsl:attribute name="padding-bottom">2.5em</xsl:attribute>
<xsl:attribute name="border-bottom">solid 2px</xsl:attribute>
<xsl:attribute name="margin-bottom">1em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="section.title.level1.properties">
<xsl:attribute name="border-bottom">solid 1px</xsl:attribute>
<xsl:attribute name="margin-top">2em</xsl:attribute>
<xsl:attribute name="margin-bottom">1em</xsl:attribute>
</xsl:attribute-set>
<!-- titles spacing -->
<xsl:attribute-set name="section.title.level2.properties">
<xsl:attribute name="margin-top">1em</xsl:attribute>
</xsl:attribute-set>
<!-- default fonts -->
<xsl:param name="body.font.family">Lato-Light</xsl:param>
<xsl:param name="body.font.master">10</xsl:param>
<xsl:param name="monospace.font.family">Incosolata</xsl:param>
<!-- revision table layout -->
<xsl:attribute-set name="revhistory.title.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="revhistory.table.properties">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="revhistory.table.cell.properties">
<xsl:attribute name="border-bottom">1px solid</xsl:attribute>
</xsl:attribute-set>
<!-- Table Of Contents (TOC) options -->
<!-- We only want 2 level of ToC depth -->
<xsl:param name="toc.section.depth" select="1"/>
<!-- titles left margin -->
<xsl:attribute-set name="section.title.properties">
<xsl:attribute name="start-indent"><xsl:value-of select="$body.start.indent"/></xsl:attribute>
</xsl:attribute-set>
<!-- lists type -->
<xsl:template name="itemizedlist.label.markup">
<xsl:param name="itemsymbol" select="'square'"/>
<xsl:choose>
<xsl:when test="$itemsymbol='square'"><fo:inline font-family="Lato-Light">&#x25aa;</fo:inline></xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="next.itemsymbol">
<xsl:param name="itemsymbol" select="'default'"/>
<xsl:choose>
<xsl:otherwise>square</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- admonition -->
<xsl:param name="admon.graphics" select="1"></xsl:param>
<xsl:param name="admon.graphics.path">images/</xsl:param>
<xsl:param name="admon.graphics.extension">.png</xsl:param>
<xsl:attribute-set name="graphical.admonition.properties">
<xsl:attribute name="border-top">1px solid</xsl:attribute>
<xsl:attribute name="border-bottom">1px solid</xsl:attribute>
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
<xsl:attribute name="margin-left">2em</xsl:attribute>
</xsl:attribute-set>
<!-- grey boxes around code (screen, programlisting) -->
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="border">thin #9F9F9F solid</xsl:attribute>
<xsl:attribute name="margin">0pt</xsl:attribute>
<xsl:attribute name="padding">0.5em</xsl:attribute>
<!-- prevent page breaks in screen and programlisting tags -->
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<!-- breaking long lines in code (screen, programlisting) -->
<xsl:attribute-set name="monospace.verbatim.properties">
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
</xsl:attribute-set>
<!-- don't show raw links in [ .. ] after a link -->
<xsl:param name="ulink.show" select="0"/>
<!-- blue underlined hyperlink -->
<xsl:attribute-set name="xref.properties">
<xsl:attribute name="color">blue</xsl:attribute>
<xsl:attribute name="text-decoration">underline</xsl:attribute>
</xsl:attribute-set>
<!-- strong emphasis in bold -->
<xsl:template match="emphasis[@role='strong']">
<fo:inline font-family="Lato" font-weight="normal">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<!-- copyright in range instead of seperated years -->
<xsl:param name="make.year.ranges" select="1" />
<!-- variablelist behavior (asciidoc's term:: lists) -->
<!-- <xsl:param name="variablelist.term.break.after" select="1" /> -->
</xsl:stylesheet>
<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
@@ -0,0 +1,96 @@
<!DOCTYPE t:templates [
<!ENTITY hsize0 "10pt">
<!ENTITY hsize1 "12pt">
<!ENTITY hsize2 "14.4pt">
<!ENTITY hsize3 "17.28pt">
<!ENTITY hsize4 "20.736pt">
<!ENTITY hsize5 "24.8832pt">
<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
]>
<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- ********************************************************************
SOGo title page
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
Copyright (C) 2011-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
******************************************************************** -->
<!--
If you make changes you need to rebuild XSL:
xsltproc -o docs/docbook/xsl/titlepage-fo.xsl \
/usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl \
docs/docbook/xsl/titlepage-fo.xml
On some platforms the titlepage.xsl is located elsewhere:
* OSX: /opt/local/share/xsl/docbook-xsl/template/titlepage.xsl
This is a customized version of docbook-xsl/fo/titlepage.templates.xml.
I removed every section except the book one. Feel free to add more if more
customization are required.
-->
<t:titlepage t:element="book" t:wrapper="fo:block">
<t:titlepage-content t:side="recto">
<mediaobject/>
<title
t:named-template="division.title"
param:node="ancestor-or-self::book[1]"
text-align="right"
font-size="&hsize5;"
space-before="&hsize5space;"
font-weight="bold"
font-family="{$title.fontset}"
margin-top="8em"/>
<subtitle
text-align="right"
font-size="&hsize4;"
space-before="&hsize4space;"
font-family="{$title.fontset}"
border-bottom="solid"/>
</t:titlepage-content>
<t:titlepage-content t:side="verso">
<title
font-size="&hsize2;"
font-weight="bold"
font-family="{$title.fontset}"/>
<corpauthor/>
<authorgroup t:named-template="verso.authorgroup"/>
<author/>
<othercredit/>
<releaseinfo space-before="0.5em"/>
<pubdate space-before="1em"/>
<copyright/>
<abstract/>
<legalnotice font-size="8pt"/>
</t:titlepage-content>
<t:titlepage-separator>
<fo:block break-after="page"/>
</t:titlepage-separator>
<t:titlepage-before t:side="recto">
</t:titlepage-before>
<t:titlepage-before t:side="verso">
<fo:block break-after="page"/>
</t:titlepage-before>
</t:titlepage>
</t:templates>
+208
View File
@@ -0,0 +1,208 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
<!-- This stylesheet was created by template/titlepage.xsl-->
<xsl:template name="book.titlepage.recto">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/mediaobject"/>
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/mediaobject"/>
<xsl:choose>
<xsl:when test="bookinfo/title">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
</xsl:when>
<xsl:when test="info/title">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
</xsl:when>
<xsl:when test="title">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="bookinfo/subtitle">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
</xsl:when>
<xsl:when test="info/subtitle">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
</xsl:when>
<xsl:when test="subtitle">
<xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="book.titlepage.verso">
<xsl:choose>
<xsl:when test="bookinfo/title">
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
</xsl:when>
<xsl:when test="info/title">
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
</xsl:when>
<xsl:when test="title">
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
</xsl:when>
</xsl:choose>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/releaseinfo"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/releaseinfo"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/pubdate"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/pubdate"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
<xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
</xsl:template>
<xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
</xsl:template>
<xsl:template name="book.titlepage.before.recto">
</xsl:template>
<xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
</xsl:template>
<xsl:template name="book.titlepage">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:variable name="recto.content">
<xsl:call-template name="book.titlepage.before.recto"/>
<xsl:call-template name="book.titlepage.recto"/>
</xsl:variable>
<xsl:variable name="recto.elements.count">
<xsl:choose>
<xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
<xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
<!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
<fo:block><xsl:copy-of select="$recto.content"/></fo:block>
</xsl:if>
<xsl:variable name="verso.content">
<xsl:call-template name="book.titlepage.before.verso"/>
<xsl:call-template name="book.titlepage.verso"/>
</xsl:variable>
<xsl:variable name="verso.elements.count">
<xsl:choose>
<xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
<xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
<!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
<fo:block><xsl:copy-of select="$verso.content"/></fo:block>
</xsl:if>
<xsl:call-template name="book.titlepage.separator"/>
</fo:block>
</xsl:template>
<xsl:template match="*" mode="book.titlepage.recto.mode">
<!-- if an element isn't found in this mode, -->
<!-- try the generic titlepage.mode -->
<xsl:apply-templates select="." mode="titlepage.mode"/>
</xsl:template>
<xsl:template match="*" mode="book.titlepage.verso.mode">
<!-- if an element isn't found in this mode, -->
<!-- try the generic titlepage.mode -->
<xsl:apply-templates select="." mode="titlepage.mode"/>
</xsl:template>
<xsl:template match="mediaobject" mode="book.titlepage.recto.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style">
<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="right" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}" margin-top="8em">
<xsl:call-template name="division.title">
<xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
</xsl:call-template>
</fo:block>
</xsl:template>
<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="right" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}" border-bottom="solid">
<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="title" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:call-template name="verso.authorgroup">
</xsl:call-template>
</fo:block>
</xsl:template>
<xsl:template match="author" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="releaseinfo" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="pubdate" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
<xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
<xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
</fo:block>
</xsl:template>
</xsl:stylesheet>
+24
View File
@@ -0,0 +1,24 @@
<!-- TODO have the build system take care of this -->
<releaseinfo>Version 2.3.11 - May 2016</releaseinfo>
<subtitle>for version 2.3.11</subtitle>
<date>2016-05-12</date>
<legalnotice>
<para>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".</para>
<!-- font licenses -->
<para>The fonts used in this guide are licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: <ulink url="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</ulink></para>
<para>Copyright © Łukasz Dziedzic, <ulink url="http://www.latofonts.com/">http://www.latofonts.com</ulink>, with Reserved Font Name: "Lato".</para>
<para>Copyright © Raph Levien, <ulink url="http://levien.com/">http://levien.com/</ulink>, with Reserved Font Name: "Inconsolata".</para>
</legalnotice>
<mediaobject>
<objectinfo>
<corpname>Inverse inc.</corpname>
</objectinfo>
<textobject>
<phrase>SOGo logo</phrase>
</textobject>
<imageobject>
<imagedata align="left" width="4in" format="PNG" fileref="images/sogo-logo.png" />
</imageobject>
</mediaobject>
+32
View File
@@ -0,0 +1,32 @@
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<font metrics-url="fonts/inconsolata.xml" kerning="yes" embed-url="fonts/inconsolata.ttf">
<font-triplet name="Incosolata" style="normal" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-Regular.xml" kerning="yes" embed-url="fonts/lato/Lato-Regular.ttf">
<font-triplet name="Lato" style="normal" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-Italic.xml" kerning="yes" embed-url="fonts/lato/Lato-Italic.ttf">
<font-triplet name="Lato" style="italic" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-Light.xml" kerning="yes" embed-url="fonts/lato/Lato-Light.ttf">
<font-triplet name="Lato-Light" style="normal" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-LightItalic.xml" kerning="yes" embed-url="fonts/lato/Lato-LightItalic.ttf">
<font-triplet name="Lato-Light" style="italic" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-Medium.xml" kerning="yes" embed-url="fonts/lato/Lato-Medium.ttf">
<font-triplet name="Lato-Medium" style="normal" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-MediumItalic.xml" kerning="yes" embed-url="fonts/lato/Lato-MediumItalic.ttf">
<font-triplet name="Lato-Medium" style="italic" weight="normal"/>
</font>
<font metrics-url="fonts/lato/Lato-Semibold.xml" kerning="yes" embed-url="fonts/lato/Lato-Semibold.ttf">
<font-triplet name="Lato-Semibold" style="normal" weight="normal"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
+1
View File
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><font-metrics metrics-version="2" type="TYPE0"><font-name>Inconsolata</font-name><full-name>Inconsolata</full-name><family-name>Inconsolata</family-name><embed/><cap-height>624</cap-height><x-height>458</x-height><ascender>820</ascender><descender>-180</descender><bbox><left>-1</left><bottom>-177</bottom><right>510</right><top>835</top></bbox><flags>33</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="98" ue="255" us="160"/><bf gi="194" ue="263" us="258"/><bf gi="200" ue="273" us="268"/><bf gi="206" ue="283" us="280"/><bf gi="210" ue="287" us="286"/><bf gi="212" ue="305" us="304"/><bf gi="214" ue="314" us="312"/><bf gi="217" ue="318" us="317"/><bf gi="219" ue="324" us="321"/><bf gi="223" ue="328" us="327"/><bf gi="225" ue="331" us="330"/><bf gi="227" ue="333" us="333"/><bf gi="228" ue="341" us="336"/><bf gi="234" ue="347" us="344"/><bf gi="238" ue="357" us="350"/><bf gi="246" ue="369" us="366"/><bf gi="250" ue="382" us="376"/><bf gi="257" ue="402" us="402"/><bf gi="258" ue="567" us="567"/><bf gi="259" ue="711" us="710"/><bf gi="261" ue="713" us="713"/><bf gi="262" ue="715" us="715"/><bf gi="263" ue="733" us="728"/><bf gi="269" ue="8218" us="8216"/><bf gi="272" ue="8222" us="8220"/><bf gi="275" ue="8226" us="8224"/><bf gi="278" ue="8230" us="8230"/><bf gi="279" ue="8250" us="8249"/><bf gi="281" ue="8260" us="8260"/><bf gi="282" ue="8308" us="8308"/><bf gi="283" ue="8364" us="8364"/><bf gi="284" ue="8482" us="8482"/><bf gi="285" ue="8593" us="8593"/><bf gi="286" ue="8595" us="8595"/><bf gi="287" ue="8722" us="8722"/><bf gi="288" ue="9251" us="9251"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="500"/><wx w="0"/><wx w="333"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wLine truncated
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

File renamed without changes.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

@@ -5,9 +5,8 @@
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
- Alinto <contact@sogo.nu>
Copyright (C) 2008-2022 Inverse inc. / Alinto
Copyright (C) 2008-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
////
@@ -18,11 +17,11 @@ Additional Information
For more information, please consult the online FAQs (Frequently Asked
Questions) :
https://sogo.nu/support/faq.html
http://www.sogo.nu/english/support/faq.html
You can also read the mailing archives or post your questions to it. For
details, see :
https://mailing.sogo.nu/sympa/info/users
https://lists.inverse.ca/sogo
// vim: set syntax=asciidoc tabstop=2 shiftwidth=2 expandtab:
@@ -5,9 +5,8 @@
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
- Alinto <contact@sogo.nu>
Copyright (C) 2008-2022 Inverse inc. / Alinto
Copyright (C) 2008-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
////
@@ -16,14 +15,12 @@ Commercial Support and Contact Information
------------------------------------------
For any questions or comments, do not hesitate to contact us by writing
an email to contact@sogo.nu.
an email to :
Alinto (https://alinto.com) offers professional services around SOGo
to help organizations deploy the solution, customize, migrate versions or
from another system, performance tuning or aligning with best practices.
mailto:support@inverse.ca[support@inverse.ca]
Hourly rates or support packages are offered to best suit your needs.
Please visit https://alinto.com/ for details.
Inverse (http://inverse.ca/[http://inverse.ca]) offers professional
services around SOGo to help organizations deploy the solution and
migrate from their legacy systems.
// vim: set syntax=asciidoc tabstop=2 shiftwidth=2 expandtab:
-14
View File
@@ -1,14 +0,0 @@
Version {release_version} - {release_month} {docyear}
Copyright © {docyear} Inverse inc. / Alinto
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
The fonts used in this guide are licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: http://scripts.sil.org/OFL
Copyright © Łukasz Dziedzic, http://www.latofonts.com, with Reserved Font Name: "Lato".
Copyright © Raph Levien, http://levien.com/, with Reserved Font Name: "Inconsolata".
image::images/inverse-logo.jpeg[width="25%",pdfwidth="50%",align="right"]
image::images/alinto.small.png[width="25%",pdfwidth="50%",align="right"]
@@ -5,27 +5,14 @@
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
- Alinto <contact@sogo.nu>
Copyright (C) 2008-2022 Inverse inc. / Alinto
Copyright (C) 2008-2016 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
////
:encoding: UTF-8
:lang: en
:doctype: book
SOGo v{release_version}
:toc: left
:sectanchors:
:sectlinks:
// Add numbers to each section
:sectnums:
// Remove chapter prefix
:chapter-signifier:
:front-cover-image: image:images/sogo-logo.png[fit=none,pdfwidth=50%,position=center]
:source-highlighter: rouge
:rouge-style: github
// Above empty line will insert page brake
include::docinfo.asciidoc[]
// TODO have the build system take care of this
:release_version: 2.3.11
// vim: set syntax=asciidoc tabstop=2 shiftwidth=2 expandtab:
+1 -2
View File
@@ -5,9 +5,8 @@
This file is part of the SOGo project.
Authors:
- Inverse inc. <info@inverse.ca>
- Alinto <contact@sogo.nu>
Copyright (C) 2008-2022 Inverse inc. / Alinto
Copyright (C) 2008-2014 Inverse inc.
License: GFDL 1.2 or later. http://www.gnu.org/licenses/fdl.html
////
+2
View File
@@ -19,6 +19,7 @@
02111-1307, USA.
*/
#import <Foundation/NSObject.h>
@interface MainUIProduct : NSObject
{
@@ -26,6 +27,7 @@
@end
#import <Foundation/Foundation.h>
@implementation MainUIProduct
+1
View File
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSException.h>
@interface NSException (SOGoExtensions)
+1
View File
@@ -19,6 +19,7 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <execinfo.h>
#import "NSException+Stacktrace.h"
+4 -1
View File
@@ -1,6 +1,8 @@
/* SOGo+DAV.h - this file is part of SOGo
*
* Copyright (C) 2010-2016 Inverse inc.
* Copyright (C) 2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,6 +31,7 @@
@interface SOGo (SOGoWebDAVExtensions)
- (WOResponse *) davPrincipalMatch: (WOContext *) localContext;
// - (WOResponse *) davPrincipalPropertySearch: (WOContext *) localContext;
- (WOResponse *) davPrincipalSearchPropertySet: (WOContext *) localContext;
@end
+29 -17
View File
@@ -1,6 +1,6 @@
/* SOGo+DAV.m - this file is part of SOGo
*
* Copyright (C) 2010-2016 Inverse inc.
* Copyright (C) 2010-2013 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,12 +18,18 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoObject+SoDAV.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WORequest.h>
#import <NGExtensions/NSObject+Logs.h>
#import <DOM/DOMDocument.h>
#import <DOM/DOMNode.h>
#import <DOM/DOMProtocols.h>
#import <SaxObjC/XMLNamespaces.h>
#import <SOGo/NSArray+Utilities.h>
@@ -36,7 +42,6 @@
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/SOGoUserManager.h>
#import "SOGo+DAV.h"
@@ -179,8 +184,9 @@
[hrefs addObject: [self davURLAsString]];
}
- (NSDictionary *) _handlePrincipalMatchPrincipalProperty: (id <DOMElement>) child
inContext: (WOContext *) localContext
- (NSDictionary *)
_handlePrincipalMatchPrincipalProperty: (id <DOMElement>) child
inContext: (WOContext *) localContext
{
NSMutableArray *hrefs;
NSDictionary *response;
@@ -359,26 +365,31 @@
withEmailAddressSetMatching: (NSString *) value
inContext: (WOContext *) localContext
{
SOGoUserManager *um;
id <SOGoSource> authenticationSource;
SOGoUser *activeUser;
NSArray *records;
NSUInteger count, max;
NSString *uid;
SOGoUserFolder *collection;
um = [SOGoUserManager sharedUserManager];
records = [um fetchUsersMatching: value
inDomain: [[localContext activeUser] domain]];
max = [records count];
for (count = 0; count < max; count++)
activeUser = [localContext activeUser];
if ([activeUser respondsToSelector: @selector (authenticationSource)])
{
uid = [[records objectAtIndex: count] objectForKey: @"c_uid"];
if ([uid length] > 0)
{
collection = [[SOGoUser userWithLogin: uid]
authenticationSource = [[localContext activeUser] authenticationSource];
records = [authenticationSource
fetchContactsMatching: value
inDomain: [activeUser domain]];
max = [records count];
for (count = 0; count < max; count++)
{
uid = [[records objectAtIndex: count] objectForKey: @"c_uid"];
if ([uid length] > 0)
{
collection = [[SOGoUser userWithLogin: uid]
homeFolderInContext: localContext];
[collections addObject: collection];
}
[collections addObject: collection];
}
}
}
}
@@ -574,6 +585,7 @@
@"addressbook", @"calendar-access",
@"calendar-schedule", @"calendar-auto-schedule",
@"calendar-proxy",
@"calendar-query-extended",
@"extended-mkcol",
@"calendarserver-principal-property-search",
+3 -1
View File
@@ -1,5 +1,6 @@
/*
Copyright (C) 2005-2016 Inverse inc.
Copyright (C) 2005-2010 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo.
@@ -26,6 +27,7 @@
@class NSArray;
@class NSDictionary;
@class NSMutableDictionary;
@class SOGoCache;
+35 -103
View File
@@ -1,5 +1,6 @@
/*
Copyright (C) 2005-2022 Inverse inc.
Copyright (C) 2005-2014 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo
@@ -19,15 +20,21 @@
02111-1307, USA.
*/
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSDebug.h>
#import <Foundation/NSData.h>
#import <Foundation/NSDate.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSProcessInfo.h>
#import <Foundation/NSRunLoop.h>
#import <Foundation/NSURL.h>
#import <GDLAccess/EOAdaptorChannel.h>
#import <GDLContentStore/GCSChannelManager.h>
#import <GDLContentStore/GCSFolderManager.h>
#import <GDLContentStore/GCSFolderType.h>
#import <GDLContentStore/GCSAlarmsFolder.h>
#import <GDLContentStore/GCSSessionsFolder.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoClassSecurityInfo.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest+So.h>
@@ -51,6 +58,7 @@
#import <SOGo/SOGoPublicBaseFolder.h>
#import <SOGo/SOGoProductLoader.h>
#import <SOGo/SOGoProxyAuthenticator.h>
#import <SOGo/SOGoUserFolder.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/SOGoWebAuthenticator.h>
@@ -115,7 +123,7 @@ static BOOL debugLeaks;
vMemSizeLimit = [defaults vmemLimit];
if (vMemSizeLimit > 0)
[self logWithFormat: @"vmem size check enabled: shutting down app when "
@"vmem > %d MB. Currently at %d MB", vMemSizeLimit, [[NSProcessInfo processInfo] virtualMemorySize]/1048576];
@"vmem > %d MB", vMemSizeLimit];
/* SoClass security declarations */
sInfo = [self soClassSecurityInfo];
@@ -137,9 +145,7 @@ static BOOL debugLeaks;
[$(@"SOGoFolder") soClass];
/* load products */
[[SOGoProductLoader productLoader] loadAllProducts: YES];
if (vMemSizeLimit > 0)
[self logWithFormat: @"All products loaded - current memory usage at %d MB", [[NSProcessInfo processInfo] virtualMemorySize]/1048576];
[[SOGoProductLoader productLoader] loadAllProducts];
}
- (id) init
@@ -172,9 +178,10 @@ static BOOL debugLeaks;
bundle = [bm bundleWithName: @"MainUI" type: @"SOGo"];
length = [tableType length] - 3;
tableFile = [tableType substringToIndex: length];
descFile = [bundle pathForResource: [NSString stringWithFormat: @"%@-%@",
tableFile, fileSuffix]
ofType: @"sql"];
descFile
= [bundle pathForResource: [NSString stringWithFormat: @"%@-%@",
tableFile, fileSuffix]
ofType: @"sql"];
if (!descFile)
descFile = [bundle pathForResource: tableFile ofType: @"sql"];
@@ -190,7 +197,6 @@ static BOOL debugLeaks;
NSString *tableName, *fileSuffix, *tableScript;
EOAdaptorChannel *tc;
NSURL *channelURL;
NSException *ex;
channelURL = [NSURL URLWithString: url];
fileSuffix = [channelURL scheme];
@@ -199,19 +205,14 @@ static BOOL debugLeaks;
/* FIXME: make use of [EOChannelAdaptor describeTableNames] instead */
tableName = [url lastPathComponent];
if ([tc evaluateExpressionX:
[NSString stringWithFormat: @"SELECT 1 FROM %@ WHERE 1 = 2",
[NSString stringWithFormat: @"SELECT count(*) FROM %@",
tableName]])
{
// We re-acquire the channel in case it was abruptly closed between statements
if (![tc isOpen])
tc = [cm acquireOpenChannelForURL: channelURL];
tableScript = [self _sqlScriptForTable: tableName
withType: tableType
andFileSuffix: fileSuffix];
if (!(ex = [tc evaluateExpressionX: tableScript]))
if (![tc evaluateExpressionX: tableScript])
[self logWithFormat: @"table '%@' successfully created!", tableName];
else
[self logWithFormat: @"table '%@' creation failed! Reason: %@", tableName, ex];
}
else
[tc cancelFetch];
@@ -219,97 +220,36 @@ static BOOL debugLeaks;
[cm releaseChannel: tc];
}
- (void) _checkQuickTableWithTypeName: typeName
withCm: (GCSChannelManager *) cm
tableURL: (NSString *) url
{
NSString *tableName, *sql, *driver;
EOAdaptorChannel *channel;
GCSFolderType *type;
NSException *ex;
channel = [cm acquireOpenChannelForURL: [NSURL URLWithString: url]];
tableName = [NSString stringWithFormat: @"sogo_quick_%@", typeName];
driver = [url substringToIndex: [url rangeOfString: @":"].location];
sql = [NSString stringWithFormat: @"SELECT 1 FROM %@ WHERE 1 = 2",
tableName];
if ([channel evaluateExpressionX: sql])
{
type = [GCSFolderType folderTypeWithName: typeName driver: driver];
if (type)
{
sql = [type sqlQuickCreateWithTableName: tableName];
if (!(ex = [channel evaluateExpressionX: sql]))
[self logWithFormat: @"sogo quick table '%@' successfully created!",
tableName];
else
[self logWithFormat: @"sogo quick table '%@' creation failed! Reason: %@", tableName, ex];
}
}
else
[channel cancelFetch];
[cm releaseChannel:channel];
}
//
// If OCSStoreURL is defined, we also check for OCSAclURL, OCSCacheFolderURL
// and we create the combined quick tables.
//
- (BOOL) _checkMandatoryTables
{
GCSChannelManager *cm;
GCSFolderManager *fm;
NSArray *urlStrings;
NSArray *quickTypeStrings;
NSString *tmp, *value;
NSString *urlStrings[] = {@"SOGoProfileURL", @"OCSFolderInfoURL", nil};
NSString **urlString;
NSString *value;
SOGoSystemDefaults *defaults;
NSEnumerator *e;
BOOL ok, combined;
BOOL ok;
defaults = [SOGoSystemDefaults sharedSystemDefaults];
ok = YES;
if ([GCSFolderManager singleStoreMode])
{
urlStrings = [NSArray arrayWithObjects: @"SOGoProfileURL", @"OCSFolderInfoURL", @"OCSStoreURL", @"OCSAclURL", @"OCSCacheFolderURL", nil];
quickTypeStrings = [NSArray arrayWithObjects: @"contact", @"appointment", nil];
combined = YES;
}
else
{
urlStrings = [NSArray arrayWithObjects: @"SOGoProfileURL", @"OCSFolderInfoURL", nil];
combined = NO;
}
cm = [GCSChannelManager defaultChannelManager];
e = [urlStrings objectEnumerator];
while (ok && (tmp = [e nextObject]))
urlString = urlStrings;
while (ok && *urlString)
{
value = [defaults stringForKey: tmp];
value = [defaults stringForKey: *urlString];
if (value)
[self _checkTableWithCM: cm tableURL: value andType: tmp];
{
[self _checkTableWithCM: cm tableURL: value andType: *urlString];
urlString++;
}
else
{
[self errorWithFormat: @"No value specified for '%@'", tmp];
[self errorWithFormat: @"No value specified for '%@'", *urlString];
ok = NO;
}
}
if (combined)
{
e = [quickTypeStrings objectEnumerator];
while ((tmp = [e nextObject]))
{
[self _checkQuickTableWithTypeName: tmp
withCm: cm
tableURL: [defaults stringForKey: @"OCSFolderInfoURL"]];
}
}
if (ok)
{
fm = [GCSFolderManager defaultFolderManager];
@@ -429,12 +369,8 @@ static BOOL debugLeaks;
"GET" if no method was provided in the query path.
*/
if ([_key length] > 0 && ![_key isEqualToString:@"favicon.ico"])
{
obj = [self lookupUser: _key inContext: _ctx];
if (!obj && ![_key isEqualToString: @"public"])
obj = [self lookupUser: @"anonymous" inContext: _ctx];
}
}
obj = [self lookupUser: _key inContext: _ctx];
}
}
else
obj = nil;
@@ -460,12 +396,8 @@ static BOOL debugLeaks;
- (WOResponse *) handleException: (NSException *) _exc
inContext: (WOContext *) _ctx
{
WOResponse *resp;
NSLog(@"EXCEPTION: %s\n", [[_exc description] cString]);
resp = [WOResponse responseWithRequest: [_ctx request]];
[resp setStatus: 501];
return resp;
printf("EXCEPTION: %s\n", [[_exc description] cString]);
abort();
}
/* runtime maintenance */
+2
View File
@@ -21,8 +21,10 @@
*/
#include <unistd.h>
#include <sys/types.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGObjWeb/SoApplication.h>
+2068
View File
File diff suppressed because it is too large. Load diff
+674
View File
@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+34
View File
@@ -0,0 +1,34 @@
/* Codepages.h - this file is part of SOGo
*
* Copyright (C) 2014 Jesús García Sáez
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSDictionary.h>
#import <Foundation/NSValue.h>
#import <Foundation/NSString.h>
@interface Codepages
+ (NSDictionary *) getCodepagesTable;
+ (NSDictionary *) getReverseCodepagesTable;
+ (NSNumber *) getCodepageFromName: (NSString *) name;
+ (NSString *) getNameFromCodepage: (NSNumber *) codepage;
@end
+214
View File
@@ -0,0 +1,214 @@
/* Codepages.m - this file is part of SOGo
*
* Copyright (C) 2014 Jesús García Sáez
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import "Codepages.h"
#import <Foundation/NSArray.h>
@implementation Codepages
+ (NSDictionary *) getCodepagesTable
{
static NSDictionary *table = nil;
if (table == nil)
{
/* http://msdn.microsoft.com/en-us/library/dd317756%28v=vs.85%29.aspx */
table = [[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: 37], @"ibm037",
[NSNumber numberWithInt: 437], @"ibm437",
[NSNumber numberWithInt: 500], @"ibm500",
[NSNumber numberWithInt: 708], @"asmo-708",
[NSNumber numberWithInt: 720], @"dos-720",
[NSNumber numberWithInt: 737], @"ibm737",
[NSNumber numberWithInt: 775], @"ibm775",
[NSNumber numberWithInt: 850], @"ibm850",
[NSNumber numberWithInt: 852], @"ibm852",
[NSNumber numberWithInt: 855], @"ibm855",
[NSNumber numberWithInt: 857], @"ibm857",
[NSNumber numberWithInt: 858], @"ibm00858",
[NSNumber numberWithInt: 860], @"ibm860",
[NSNumber numberWithInt: 861], @"ibm861",
[NSNumber numberWithInt: 862], @"dos-862",
[NSNumber numberWithInt: 863], @"ibm863",
[NSNumber numberWithInt: 864], @"ibm864",
[NSNumber numberWithInt: 865], @"ibm865",
[NSNumber numberWithInt: 866], @"cp866",
[NSNumber numberWithInt: 869], @"ibm869",
[NSNumber numberWithInt: 870], @"ibm870",
[NSNumber numberWithInt: 874], @"windows-874",
[NSNumber numberWithInt: 875], @"cp875",
[NSNumber numberWithInt: 932], @"shift_jis",
[NSNumber numberWithInt: 936], @"gb2312",
[NSNumber numberWithInt: 949], @"ks_c_5601-1987",
[NSNumber numberWithInt: 950], @"big5",
[NSNumber numberWithInt: 1026], @"ibm1026",
[NSNumber numberWithInt: 1047], @"ibm01047",
[NSNumber numberWithInt: 1140], @"ibm01140",
[NSNumber numberWithInt: 1141], @"ibm01141",
[NSNumber numberWithInt: 1142], @"ibm01142",
[NSNumber numberWithInt: 1143], @"ibm01143",
[NSNumber numberWithInt: 1144], @"ibm01144",
[NSNumber numberWithInt: 1145], @"ibm01145",
[NSNumber numberWithInt: 1146], @"ibm01146",
[NSNumber numberWithInt: 1147], @"ibm01147",
[NSNumber numberWithInt: 1148], @"ibm01148",
[NSNumber numberWithInt: 1149], @"ibm01149",
[NSNumber numberWithInt: 1200], @"utf-16",
[NSNumber numberWithInt: 1201], @"unicodefffe",
[NSNumber numberWithInt: 1250], @"windows-1250",
[NSNumber numberWithInt: 1251], @"windows-1251",
[NSNumber numberWithInt: 1252], @"windows-1252",
[NSNumber numberWithInt: 1253], @"windows-1253",
[NSNumber numberWithInt: 1254], @"windows-1254",
[NSNumber numberWithInt: 1255], @"windows-1255",
[NSNumber numberWithInt: 1256], @"windows-1256",
[NSNumber numberWithInt: 1257], @"windows-1257",
[NSNumber numberWithInt: 1258], @"windows-1258",
[NSNumber numberWithInt: 1361], @"johab",
[NSNumber numberWithInt: 10000], @"macintosh",
[NSNumber numberWithInt: 10001], @"x-mac-japanese",
[NSNumber numberWithInt: 10002], @"x-mac-chinesetrad",
[NSNumber numberWithInt: 10003], @"x-mac-korean",
[NSNumber numberWithInt: 10004], @"x-mac-arabic",
[NSNumber numberWithInt: 10005], @"x-mac-hebrew",
[NSNumber numberWithInt: 10006], @"x-mac-greek",
[NSNumber numberWithInt: 10007], @"x-mac-cyrillic",
[NSNumber numberWithInt: 10008], @"x-mac-chinesesimp",
[NSNumber numberWithInt: 10010], @"x-mac-romanian",
[NSNumber numberWithInt: 10017], @"x-mac-ukrainian",
[NSNumber numberWithInt: 10021], @"x-mac-thai",
[NSNumber numberWithInt: 10029], @"x-mac-ce",
[NSNumber numberWithInt: 10079], @"x-mac-icelandic",
[NSNumber numberWithInt: 10081], @"x-mac-turkish",
[NSNumber numberWithInt: 10082], @"x-mac-croatian",
[NSNumber numberWithInt: 12000], @"utf-32",
[NSNumber numberWithInt: 12001], @"utf-32be",
[NSNumber numberWithInt: 20000], @"x-chinese-cns",
[NSNumber numberWithInt: 20001], @"x-cp20001",
[NSNumber numberWithInt: 20002], @"x-chinese-eten",
[NSNumber numberWithInt: 20003], @"x-cp20003",
[NSNumber numberWithInt: 20004], @"x-cp20004",
[NSNumber numberWithInt: 20005], @"x-cp20005",
[NSNumber numberWithInt: 20105], @"x-ia5",
[NSNumber numberWithInt: 20106], @"x-ia5-german",
[NSNumber numberWithInt: 20107], @"x-ia5-swedish",
[NSNumber numberWithInt: 20108], @"x-ia5-norwegian",
[NSNumber numberWithInt: 20127], @"us-ascii",
[NSNumber numberWithInt: 20261], @"x-cp20261",
[NSNumber numberWithInt: 20269], @"x-cp20269",
[NSNumber numberWithInt: 20273], @"ibm273",
[NSNumber numberWithInt: 20277], @"ibm277",
[NSNumber numberWithInt: 20278], @"ibm278",
[NSNumber numberWithInt: 20280], @"ibm280",
[NSNumber numberWithInt: 20284], @"ibm284",
[NSNumber numberWithInt: 20285], @"ibm285",
[NSNumber numberWithInt: 20290], @"ibm290",
[NSNumber numberWithInt: 20297], @"ibm297",
[NSNumber numberWithInt: 20420], @"ibm420",
[NSNumber numberWithInt: 20423], @"ibm423",
[NSNumber numberWithInt: 20424], @"ibm424",
[NSNumber numberWithInt: 20833], @"x-ebcdic-koreanextended",
[NSNumber numberWithInt: 20838], @"ibm-thai",
[NSNumber numberWithInt: 20866], @"koi8-r",
[NSNumber numberWithInt: 20871], @"ibm871",
[NSNumber numberWithInt: 20880], @"ibm880",
[NSNumber numberWithInt: 20905], @"ibm905",
[NSNumber numberWithInt: 20924], @"ibm00924",
[NSNumber numberWithInt: 20932], @"euc-jp",
[NSNumber numberWithInt: 20936], @"x-cp20936",
[NSNumber numberWithInt: 20949], @"x-cp20949",
[NSNumber numberWithInt: 21025], @"cp1025",
[NSNumber numberWithInt: 21866], @"koi8-u",
[NSNumber numberWithInt: 28591], @"iso-8859-1",
[NSNumber numberWithInt: 28592], @"iso-8859-2",
[NSNumber numberWithInt: 28593], @"iso-8859-3",
[NSNumber numberWithInt: 28594], @"iso-8859-4",
[NSNumber numberWithInt: 28595], @"iso-8859-5",
[NSNumber numberWithInt: 28596], @"iso-8859-6",
[NSNumber numberWithInt: 28597], @"iso-8859-7",
[NSNumber numberWithInt: 28598], @"iso-8859-8",
[NSNumber numberWithInt: 28599], @"iso-8859-9",
[NSNumber numberWithInt: 28603], @"iso-8859-13",
[NSNumber numberWithInt: 28605], @"iso-8859-15",
[NSNumber numberWithInt: 29001], @"x-europa",
[NSNumber numberWithInt: 38598], @"iso-8859-8-i",
[NSNumber numberWithInt: 50220], @"iso-2022-jp",
[NSNumber numberWithInt: 50221], @"csiso2022jp",
[NSNumber numberWithInt: 50222], @"iso-2022-jp",
[NSNumber numberWithInt: 50225], @"iso-2022-kr",
[NSNumber numberWithInt: 50227], @"x-cp50227",
[NSNumber numberWithInt: 51932], @"euc-jp",
[NSNumber numberWithInt: 51936], @"euc-cn",
[NSNumber numberWithInt: 51949], @"euc-kr",
[NSNumber numberWithInt: 52936], @"hz-gb-2312",
[NSNumber numberWithInt: 54936], @"gb18030",
[NSNumber numberWithInt: 57002], @"x-iscii-de",
[NSNumber numberWithInt: 57003], @"x-iscii-be",
[NSNumber numberWithInt: 57004], @"x-iscii-ta",
[NSNumber numberWithInt: 57005], @"x-iscii-te",
[NSNumber numberWithInt: 57006], @"x-iscii-as",
[NSNumber numberWithInt: 57007], @"x-iscii-or",
[NSNumber numberWithInt: 57008], @"x-iscii-ka",
[NSNumber numberWithInt: 57009], @"x-iscii-ma",
[NSNumber numberWithInt: 57010], @"x-iscii-gu",
[NSNumber numberWithInt: 57011], @"x-iscii-pa",
[NSNumber numberWithInt: 65000], @"utf-7",
[NSNumber numberWithInt: 65001], @"utf-8",
nil] retain];
}
return table;
}
+ (NSDictionary *) getReverseCodepagesTable
{
static NSDictionary *table = nil;
if (table == nil)
{
NSDictionary *codepages_table;
NSEnumerator *enumerator;
NSMutableArray *codepages, *names;
id key;
// Build reverse table: (NSNumber) codepage -> (NSString) encoding name
codepages_table = [self getCodepagesTable];
codepages = [NSMutableArray arrayWithCapacity: [codepages_table count]];
names = [NSMutableArray arrayWithCapacity: [codepages_table count]];
enumerator = [codepages_table keyEnumerator];
while ((key = [enumerator nextObject]))
{
[names addObject: key];
[codepages addObject: [codepages_table objectForKey: key]];
}
table = [[NSDictionary dictionaryWithObjects: names forKeys: codepages] retain];
}
return table;
}
+ (NSNumber *) getCodepageFromName: (NSString *) name
{
return [[self getCodepagesTable] objectForKey: [name lowercaseString]];
}
+ (NSString *) getNameFromCodepage: (NSNumber *) codepage
{
return [[self getReverseCodepagesTable] objectForKey: codepage];
}
@end
+197
View File
@@ -0,0 +1,197 @@
# GNUstep makefile
include ../config.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
BACKEND_VERSION = 1.0.0
### bootstrap library
MAPISTORESOGO = MAPIStoreSOGo
LIBRARY_NAME = $(MAPISTORESOGO)
$(MAPISTORESOGO)_VERSION = $(BACKEND_VERSION)
$(MAPISTORESOGO)_OBJC_FILES += \
MAPIStoreSOGo.m
### backend bundle
SOGOBACKEND = SOGoBackend
BUNDLE_NAME = $(SOGOBACKEND)
BUNDLE_EXTENSION = .MAPIStore
BUNDLE_INSTALL_DIR = $(SOGO_LIBDIR)
PYTHON = /usr/bin/python
PYTHON_IS_GOOD = $(shell $(PYTHON) -c 'from sys import version_info; a=version_info; print a[0] == 2 and a[1] >= 6')
ifeq (${PYTHON_IS_GOOD},False)
PYTHON = /usr/bin/python2.6
endif
all::
@echo " Python executable: ${PYTHON}"
SAMBA_PRIVATE_DIR = $(shell $(PYTHON) ./samba-get-config.py 'private dir' || echo /var/lib/samba/private)
$(SOGOBACKEND)_PRINCIPAL_CLASS = MAPIApplication
$(SOGOBACKEND)_OBJC_FILES += \
MAPIApplication.m \
MAPIStoreActiveTables.m \
MAPIStoreAuthenticator.m \
MAPIStoreMapping.m \
MAPIStoreMIME.m \
MAPIStoreTypes.m \
MAPIStorePropertySelectors.m \
MAPIStoreSamDBUtils.m \
MAPIStoreUserContext.m \
\
SOGoMAPIDBMessage.m \
SOGoCacheGCSObject+MAPIStore.m \
\
MAPIStoreAppointmentWrapper.m \
MAPIStoreAttachment.m \
MAPIStoreAttachmentTable.m \
MAPIStoreContext.m \
MAPIStoreEmbeddedMessage.m \
MAPIStoreFolder.m \
MAPIStoreMessage.m \
MAPIStoreObject.m \
MAPIStoreObjectProxy.m \
MAPIStoreSOGoObject.m \
MAPIStoreTable.m \
MAPIStoreMessageTable.m \
MAPIStoreFolderTable.m \
MAPIStorePermissionsTable.m \
\
MAPIStoreDBBaseContext.m \
MAPIStoreDBFolder.m \
MAPIStoreDBFolderTable.m \
MAPIStoreDBMessage.m \
MAPIStoreDBMessageTable.m \
\
MAPIStoreFAIMessage.m \
MAPIStoreFAIMessageTable.m \
\
MAPIStoreGCSBaseContext.m \
MAPIStoreGCSFolder.m \
MAPIStoreGCSMessage.m \
MAPIStoreGCSMessageTable.m \
\
MAPIStoreCalendarAttachment.m \
MAPIStoreCalendarContext.m \
MAPIStoreCalendarFolder.m \
MAPIStoreCalendarMessage.m \
MAPIStoreCalendarEmbeddedMessage.m \
MAPIStoreCalendarMessageTable.m \
MAPIStoreRecurrenceUtils.m \
\
MAPIStoreContactsAttachment.m \
MAPIStoreContactsContext.m \
MAPIStoreContactsFolder.m \
MAPIStoreContactsMessage.m \
MAPIStoreContactsMessageTable.m \
\
MAPIStoreTasksContext.m \
MAPIStoreTasksFolder.m \
MAPIStoreTasksMessage.m \
MAPIStoreTasksMessageTable.m \
\
MAPIStoreMailAttachment.m \
MAPIStoreMailContext.m \
MAPIStoreMailFolder.m \
MAPIStoreMailFolderTable.m \
MAPIStoreMailMessage.m \
MAPIStoreMailVolatileMessage.m \
MAPIStoreMailMessageTable.m \
\
MAPIStoreNotesContext.m \
MAPIStoreNotesFolder.m \
MAPIStoreNotesMessage.m \
\
MAPIStoreFallbackContext.m \
\
MAPIStoreSharingMessage.m \
\
NSArray+MAPIStore.m \
NSData+MAPIStore.m \
NSDate+MAPIStore.m \
NSObject+MAPIStore.m \
NSString+MAPIStore.m \
NSValue+MAPIStore.m \
\
iCalEvent+MAPIStore.m \
iCalTimeZone+MAPIStore.m \
\
RTFHandler.m \
\
Codepages.m
$(SOGOBACKEND)_RESOURCE_FILES += \
product.plist
### pl reader
PLREADER_TOOL = plreader
$(PLREADER_TOOL)_OBJC_FILES += \
plreader.m \
DBMSGREADER_TOOL = dbmsgreader
$(DBMSGREADER_TOOL)_OBJC_FILES += \
dbmsgreader.m \
NSObject+PropertyList.m
$(DBMSGREADER_TOOL)_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/sogo -lSOGo \
-L../SOPE/GDLContentStore/obj/ -lGDLContentStore \
-L../SOPE/NGCards/obj/ -lNGCards \
-lNGObjWeb \
$(LIBMAPI_LIBS)
TEST_TOOL_NAME += $(PLREADER_TOOL) $(DBMSGREADER_TOOL)
### cflags and libs
LIBMAPI_CFLAGS = $(shell pkg-config libmapi --cflags)
ifeq ($(LIBMAPI_CFLAGS),)
all install::
@echo "Cannot build the OpenChange SOGo backend (empty CFLAGS for libmapistore)"
else
SAMBA_LIB_DIR = $(shell pkg-config libmapistore --variable=libdir)
LIBMAPI_LIBS = $(shell pkg-config libmapi --libs)
LIBMAPISTORE_CFLAGS = $(shell pkg-config libmapistore --cflags) -DSAMBA_PREFIX="\"$(shell pkg-config libmapistore --variable=prefix)\""
LIBMAPISTORE_LIBS = $(shell pkg-config libmapistore --libs) -lmapiproxy -lWEExtensions
$(MAPISTORESOGO)_INSTALL_DIR = $(DESTDIR)/$(SAMBA_LIB_DIR)/mapistore_backends
$(MAPISTORESOGO)_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/sogo/ -lSOGo -lgnustep-base -lobjc -lNGObjWeb \
$(LIBMAPI_LIBS) \
$(LIBMAPISTORE_LIBS)
$(SOGOBACKEND)_LIB_DIRS += \
-L../SoObjects/SOGo/SOGo.framework/sogo/ -lSOGo \
$(LIBMAPI_LIBS) \
$(LIBMAPISTORE_LIBS)
ADDITIONAL_INCLUDE_DIRS += \
-Wall \
-DSAMBA_PRIVATE_DIR=@"\"$(SAMBA_PRIVATE_DIR)\"" \
$(LIBMAPI_CFLAGS) \
$(LIBMAPISTORE_CFLAGS) \
-I../SoObjects -I../SOPE \
-DBACKEND_BUNDLE_NAME="@\"$(BUNDLE_NAME)$(BUNDLE_EXTENSION)\"" \
-DSOGO_BUNDLES_DIR="@\"$(BUNDLE_INSTALL_DIR)\""
ADDITIONAL_LDFLAGS += -Wl,--rpath,$(SOGO_SYSLIBDIR)/sogo
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/bundle.make
include $(GNUSTEP_MAKEFILES)/library.make
include $(GNUSTEP_MAKEFILES)/test-tool.make
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include GNUmakefile.postamble
endif
+8
View File
@@ -0,0 +1,8 @@
all:: MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h
MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h: gen-property-selectors.py code-MAPIStorePropertySelectors.m code-MAPIStorePropertySelectors.h
@echo " Auto-generating MAPIStorePropertySelectors.[hm]..."
@$(PYTHON) ./gen-property-selectors.py -o MAPIStorePropertySelectors $(LIBMAPISTORE_CFLAGS)
distclean clean::
-rm -f MAPIStorePropertySelectors.m MAPIStorePropertySelectors.h
@@ -1,10 +1,12 @@
/* UIxOccurenceEditor.m - this file is part of SOGo
/* MAPIApplication.h - this file is part of SOGo
*
* Copyright (C) 2008-2020 Inverse inc.
* Copyright (C) 2010-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
@@ -18,26 +20,25 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef MAPIAPPLICATION_H
#define MAPIAPPLICATION_H
#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/SoApplication.h>
#import <SoObjects/Appointments/SOGoCalendarComponent.h>
@class MAPIStoreUserContext;
#import "UIxOccurenceEditor.h"
@implementation UIxOccurenceEditor
- (WOResponse *) deleteAction
@interface MAPIApplication : SoApplication
{
SOGoCalendarComponent *component;
WOResponse *response;
component = [self clientObject];
response = (WOResponse *) [component prepareDelete];
if (!response)
response = [self responseWithStatus: 204];
return response;
MAPIStoreUserContext *userContext;
}
- (id) authenticatorInContext: (id) context;
- (MAPIStoreUserContext *) userContext;
- (void) setUserContext: (MAPIStoreUserContext *) newContext;
- (void) cleanup;
@end
extern MAPIApplication *MAPIApp;
#endif /* MAPIAPPLICATION_H */
+101
View File
@@ -0,0 +1,101 @@
/* MAPIApplication.m - this file is part of SOGo
*
* Copyright (C) 2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSTimeZone.h>
#import <WEExtensions/WEResourceManager.h>
#import <SOGo/SOGoProductLoader.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <Appointments/iCalEntityObject+SOGo.h>
#import "MAPIStoreUserContext.h"
#import "MAPIStoreTypes.h"
#import "MAPIApplication.h"
MAPIApplication *MAPIApp = nil;
@implementation MAPIApplication
+ (BOOL) isCachingEnabled;
{
return NO;
}
- (NSString *) name
{
return @"SOGo";
}
- (id) init
{
if (!MAPIApp)
{
WEResourceManager *rm;
// TODO publish
[iCalEntityObject initializeSOGoExtensions];
MAPIApp = [super init];
[MAPIApp retain];
rm = [[WEResourceManager alloc] init];
[self setResourceManager:rm];
[rm release];
utcTZ = [NSTimeZone timeZoneWithName: @"UTC"];
[utcTZ retain];
}
return MAPIApp;
}
- (BOOL) shouldSetupSignalHandlers
{
return NO;
}
- (MAPIStoreUserContext *) userContext
{
return userContext;
}
- (void) setUserContext: (MAPIStoreUserContext *) newContext
{
/* user contexts must not be retained here ad their holder (mapistore)
contexts must be active when any operation occurs. */
userContext = newContext;
}
- (id) authenticatorInContext: (id) context
{
return [userContext authenticator];
}
- (void) cleanup
{
[userContext deactivate];
}
@end
+47
View File
@@ -0,0 +1,47 @@
/* MAPIStoreActiveTables.h - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef MAPISTOREACTIVETABLES_H
#define MAPISTOREACTIVETABLES_H
#import <Foundation/NSObject.h>
@class NSMutableArray;
@class MAPIStoreTable;
@interface MAPIStoreActiveTables : NSObject
{
NSMutableArray *records;
}
+ (id) activeTables;
- (void) registerTable: (MAPIStoreTable *) table;
- (void) unregisterTable: (MAPIStoreTable *) table;
- (NSArray *) activeTablesForFMID: (uint64_t) fmid
andType: (uint8_t) tableType;
@end
#endif /* MAPISTOREACTIVETABLES_H */
+198
View File
@@ -0,0 +1,198 @@
/* MAPIStoreActiveTables.m - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/* MAPIStoreActiveTables provides an interface to keep accounting of all
instances of a given table, independently from its store and context.
Primary useful for notifications across different connections. */
#import <Foundation/NSArray.h>
#import <Foundation/NSString.h>
#import "MAPIStoreFolder.h"
#import "MAPIStoreTable.h"
#import "MAPIStoreActiveTables.h"
@interface MAPIStoreActiveTableRecord : NSObject
{
uint64_t folderId;
uint8_t tableType;
MAPIStoreTable *table;
}
+ (id) recordForTable: (MAPIStoreTable *) newTable;
- (id) initWithTable: (MAPIStoreTable *) newTable;
- (MAPIStoreTable *) table;
- (BOOL) exactlyMatchesTable: (MAPIStoreTable *) otherTable;
- (BOOL) matchesFMID: (uint64_t) otherFMid
andTableType: (uint8_t) otherTableType;
- (BOOL) matchesTable: (MAPIStoreTable *) otherTable;
@end
@implementation MAPIStoreActiveTableRecord : NSObject
+ (id) recordForTable: (MAPIStoreTable *) newTable
{
MAPIStoreActiveTableRecord *record;
record = [[self alloc] initWithTable: newTable];
[record autorelease];
return record;
}
- (id) init
{
if ((self = [super init]))
{
folderId = 0;
tableType = 0;
table = nil;
}
return self;
}
- (id) initWithTable: (MAPIStoreTable *) newTable
{
if ((self = [self init]))
{
table = newTable;
folderId = [[table container] objectId];
tableType = [table tableType];
}
return self;
}
- (MAPIStoreTable *) table
{
return table;
}
- (BOOL) exactlyMatchesTable: (MAPIStoreTable *) otherTable
{
return (table == otherTable);
}
- (BOOL) matchesFMID: (uint64_t) otherFMid
andTableType: (uint8_t) otherTableType
{
return (tableType == otherTableType
&& folderId == otherFMid);
}
- (BOOL) matchesTable: (MAPIStoreTable *) otherTable
{
uint64_t otherFMid;
BOOL rc;
rc = [self exactlyMatchesTable: otherTable];
if (!rc)
{
otherFMid = [[otherTable container] objectId];
rc = [self matchesFMID: otherFMid andTableType: [otherTable tableType]];
}
return rc;
}
@end
@implementation MAPIStoreActiveTables
+ (id) activeTables
{
static MAPIStoreActiveTables *activeTables = nil;
if (!activeTables)
activeTables = [self new];
return activeTables;
}
- (id) init
{
if ((self = [super init]))
{
records = [NSMutableArray new];
}
return self;
}
- (void) dealloc
{
[records release];
[super dealloc];
}
- (void) registerTable: (MAPIStoreTable *) table
{
MAPIStoreActiveTableRecord *newRecord;
newRecord = [MAPIStoreActiveTableRecord recordForTable: table];
[records addObject: newRecord];
}
- (void) unregisterTable: (MAPIStoreTable *) table
{
MAPIStoreActiveTableRecord *currentRecord;
NSUInteger count, max;
BOOL done = NO;
max = [records count];
for (count = 0; !done && count < max; count++)
{
currentRecord = [records objectAtIndex: count];
if ([currentRecord exactlyMatchesTable: table])
{
[records removeObject: currentRecord];
done = YES;
}
}
}
- (NSArray *) activeTablesForFMID: (uint64_t) fmid
andType: (uint8_t) tableType
{
NSUInteger count, max;
NSMutableArray *tables;
MAPIStoreActiveTableRecord *currentRecord;
tables = [NSMutableArray arrayWithCapacity: 5];
max = [records count];
for (count = 0; count < max; count++)
{
currentRecord = [records objectAtIndex: count];
if ([currentRecord matchesFMID: fmid andTableType: tableType])
[tables addObject: [currentRecord table]];
}
return tables;
}
@end
+173
View File
@@ -0,0 +1,173 @@
/* MAPIStoreAppointmentWrapper.h - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef MAPISTORECALENDARWRAPPER_H
#define MAPISTORECALENDARWRAPPER_H
#import <NGCards/iCalPerson.h>
#import <NGCards/iCalTimeZone.h>
#import <Appointments/iCalEntityObject+SOGo.h>
#import "MAPIStoreObjectProxy.h"
@class NSTimeZone;
@class iCalAlarm;
@class iCalCalendar;
@class iCalEvent;
@class SOGoUser;
@interface MAPIStoreAppointmentWrapper : MAPIStoreObjectProxy
{
struct mapistore_connection_info *connInfo;
iCalCalendar *calendar;
iCalEvent *firstEvent;
iCalEvent *event;
iCalTimeZone *timeZone;
SOGoUser *user;
NSString *senderEmail;
NSData *globalObjectId;
NSData *cleanGlobalObjectId;
BOOL alarmSet;
iCalAlarm *alarm;
BOOL itipSetup;
NSString *method;
iCalPersonPartStat partstat;
}
+ (id) wrapperWithICalEvent: (iCalEvent *) newEvent
andUser: (SOGoUser *) newUser
andSenderEmail: (NSString *) newSenderEmail
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo;
- (id) initWithICalEvent: (iCalEvent *) newEvent
andUser: (SOGoUser *) newUser
andSenderEmail: (NSString *) newSenderEmail
withConnectionInfo: (struct mapistore_connection_info *) newConnInfo;
/* getters */
- (void) fillMessageData: (struct mapistore_message *) dataPtr
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagSenderEmailAddress: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagSenderAddressType: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagSenderName: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagSenderEntryId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagReceivedByAddressType: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagReceivedByEmailAddress: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagReceivedByName: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagReceivedByEntryId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagIconIndex: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagOwnerAppointmentId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidMeetingType: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagMessageClass: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagStartDate: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentSequence: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentStateFlags: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidResponseStatus: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentStartWhole: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidCommonStart: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagEndDate: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentEndWhole: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidCommonEnd: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentDuration: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentSubType: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidBusyStatus: (void **) data // TODO
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidIndentedBusyStatus: (void **) data // TODO
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagNormalizedSubject: (void **) data // SUMMARY
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidLocation: (void **) data // LOCATION
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidPrivate: (void **) data // private (bool), should depend on CLASS and permissions
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagImportance: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidTagBody: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidIsRecurring: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidRecurring: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentRecur: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidGlobalObjectId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidCleanGlobalObjectId: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidServerProcessed: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidServerProcessingActions: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidAppointmentReplyTime: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
/* reminders */
- (int) getPidLidReminderSet: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderDelta: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderTime: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderSignalTime: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderOverride: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderType: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderPlaySound: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) getPidLidReminderFileParameter: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx;
@end
#endif /* MAPISTORECALENDARWRAPPER_H */
File diff suppressed because it is too large. Load diff
+59
View File
@@ -0,0 +1,59 @@
/* MAPIStoreAttachment.h - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef MAPISTOREATTACHMENT_H
#define MAPISTOREATTACHMENT_H
#import "MAPIStoreObject.h"
@class NSData;
@class MAPIStoreEmbeddedMessage;
@interface MAPIStoreAttachment : MAPIStoreObject
{
uint32_t aid;
}
- (void) setAID: (uint32_t) newAID;
- (uint32_t) AID;
- (int) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
withMID: (uint64_t *) mid
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
inMemCtx: (TALLOC_CTX *) memCtx;
- (int) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
inMemCtx: (TALLOC_CTX *) memCtx;
/* helpers */
- (NSData *) mimeAttachTag;
/* move & copy operations */
- (void) copyToAttachment: (MAPIStoreAttachment *) newAttachment inMemCtx: (TALLOC_CTX *) memCtx;
/* subclasses */
- (MAPIStoreEmbeddedMessage *) openEmbeddedMessage;
- (MAPIStoreEmbeddedMessage *) createEmbeddedMessage;
@end
#endif /* MAPISTOREATTACHMENT_H */
+194
View File
@@ -0,0 +1,194 @@
/* MAPIStoreAttachment.m - this file is part of SOGo
*
* Copyright (C) 2011-2012 Inverse inc
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSData.h>
#import "MAPIStoreAttachment.h"
#import "MAPIStoreEmbeddedMessage.h"
#import "MAPIStoreContext.h"
#import "MAPIStoreMapping.h"
#import "MAPIStoreMessage.h"
#import "MAPIStoreTypes.h"
#import "NSObject+MAPIStore.h"
#undef DEBUG
#include <stdbool.h>
#include <gen_ndr/exchange.h>
#include <mapistore/mapistore.h>
#include <mapistore/mapistore_errors.h>
@implementation MAPIStoreAttachment
- (void) setAID: (uint32_t) newAID
{
aid = newAID;
}
- (uint32_t) AID
{
return aid;
}
- (NSString *) nameInContainer
{
return [NSString stringWithFormat: @"%d", aid];
}
- (NSData *) mimeAttachTag
{
static NSData *mimeAttachTag = nil;
char tagBytes[] = {0x2a, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x03, 0x0a, 0x04};
if (!mimeAttachTag)
{
mimeAttachTag = [NSData dataWithBytes: tagBytes length: 9];
[mimeAttachTag retain];
}
return mimeAttachTag;
}
- (int) getPidTagMid: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
*data = MAPILongLongValue (memCtx, [container objectId]);
return MAPISTORE_SUCCESS;
}
- (int) getPidTagAttachNumber: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
*data = MAPILongValue (memCtx, aid);
return MAPISTORE_SUCCESS;
}
- (int) getPidTagRenderingPosition: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
*data = MAPILongValue (memCtx, 0xffffffff);
return MAPISTORE_SUCCESS;
}
- (int) getPidTagAccessLevel: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
return [self getLongZero: data inMemCtx: memCtx];
}
- (int) openEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
withMID: (uint64_t *) mid
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
inMemCtx: (TALLOC_CTX *) memCtx
{
MAPIStoreEmbeddedMessage *attMessage;
struct mapistore_message *mapistoreMsg;
mapistoreMsg = talloc_zero (memCtx, struct mapistore_message);
attMessage = [self openEmbeddedMessage];
if (attMessage)
{
*mid = [attMessage objectId];
*messagePtr = attMessage;
*mapistoreMsgPtr = mapistoreMsg;
}
return (attMessage ? MAPISTORE_SUCCESS : MAPISTORE_ERROR);
}
- (int) createEmbeddedMessage: (MAPIStoreEmbeddedMessage **) messagePtr
withMAPIStoreMsg: (struct mapistore_message **) mapistoreMsgPtr
inMemCtx: (TALLOC_CTX *) memCtx
{
MAPIStoreEmbeddedMessage *attMessage;
struct mapistore_message *mapistoreMsg;
mapistoreMsg = talloc_zero (memCtx, struct mapistore_message);
attMessage = [self createEmbeddedMessage];
if (attMessage)
{
*messagePtr = attMessage;
*mapistoreMsgPtr = mapistoreMsg;
}
return (attMessage ? MAPISTORE_SUCCESS : MAPISTORE_ERROR);
}
- (NSDate *) creationTime
{
return [container creationTime];
}
- (NSDate *) lastModificationTime
{
return [container lastModificationTime];
}
- (uint64_t) objectVersion
{
/* attachments have no version number */
return ULLONG_MAX;
}
- (void) copyToAttachment: (MAPIStoreAttachment *) newAttachment inMemCtx: (TALLOC_CTX *) memCtx
{
void *attachMethod;
enum mapistore_error error;
MAPIStoreEmbeddedMessage *embeddedMessage, *newEmbeddedMessage;
[self copyPropertiesToObject: newAttachment inMemCtx: memCtx];
attachMethod = NULL;
error = [self getProperty: &attachMethod
withTag: PidTagAttachMethod
inMemCtx: NULL];
if (error == MAPISTORE_SUCCESS && attachMethod)
{
if (*(uint32_t *) attachMethod == afEmbeddedMessage)
{
embeddedMessage = [self openEmbeddedMessage];
newEmbeddedMessage = [newAttachment createEmbeddedMessage];
[embeddedMessage copyToMessage: newEmbeddedMessage inMemCtx: memCtx];
}
talloc_free (attachMethod);
}
}
/* subclasses */
- (MAPIStoreEmbeddedMessage *) openEmbeddedMessage
{
// [self subclassResponsibility: _cmd];
return nil;
}
- (MAPIStoreEmbeddedMessage *) createEmbeddedMessage
{
[self subclassResponsibility: _cmd];
return nil;
}
@end
Loaded 100 of 3285 files, more files were not shown because too many files have changed in this diff. Show more