Compare commits

..
461 Commits
Author SHA1 Message Date
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
3419 changed files with 173697 additions and 422145 deletions

No files matched your search

-163
View File
@@ -1,163 +0,0 @@
FROM ubuntu:noble
# The standard user with which vscode-server will be executed
ARG USERNAME=sogo
ARG USER_ID=1000 GROUP_ID=1000
ENV CONTAINER_USERNAME=${USERNAME}
# rename user ubuntu to ${USERNAME}
RUN usermod -l ${CONTAINER_USERNAME} ubuntu && groupmod -n ${CONTAINER_USERNAME} ubuntu
RUN apt-get update && apt-get install -y sudo \
&& usermod -aG sudo ${CONTAINER_USERNAME} \
&& echo ${CONTAINER_USERNAME} ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/${CONTAINER_USERNAME} \
&& chmod 0440 /etc/sudoers.d/${CONTAINER_USERNAME}
# Ensure sudo group users are not asked for a password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/${CONTAINER_USERNAME} && chmod 0440 /etc/sudoers.d/${CONTAINER_USERNAME}
ENV WORKSPACE=/workspace
RUN mkdir -p ${WORKSPACE} && chown -R ${CONTAINER_USERNAME}:${CONTAINER_USERNAME} ${WORKSPACE}
RUN apt-get clean && apt-get update --allow-unauthenticated --allow-insecure-repositories \
&& apt-get install -y --fix-missing git cmake libexpat-dev curl telnet nano
WORKDIR /tmp/build
RUN mkdir -p /src/libwbxml && mkdir -p /tmp/build/libwbxml
RUN git clone https://github.com/libwbxml/libwbxml.git /src/libwbxml/
RUN cmake -B/tmp/build/libwbxml -DCMAKE_INSTALL_PREFIX=$prefix /src/libwbxml && cd /tmp/build/libwbxml && make && make install
# For backward compatibility
WORKDIR ${WORKSPACE}
RUN ln -s /include/libwbxml-1.1 /usr/include/libwbxml-1.0
RUN ln -s /include/libwbxml-1.1 /usr/include/libwbxml
RUN ln -s /include/libwbxml-1.1 /usr/include/libwbxml-1.1
# download, prepare & compile
RUN echo "Download SOPE sources" \
&& git clone https://github.com/Alinto/sope.git /src/SOPE \
&& echo "install required packages" \
&& apt-get update \
&& apt-get upgrade --allow-unauthenticated -qy \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install --allow-unauthenticated -qy --no-install-recommends \
gnustep-make \
gnustep-base-runtime \
libgnustep-base-dev \
pkg-config \
make \
gobjc \
g++ \
gdb gdbserver \
vim \
liblasso3-dev \
python-is-python3 \
libz-dev \
zlib1g-dev \
libpq-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
libsodium-dev \
libxml2-dev \
libssl-dev \
libldap2-dev \
libzip-dev \
mariadb-client \
postgresql-client \
tmpreaper \
python3-m2crypto \
python3-simplejson \
python3-vobject \
python3-dateutil \
postgresql-server-dev-all \
libmemcached-dev \
libcurl4-openssl-dev \
tzdata \
libytnef0 \
libytnef0-dev \
liboath-dev \
sudo \
lsof \
systemd \
tcpdump \
jq libxml2-utils
RUN echo "compiling sope" \
&& cd /src/SOPE \
&& ./configure --with-gnustep --enable-debug --disable-strip \
&& make \
&& make install
# copy sogo local sources
COPY / /src/SOGo
RUN chown -R ${CONTAINER_USERNAME}:${CONTAINER_USERNAME} /src/SOGo
# install sogo
RUN echo "compiling sogo"
# RUN chmod +x /src/SOGo/configure
WORKDIR /src/SOGo
RUN ./configure --enable-debug --disable-strip --enable-mfa
RUN make
RUN make install
RUN echo "register sogo library"
RUN echo "/usr/local/lib/sogo" > /etc/ld.so.conf.d/sogo.conf
RUN ldconfig
RUN echo "create directories and enforce permissions"
RUN install -o sogo -g sogo -m 755 -d /var/run/sogo
RUN install -o sogo -g sogo -m 750 -d /var/spool/sogo
RUN install -o sogo -g sogo -m 750 -d /var/log/sogo
WORKDIR ${WORKSPACE}
# Copy the binary file into /usr/local/bin
COPY .devcontainer/conf/sogo/compile_sogo.sh /usr/local/bin/compile_sogo.sh
# Set the appropriate permissions
RUN chmod +x /usr/local/bin/compile_sogo.sh
# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
RUN apt install -qy nodejs \
&& npm i -g grunt
# Users
RUN useradd sogo-tests1 && \
useradd sogo-tests2 && \
useradd sogo-tests3 && \
useradd sogo-tests-super
# Tests
RUN npm i -g xunit-viewer
# SOGo
RUN apt-get clean && apt-get install -y --no-install-recommends wget && cd /tmp && \
wget https://raw.githubusercontent.com/Alinto/sogo/master/packaging/debian/sogo.init && \
ln -s /usr/local/sbin/sogod /usr/sbin/sogod && \
mv sogo.init /etc/init.d/sogod && chmod +x /etc/init.d/sogod && \
mkdir /etc/sogo
COPY .devcontainer/conf/sogo/sogo.conf /etc/sogo/
ADD .devcontainer/conf/sogo/sogo.conf /etc/sogo/sogo-base.conf
# Clean
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Dev env script
ADD .devcontainer/conf/sogo/devenv /usr/sbin/
ADD .devcontainer/conf/sogo/common.sh /include/
RUN chmod +x /usr/sbin/devenv
RUN chmod +x /include/common.sh
# Interface the environment
EXPOSE 50000 50001
# Entrypoint
ADD .devcontainer/conf/sogo/entrypoint.sh /
RUN chmod +x /entrypoint.sh
USER ${CONTAINER_USERNAME}
ENTRYPOINT ["/entrypoint.sh"]
-67
View File
@@ -1,67 +0,0 @@
CREATE USER IF NOT EXISTS 'sogobuild'@'%' IDENTIFIED BY 'sogo123';
GRANT ALL PRIVILEGES ON * . * TO 'sogobuild'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE IF NOT EXISTS sogo;
USE sogo;
-- INSERT INTO
CREATE DATABASE IF NOT EXISTS sogo_integration_tests_auth;
USE sogo_integration_tests_auth;
-- MySQL dump 10.16 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: sogo_integration_tests_auth
-- ------------------------------------------------------
-- Server version 10.1.48-MariaDB-0+deb9u2
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `sogoauth`
--
DROP TABLE IF EXISTS `sogoauth`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sogoauth` (
`c_uid` varchar(255) NOT NULL,
`c_name` varchar(255) NOT NULL,
`c_password` varchar(255) DEFAULT NULL,
`c_cn` varchar(255) DEFAULT NULL,
`mail` varchar(255) DEFAULT NULL,
`kind` varchar(255) DEFAULT NULL,
`multiplebookings` int(11) DEFAULT NULL,
PRIMARY KEY (`c_uid`),
UNIQUE KEY `c_name` (`c_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `sogoauth`
--
LOCK TABLES `sogoauth` WRITE;
/*!40000 ALTER TABLE `sogoauth` DISABLE KEYS */;
INSERT INTO `sogoauth` VALUES ('res','res','sogo','Resource no overbook','res@example.org','location',1),('res-nolimit','res-nolimit','sogo','Resource can overbook','res-nolimit@example.org','location',0),('sogo-tests-super','sogo-tests-super','sogo','sogo test super','sogo-tests-super@example.org',NULL,NULL),('sogo-tests1','sogo-tests1','sogo','sogo One','sogo-tests1@example.org',NULL,NULL),('sogo-tests2','sogo-tests2','sogo','sogo Two','sogo-tests2@example.org',NULL,NULL),('sogo-tests3','sogo-tests3','sogo','sogo Three','sogo-tests3@example.org',NULL,NULL);
/*!40000 ALTER TABLE `sogoauth` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2023-02-22 4:15:31
-72
View File
@@ -1,72 +0,0 @@
# From https://github.com/dovecot/docker/blob/main/2.3.21.1/
FROM debian:11-slim
LABEL org.opencontainers.image.authors="dovecot@dovecot.org"
ENV container=docker \
LC_ALL=C
ARG DEBIAN_FRONTEND=noninteractive
ADD dovecot.gpg /etc/apt/keyrings/dovecot.gpg
ADD dovecot.list /etc/apt/sources.list.d
RUN apt-get -y update && apt-get -y install \
tini \
dovecot-core \
dovecot-gssapi \
dovecot-imapd \
dovecot-ldap \
dovecot-lmtpd \
dovecot-managesieved \
dovecot-mysql \
dovecot-pgsql \
dovecot-pop3d \
dovecot-sieve \
dovecot-solr \
dovecot-sqlite \
dovecot-submissiond \
ca-certificates \
ssl-cert && \
rm -rf /var/lib/apt/lists && \
groupadd -g 1000 vmail && \
useradd -u 1000 -g 1000 vmail -d /srv/vmail && \
passwd -l vmail && \
rm -rf /etc/dovecot && \
mkdir /srv/mail && \
chown vmail:vmail /srv/mail && \
make-ssl-cert generate-default-snakeoil && \
mkdir /etc/dovecot && \
ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/dovecot/cert.pem && \
ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/dovecot/key.pem
#ADD dovecot.conf /etc/dovecot/dovecot.conf
# Add for SOGo env
RUN apt-get update --allow-insecure-repositories && \
apt-get install --allow-unauthenticated -y dovecot-ldap dovecot-sieve dovecot-managesieved dovecot-lmtpd
RUN chown -R dovecot:dovecot /var/mail
RUN mkdir /var/sieve && \
chmod -R 755 /var/sieve && \
chown -R vmail:vmail /var/sieve
ADD dovecot.conf /etc/dovecot/dovecot.conf
ADD conf.d /etc/dovecot/conf.d
ADD dovecot-ldap.conf.ext /etc/dovecot/dovecot-ldap.conf.ext
# Clean
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# End add for SOGo env
ADD wait-for-it.sh /wait-for-it.sh
EXPOSE 24
EXPOSE 110
EXPOSE 143
EXPOSE 587
EXPOSE 990
EXPOSE 993
EXPOSE 4190
VOLUME ["/etc/dovecot", "/srv/mail"]
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["./wait-for-it.sh", "openldap:389", "--", "/usr/sbin/dovecot", "-F"]
@@ -1,3 +0,0 @@
disable_plaintext_auth = no
auth_mechanisms = plain login
!include auth-ldap.conf.ext
@@ -1,11 +0,0 @@
mail_location = maildir:/var/mail/%n
namespace inbox {
inbox = yes
}
mail_privileged_group = mail
protocol !indexer-worker {
}
protocol imap {
mail_plugins = $mail_plugins acl
}
@@ -1,88 +0,0 @@
service imap-login {
inet_listener imap {
#port = 143
}
inet_listener imaps {
#port = 993
#ssl = yes
}
}
service pop3-login {
inet_listener pop3 {
#port = 110
}
inet_listener pop3s {
#port = 995
#ssl = yes
}
}
service submission-login {
inet_listener submission {
#port = 587
}
}
service lmtp {
unix_listener /var/spool/dovecot-lmtp {
mode = 0660
user = root
group = root
}
inet_listener lmtp {
port = 24
}
}
service imap {
# Most of the memory goes to mmap()ing files. You may need to increase this
# limit if you have huge mailboxes.
#vsz_limit = $default_vsz_limit
# Max. number of IMAP processes (connections)
#process_limit = 1024
}
service pop3 {
# Max. number of POP3 processes (connections)
#process_limit = 1024
}
service submission {
# Max. number of SMTP Submission processes (connections)
#process_limit = 1024
}
service auth {
unix_listener auth-userdb {
#mode = 0666
#user =
#group =
}
# Postfix smtp-auth
#unix_listener /var/spool/postfix/private/auth {
# mode = 0666
#}
# Auth process is run as this user.
#user = $default_internal_user
}
service auth-worker {
# Auth worker process is run as root by default, so that it can access
# /etc/shadow. If this isn't necessary, the user should be changed to
# $default_internal_user.
#user = root
}
service dict {
# If dict proxy is used, mail processes should have access to its socket.
# For example: mode=0660, group=vmail and global mail_access_groups=vmail
unix_listener dict {
#mode = 0600
#user =
#group =
}
}
@@ -1,5 +0,0 @@
protocol lmtp {
postmaster_address = postmaster@example.org
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
@@ -1,3 +0,0 @@
plugin {
acl = vfile
}
@@ -1,3 +0,0 @@
plugin {
sieve = file:/var/sieve/%n@example.org;active=/var/sieve/%n@example.org/.dovecot.sieve
}
@@ -1,17 +0,0 @@
passdb {
driver = ldap
# Path for LDAP configuration file, see example-config/dovecot-ldap.conf.ext
args = /etc/dovecot/dovecot-ldap.conf.ext
}
userdb {
driver = ldap
args = /etc/dovecot/dovecot-ldap.conf.ext
# Default fields can be used to specify defaults that LDAP may override
#default_fields = home=/home/virtual/%u
}
mail_gid = 8
@@ -1,9 +0,0 @@
hosts = openldap:389
dn = cn=admin,dc=example,dc=org
dnpass = password
debug_level = -1
auth_bind = yes
ldap_version = 3
base = ou=users,dc=example,dc=org
user_filter = (&(objectClass=posixAccount)(uid=%u))
user_filter = (|(uid=%u)(mail=%u))
-13
View File
@@ -1,13 +0,0 @@
## Dovecot configuration file
!include_try /usr/share/dovecot/protocols.d/*.protocol
!include conf.d/*.conf
protocols = imap lmtp sieve
!include_try local.conf
log_path = /dev/stderr
auth_verbose = yes
auth_debug = yes
mail_debug = yes
mail_plugins = acl
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
deb [signed-by=/etc/apt/keyrings/dovecot.gpg] http://repo.dovecot.org/ce-2.3.21.1/debian/bullseye bullseye main
-182
View File
@@ -1,182 +0,0 @@
#!/usr/bin/env bash
# Use this script to test if a given TCP host/port are available
WAITFORIT_cmdname=${0##*/}
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
usage()
{
cat << USAGE >&2
Usage:
$WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args]
-h HOST | --host=HOST Host or IP under test
-p PORT | --port=PORT TCP port under test
Alternatively, you specify the host and port as host:port
-s | --strict Only execute subcommand if the test succeeds
-q | --quiet Don't output any status messages
-t TIMEOUT | --timeout=TIMEOUT
Timeout in seconds, zero for no timeout
-- COMMAND ARGS Execute command with args after the test finishes
USAGE
exit 1
}
wait_for()
{
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
else
echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout"
fi
WAITFORIT_start_ts=$(date +%s)
while :
do
if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then
nc -z $WAITFORIT_HOST $WAITFORIT_PORT
WAITFORIT_result=$?
else
(echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1
WAITFORIT_result=$?
fi
if [[ $WAITFORIT_result -eq 0 ]]; then
WAITFORIT_end_ts=$(date +%s)
echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds"
break
fi
sleep 1
done
return $WAITFORIT_result
}
wait_for_wrapper()
{
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
if [[ $WAITFORIT_QUIET -eq 1 ]]; then
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
else
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
fi
WAITFORIT_PID=$!
trap "kill -INT -$WAITFORIT_PID" INT
wait $WAITFORIT_PID
WAITFORIT_RESULT=$?
if [[ $WAITFORIT_RESULT -ne 0 ]]; then
echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
fi
return $WAITFORIT_RESULT
}
# process arguments
while [[ $# -gt 0 ]]
do
case "$1" in
*:* )
WAITFORIT_hostport=(${1//:/ })
WAITFORIT_HOST=${WAITFORIT_hostport[0]}
WAITFORIT_PORT=${WAITFORIT_hostport[1]}
shift 1
;;
--child)
WAITFORIT_CHILD=1
shift 1
;;
-q | --quiet)
WAITFORIT_QUIET=1
shift 1
;;
-s | --strict)
WAITFORIT_STRICT=1
shift 1
;;
-h)
WAITFORIT_HOST="$2"
if [[ $WAITFORIT_HOST == "" ]]; then break; fi
shift 2
;;
--host=*)
WAITFORIT_HOST="${1#*=}"
shift 1
;;
-p)
WAITFORIT_PORT="$2"
if [[ $WAITFORIT_PORT == "" ]]; then break; fi
shift 2
;;
--port=*)
WAITFORIT_PORT="${1#*=}"
shift 1
;;
-t)
WAITFORIT_TIMEOUT="$2"
if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi
shift 2
;;
--timeout=*)
WAITFORIT_TIMEOUT="${1#*=}"
shift 1
;;
--)
shift
WAITFORIT_CLI=("$@")
break
;;
--help)
usage
;;
*)
echoerr "Unknown argument: $1"
usage
;;
esac
done
if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then
echoerr "Error: you need to provide a host and port to test."
usage
fi
WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
WAITFORIT_STRICT=${WAITFORIT_STRICT:-0}
WAITFORIT_CHILD=${WAITFORIT_CHILD:-0}
WAITFORIT_QUIET=${WAITFORIT_QUIET:-0}
# Check to see if timeout is from busybox?
WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
WAITFORIT_BUSYTIMEFLAG=""
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
WAITFORIT_ISBUSY=1
# Check if busybox timeout uses -t flag
# (recent Alpine versions don't support -t anymore)
if timeout &>/dev/stdout | grep -q -e '-t '; then
WAITFORIT_BUSYTIMEFLAG="-t"
fi
else
WAITFORIT_ISBUSY=0
fi
if [[ $WAITFORIT_CHILD -gt 0 ]]; then
wait_for
WAITFORIT_RESULT=$?
exit $WAITFORIT_RESULT
else
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
wait_for_wrapper
WAITFORIT_RESULT=$?
else
wait_for
WAITFORIT_RESULT=$?
fi
fi
if [[ $WAITFORIT_CLI != "" ]]; then
if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then
echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess"
exit $WAITFORIT_RESULT
fi
exec "${WAITFORIT_CLI[@]}"
else
exit $WAITFORIT_RESULT
fi
-277
View File
@@ -1,277 +0,0 @@
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Denver
X-LIC-LOCATION:America/Denver
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
TZNAME:MDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
TZNAME:MST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20120117T215905Z
LAST-MODIFIED:20120117T215919Z
DTSTAMP:20120117T215919Z
UID:58f2f5bb-3be9-43d5-998b-088c593dbc85
SUMMARY:New Year's Day
DTSTART;TZID=America/Denver:20120101T081500
DTEND;TZID=America/Denver:20120101T090500
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T215933Z
LAST-MODIFIED:20120117T215941Z
DTSTAMP:20120117T215941Z
UID:7fdfe99e-3485-4af4-8949-2b0c8c829d17
SUMMARY:Epiphany
DTSTART;VALUE=DATE:20120106
DTEND;VALUE=DATE:20120107
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T215959Z
LAST-MODIFIED:20120117T220007Z
DTSTAMP:20120117T220007Z
UID:112cd226-2600-48d3-b5e8-55ab497c7a10
SUMMARY:Groundhog Day
DTSTART;VALUE=DATE:20120202
DTEND;VALUE=DATE:20120203
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220032Z
LAST-MODIFIED:20120117T220040Z
DTSTAMP:20120117T220040Z
UID:42daa2c5-42e0-4cbc-a614-1284b2f3378b
SUMMARY:Valentine's Day
DTSTART;VALUE=DATE:20120214
DTEND;VALUE=DATE:20120215
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220145Z
LAST-MODIFIED:20120117T220156Z
DTSTAMP:20120117T220156Z
UID:d35c66b7-cc8f-4fa8-b980-eae06732a679
SUMMARY:St. Patrick's Day
DTSTART;VALUE=DATE:20120317
DTEND;VALUE=DATE:20120318
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220208Z
LAST-MODIFIED:20120117T220215Z
DTSTAMP:20120117T220215Z
UID:15440c4b-f459-4599-9d92-5906555eb6d1
SUMMARY:Good Friday
DTSTART;VALUE=DATE:20120406
DTEND;VALUE=DATE:20120407
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220225Z
LAST-MODIFIED:20120117T220232Z
DTSTAMP:20120117T220232Z
UID:00c93d5e-4c1a-45b0-a4f5-3a60b4ba865b
SUMMARY:Easter Sunday
DTSTART;VALUE=DATE:20120408
DTEND;VALUE=DATE:20120409
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220244Z
LAST-MODIFIED:20120117T220251Z
DTSTAMP:20120117T220251Z
UID:8443f87e-ccc7-4bbc-bdc2-8244f459638f
SUMMARY:Vimy Ridge Day
DTSTART;VALUE=DATE:20120409
DTEND;VALUE=DATE:20120410
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220301Z
LAST-MODIFIED:20120117T220307Z
DTSTAMP:20120117T220307Z
UID:3b2035b3-1b4c-4f08-8a38-5ab3d57ef4bb
SUMMARY:Easter Monday
DTSTART;VALUE=DATE:20120409
DTEND;VALUE=DATE:20120410
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220407Z
LAST-MODIFIED:20120117T220411Z
DTSTAMP:20120117T220411Z
UID:dc725c0c-587a-4f7d-997f-521478528973
SUMMARY:Canada Day
DTSTART;VALUE=DATE:20120701
DTEND;VALUE=DATE:20120702
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220615Z
LAST-MODIFIED:20120117T220622Z
DTSTAMP:20120117T220622Z
UID:5663c847-3a29-492b-aeab-1d009852ad67
SUMMARY:Halloween
DTSTART;VALUE=DATE:20121031
DTEND;VALUE=DATE:20121101
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220859Z
LAST-MODIFIED:20120117T220905Z
DTSTAMP:20120117T220905Z
UID:ab6e8de1-e4cd-46c2-a031-5e030d7d56d2
SUMMARY:Christmas Eve
DTSTART;VALUE=DATE:20121224
DTEND;VALUE=DATE:20121225
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220911Z
LAST-MODIFIED:20120117T220917Z
DTSTAMP:20120117T220917Z
UID:6a7de4c3-bb70-477c-91b8-5d780c19d4ca
SUMMARY:Christmas
DTSTART;VALUE=DATE:20121225
DTEND;VALUE=DATE:20121226
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220920Z
LAST-MODIFIED:20120117T220943Z
DTSTAMP:20120117T220943Z
UID:4913c6ab-5332-4094-811a-f6060616fda3
SUMMARY:Boxing Day (Most regions)
DTSTART;VALUE=DATE:20121226
DTEND;VALUE=DATE:20121227
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220956Z
LAST-MODIFIED:20120117T221003Z
DTSTAMP:20120117T221003Z
UID:43bc10df-bd29-4f2b-aa0f-c6cc8cf3839f
SUMMARY:New Year's Eve
DTSTART;VALUE=DATE:20121231
DTEND;VALUE=DATE:20130101
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T221726Z
LAST-MODIFIED:20120117T221734Z
DTSTAMP:20120117T221734Z
UID:a51d1d54-72c6-4fe7-8080-bb78b3ab0c09
SUMMARY:New Year's Day
DTSTART;VALUE=DATE:20120101
DTEND;VALUE=DATE:20120102
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220055Z
LAST-MODIFIED:20120117T221850Z
DTSTAMP:20120117T221850Z
UID:31cc39a6-9b41-4a5f-9fd2-f5c43ad686fb
SUMMARY:Family Day (AB\, ON\, SK)
DTSTART;VALUE=DATE:20120220
DTEND;VALUE=DATE:20120221
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220125Z
LAST-MODIFIED:20120117T221906Z
DTSTAMP:20120117T221906Z
UID:4370e2c8-0863-456c-b1d0-e64ec8a06ef1
SUMMARY:Commonwealth Day
DTSTART;VALUE=DATE:20120312
DTEND;VALUE=DATE:20120313
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220321Z
LAST-MODIFIED:20120117T221951Z
DTSTAMP:20120117T221951Z
UID:722dc2f8-c0c8-457b-902c-30e94aee23bb
SUMMARY:Victoria Day (Most regions)
DTSTART;VALUE=DATE:20120521
DTEND;VALUE=DATE:20120522
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220346Z
LAST-MODIFIED:20120117T222004Z
DTSTAMP:20120117T222004Z
UID:f782fb4f-7d96-425c-ae58-839d0f8a9283
SUMMARY:National Aboriginal Day
DTSTART;VALUE=DATE:20120621
DTEND;VALUE=DATE:20120622
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220419Z
LAST-MODIFIED:20120117T222100Z
DTSTAMP:20120117T222100Z
UID:e9a8bda0-2fa1-4cdf-94e1-5eb5467869ff
SUMMARY:Canada Day - statutory holiday
DTSTART;VALUE=DATE:20120702
DTEND;VALUE=DATE:20120703
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220450Z
LAST-MODIFIED:20120117T222123Z
DTSTAMP:20120117T222123Z
UID:074e1958-329b-45b8-b918-3d6807c9deb4
SUMMARY:Civic/Provincial Day (Many regions)
DTSTART;VALUE=DATE:20120806
DTEND;VALUE=DATE:20120807
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220527Z
LAST-MODIFIED:20120117T222135Z
DTSTAMP:20120117T222135Z
UID:e2bc628c-79da-4f09-bfbb-b1d1ea9ca79f
SUMMARY:Labour Day (All)
DTSTART;VALUE=DATE:20120903
DTEND;VALUE=DATE:20120904
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220553Z
LAST-MODIFIED:20120117T222145Z
DTSTAMP:20120117T222145Z
UID:ed33f08c-fcb1-44ee-9173-1bd7051093fb
SUMMARY:Thanksgiving Day (All)
DTSTART;VALUE=DATE:20121008
DTEND;VALUE=DATE:20121009
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220635Z
LAST-MODIFIED:20120117T222159Z
DTSTAMP:20120117T222159Z
UID:27bff647-69a4-4be8-9647-6dd1ad3b4d60
SUMMARY:Remembrance Day (Most regions)
DTSTART;VALUE=DATE:20121111
DTEND;VALUE=DATE:20121112
X-MOZ-GENERATION:2
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220727Z
LAST-MODIFIED:20120117T222205Z
DTSTAMP:20120117T222205Z
UID:487d87a7-618f-4f07-bba2-9f472be8c836
SUMMARY:Remembrance Day observed (Many regions)
DTSTART;VALUE=DATE:20121112
DTEND;VALUE=DATE:20121113
X-MOZ-GENERATION:1
END:VEVENT
BEGIN:VEVENT
CREATED:20120117T220816Z
LAST-MODIFIED:20120117T222220Z
DTSTAMP:20120117T222220Z
UID:696de927-4e80-4d07-a283-550f51ec324e
SUMMARY:Anniversary of the Statute of Westminster
DTSTART;VALUE=DATE:20121211
DTEND;VALUE=DATE:20121212
X-MOZ-GENERATION:1
END:VEVENT
END:VCALENDAR
-3
View File
@@ -1,3 +0,0 @@
FROM httpd:2.4
ADD httpd.conf /usr/local/apache2/conf/httpd.conf
-772
View File
@@ -1,772 +0,0 @@
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
# will be interpreted as '/logs/access_log'.
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/usr/local/apache2"
#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:logs
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 81
Listen 443
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule mpm_event_module modules/mod_mpm_event.so
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
LoadModule authz_core_module modules/mod_authz_core.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_form_module modules/mod_auth_form.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule allowmethods_module modules/mod_allowmethods.so
#LoadModule isapi_module modules/mod_isapi.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cache_disk_module modules/mod_cache_disk.so
#LoadModule cache_socache_module modules/mod_cache_socache.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule socache_redis_module modules/mod_socache_redis.so
#LoadModule watchdog_module modules/mod_watchdog.so
#LoadModule macro_module modules/mod_macro.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule bucketeer_module modules/mod_bucketeer.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule echo_module modules/mod_echo.so
#LoadModule example_hooks_module modules/mod_example_hooks.so
#LoadModule case_filter_module modules/mod_case_filter.so
#LoadModule case_filter_in_module modules/mod_case_filter_in.so
#LoadModule example_ipc_module modules/mod_example_ipc.so
#LoadModule buffer_module modules/mod_buffer.so
#LoadModule data_module modules/mod_data.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule request_module modules/mod_request.so
#LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
#LoadModule reflector_module modules/mod_reflector.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule deflate_module modules/mod_deflate.so
#LoadModule xml2enc_module modules/mod_xml2enc.so
#LoadModule proxy_html_module modules/mod_proxy_html.so
#LoadModule brotli_module modules/mod_brotli.so
LoadModule mime_module modules/mod_mime.so
#LoadModule ldap_module modules/mod_ldap.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule logio_module modules/mod_logio.so
#LoadModule lua_module modules/mod_lua.so
LoadModule env_module modules/mod_env.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
#LoadModule remoteip_module modules/mod_remoteip.so
LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_express_module modules/mod_proxy_express.so
#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
#LoadModule session_module modules/mod_session.so
#LoadModule session_cookie_module modules/mod_session_cookie.so
#LoadModule session_crypto_module modules/mod_session_crypto.so
#LoadModule session_dbd_module modules/mod_session_dbd.so
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
LoadModule ssl_module modules/mod_ssl.so
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
#LoadModule dialup_module modules/mod_dialup.so
#LoadModule http2_module modules/mod_http2.so
#LoadModule proxy_http2_module modules/mod_proxy_http2.so
#LoadModule md_module modules/mod_md.so
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule unixd_module modules/mod_unixd.so
#LoadModule heartbeat_module modules/mod_heartbeat.so
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
#LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule asis_module modules/mod_asis.so
#LoadModule info_module modules/mod_info.so
#LoadModule suexec_module modules/mod_suexec.so
<IfModule !mpm_prefork_module>
#LoadModule cgid_module modules/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
#LoadModule cgi_module modules/mod_cgi.so
</IfModule>
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
#LoadModule imagemap_module modules/mod_imagemap.so
#LoadModule actions_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User www-data
Group www-data
</IfModule>
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin you@example.com
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all granted
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog /proc/self/fd/2
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog /proc/self/fd/1 common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock cgisock
</IfModule>
#
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule headers_module>
#
# Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
# backend servers which have lingering "httpoxy" defects.
# 'Proxy' request header is undefined by the IETF, not listed by IANA
#
RequestHeader unset Proxy early
</IfModule>
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited
#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile on
# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf
# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf
# Language settings
#Include conf/extra/httpd-languages.conf
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
#Include conf/extra/httpd-default.conf
# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
###########################
#
# SOGo HTTP
#
###########################
<VirtualHost *:80>
ServerAdmin support@sogo.nu
ServerName dev.sogo
Alias /SOGo.woa/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
<Directory /usr/lib/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# Explicitly allow caching of static content to avoid browser specific behavior.
# A resource's URL MUST change in order to have the client load the new version.
<IfModule expires_module>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>
</Directory>
CustomLog /tmp/sogo.log combined
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPass /SOGo http://sogo:50000/SOGo retry=0
ProxyPass /Microsoft-Server-ActiveSync http://sogo:50000/SOGo/Microsoft-Server-ActiveSync retry=0 connectiontimeout=5 timeout=3600
ProxyPass /keycloak http://keycloak:8080/keycloak retry=0
ProxyPassReverse /keycloak http://keycloak:8080/keycloak
<Proxy http://sogo:50000/SOGo>
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "80"
RequestHeader set "x-webobjects-server-name" "127.0.0.1"
RequestHeader set "x-webobjects-server-url" "http://127.0.0.1"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
Order allow,deny
Allow from all
</Proxy>
RewriteEngine On
RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]
# For Apple autoconfiguration
<IfModule rewrite_module>
RewriteEngine On
RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>
<Directory /src/SOGo/Tests/results>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Alias /tests /src/SOGo/Tests/results
</VirtualHost>
###########################
#
# SOGo HTTP (for tests)
#
###########################
<VirtualHost *:81>
ServerAdmin support@sogo.nu
ServerName dev.sogo
Alias /SOGo.woa/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
<Directory /usr/lib/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# Explicitly allow caching of static content to avoid browser specific behavior.
# A resource's URL MUST change in order to have the client load the new version.
<IfModule expires_module>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>
</Directory>
CustomLog /tmp/sogo.log combined
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPass /SOGo http://sogo:50000/SOGo retry=0
ProxyPass /Microsoft-Server-ActiveSync http://sogo:50000/SOGo/Microsoft-Server-ActiveSync retry=0 connectiontimeout=5 timeout=3600
<Proxy http://sogo:50000/SOGo>
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "81"
RequestHeader set "x-webobjects-server-name" "httpd"
RequestHeader set "x-webobjects-server-url" "http://httpd"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "httpd"
AddDefaultCharset UTF-8
Order allow,deny
Allow from all
</Proxy>
RewriteEngine On
RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]
# For Apple autoconfiguration
<IfModule rewrite_module>
RewriteEngine On
RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>
</VirtualHost>
###########################
#
# SOGo HTTPS
#
###########################
<VirtualHost *:443>
ServerAdmin support@sogo.nu
ServerName dev.sogo
Alias /SOGo.woa/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/local/lib/GNUstep/SOGo/WebServerResources/
SSLEngine on
SSLCertificateFile /ssl/apache-selfsigned.crt
SSLCertificateKeyFile /ssl/apache-selfsigned.key
<Directory /usr/lib/GNUstep/SOGo/>
<IfVersion < 2.4>
Order deny,allow
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
# Explicitly allow caching of static content to avoid browser specific behavior.
# A resource's URL MUST change in order to have the client load the new version.
<IfModule expires_module>
ExpiresActive On
ExpiresDefault "access plus 1 year"
</IfModule>
</Directory>
CustomLog /tmp/sogo.log combined
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPass /SOGo http://sogo:50000/SOGo retry=0
ProxyPass /Microsoft-Server-ActiveSync http://sogo:50000/SOGo/Microsoft-Server-ActiveSync retry=0 connectiontimeout=5 timeout=3600
ProxyPass /keycloak http://keycloak:8080/keycloak retry=0
ProxyPassReverse /keycloak http://keycloak:8080/keycloak
<Proxy http://sogo:50000/SOGo>
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "443"
RequestHeader set "x-webobjects-server-name" "127.0.0.1"
RequestHeader set "x-webobjects-server-url" "https://127.0.0.1"
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
AddDefaultCharset UTF-8
Order allow,deny
Allow from all
</Proxy>
RewriteEngine On
RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT]
# For Apple autoconfiguration
<IfModule rewrite_module>
RewriteEngine On
RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301]
RewriteRule ^/.well-known/carddav/?$ /SOGo/dav [R=301]
</IfModule>
<Directory /src/SOGo/Tests/results>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Alias /tests /src/SOGo/Tests/results
</VirtualHost>
@@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDOTCCAiGgAwIBAgIUCMtp7zGBSm27mjkmvqMww9BtkBowDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA3MjcyMjM4MTdaFw0zNDA3
MjUyMjM4MTdaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCtpzPeBvnCJJD36iaTClW1dprzqs9yMqEyLHaczOIm
VEsUG6ykWx1XpH4adAfVuVkyKgIuVWK57F4wmDq6mpyycfIbhT2r93fWkW5k10vU
c1QG6CPiQs01n0H3BqMXfbkYmJ5Re63cDawRT5aofpc2ClSk7odrL2cF0keb84qB
4b6M4D2fGEL9dkwzXeKysMqmcur6jsfAv1ojB4lie+q2UR3VIvU2OP8NQckJJ4le
O5i20gR5iX71KykgCy4J2OelU18RH3yY9AZd+m6rWokIqqvS3Izz1hTRC7TQUDql
RCWCCyLZolWs9T5K2i23lpswWX+bjtkR1NAqPy+W0WJfAgMBAAGjITAfMB0GA1Ud
DgQWBBTUzyYg3BCKqzFWJSu/iTNxknyphjANBgkqhkiG9w0BAQsFAAOCAQEAouJq
l6vdg5x/nOBRO+opqIetyc0iux/aJb4QxcMgMgH0c756+EhIFtkx6oxMf7PfNqXF
xykkjE5qRMWdtYRsR9unYX/aXJG22iHce9rbK7NgQe0UvqfTZcHCLuvjJA+Iyxnk
KPUboPoBqE9ByOhX9NnMBkmhJPe/l4pE0h8hXPEFYvTDfAYYFh6+4JAtEqF+E8ZW
UBPZLG+nM48TuPte8iWRHZyn70h2dGQ05Wzlov58ftV1AY5BAo7z3b/ZCEz3gTNe
+TcN413F1drctxjSXAd5OuqTEUOutaUwdwAbRQpOXuMDabXGQvTXMIRnHG0QLmQo
YzVEGaUAWP4MeXrvIQ==
-----END CERTIFICATE-----
@@ -1,16 +0,0 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICijCCAXICAQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx
ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAK2nM94G+cIkkPfqJpMKVbV2mvOqz3IyoTIsdpzM
4iZUSxQbrKRbHVekfhp0B9W5WTIqAi5VYrnsXjCYOrqanLJx8huFPav3d9aRbmTX
S9RzVAboI+JCzTWfQfcGoxd9uRiYnlF7rdwNrBFPlqh+lzYKVKTuh2svZwXSR5vz
ioHhvozgPZ8YQv12TDNd4rKwyqZy6vqOx8C/WiMHiWJ76rZRHdUi9TY4/w1ByQkn
iV47mLbSBHmJfvUrKSALLgnY56VTXxEffJj0Bl36bqtaiQiqq9LcjPPWFNELtNBQ
OqVEJYILItmiVaz1PkraLbeWmzBZf5uO2RHU0Co/L5bRYl8CAwEAAaAAMA0GCSqG
SIb3DQEBCwUAA4IBAQBgCABl1ViXYbRIMtZR4UA2Cd0jY5kqMq0CePWHDYOI+eUP
qcnx+sVNZN5ixDdm3Dv6g7dwu3g8FZ3oC/jS/JhTJbbVubPq21T3nv0ZIOL3rmMp
hJsWBBanVgLi3MD+UsF/2IrJYf7mOR2OEVmb4dglUJNgkcbuaTA4nF5nFS/gVZxg
id6wvGygNuoGXhWVOC1amr+xYqt6Wv/U2vA8fQ9LWL7L7/eU2ol2VurC8bEAQYRR
7O8WOk9j2njDRzE8HHKg7iSSDleMiYtAcs2HIljlTAB7mQolkYpcfyIOE1wFWG14
IhS/p2SxHfvUKvJIgauG7DkFeURRtnqEioB2JwyE
-----END CERTIFICATE REQUEST-----
@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCtpzPeBvnCJJD3
6iaTClW1dprzqs9yMqEyLHaczOImVEsUG6ykWx1XpH4adAfVuVkyKgIuVWK57F4w
mDq6mpyycfIbhT2r93fWkW5k10vUc1QG6CPiQs01n0H3BqMXfbkYmJ5Re63cDawR
T5aofpc2ClSk7odrL2cF0keb84qB4b6M4D2fGEL9dkwzXeKysMqmcur6jsfAv1oj
B4lie+q2UR3VIvU2OP8NQckJJ4leO5i20gR5iX71KykgCy4J2OelU18RH3yY9AZd
+m6rWokIqqvS3Izz1hTRC7TQUDqlRCWCCyLZolWs9T5K2i23lpswWX+bjtkR1NAq
Py+W0WJfAgMBAAECggEAETSSfFp56d/FnUqjLR5xBNxjgzur93HyFrk2Z1gaxWwZ
+ZFkYZnFe9GId7EstY2lEMX+FqkkcazBsv7iPWrkQP9D2wYwk2v0K7DtHICturb9
NFH70YcyMzCRpfAPvgbEOB5RprEiYL3aC+e0KFhNPcV4QtR/W6yuqxz9NgPDTWru
g061RKNlqkeNUp5cnOWhj2Z98SfyZEmN8eIYNW0/neGHiYzXgrpWNvlu5Y1yuZxF
ztapr4Oigl6CK7uJ0fOMRsGDdpjfAmOaXGJn2Y848VjUDvlj4HuyW2InPvDwd5t2
Do/1zqasMMPl+xa7729Sr5oWYu4IaG/sTTLGQNC2gQKBgQDoeXAQDtwxche3Bddw
WEn6ZtpbgDyeoDroZ4P9Fzyq5Rc3HJxv4WFILlYR16buJlPn7QARUD8r2/n+oTiA
CN75z5YDKoRmKbCflp2OHmSWWCd7lIzpxaOoOwtPYhOWyaR4BEfaGPjowUz0XBfr
Zp80APMOhNZKeeLUOR+Skk09VwKBgQC/Oevluv9rvELX2h09BvE63ZwHjdqW0xaz
udSGATpssOeu+9k4E0WKqbyzIhYzR0tGYDHqgdAvU5sr++q/ImhIrz4qRgBSBZs1
/1DvbarjogoSZK4lKB20vme+b329sv4TE1c+tusFmLQc+beS67MWfCtvoRzT79Lj
WVjhUWjWOQKBgQDParIykZ+iukIweRTMVunCcYw3gYYUna+RdfKMmPP3IimBcZSe
Of/bMAR5LOjyqN3KG2opCGkkj8NQjbXkfoW7a5xTvNaedGnzKaXvjGyAu6yWlWbY
mQ845V1k+YOy0LxenKsjC47h1L39dEGfNVOsSYCTHrA3iOJ6KXFjDAfARwKBgAqK
yet/VKd+2HyH5MbBhDkHkJuGAYABISZFX2cH2E23rv4hmkcSIOpVEzcY8PpgutCl
avsPrwd853gUSkvBPNiM+LNh6pCbCISAj9izRhGIlF+RN1yLCqA1Qwjnopn7rTAm
B9BIS0qisYNLbQhngBcEP2zHCAzTEuA/w7ugPlRZAoGBAK2wW8ByG3DagT2S4BPB
kR/199rdPlNDr6x/BUdceYD76+ZvUsE+mJpzyluU4ECJwNlWLQZkw4uAaRWUNGP6
wPYQH2LwXLoj9kxckHEdrC9S0uyEs7A8j60SrGGEtylLG7xS9LyGWj3ZwrycmPoA
DOKRLBQCahiob4BAfDfQjXDg
-----END PRIVATE KEY-----
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
rm -f apache-selfsigned.key apache-selfsigned.csr apache-selfsigned.crt
openssl genpkey -algorithm RSA -out apache-selfsigned.key
openssl req -new -key apache-selfsigned.key -out apache-selfsigned.csr
openssl x509 -req -days 3650 -in apache-selfsigned.csr -signkey apache-selfsigned.key -out apache-selfsigned.crt
-166
View File
@@ -1,166 +0,0 @@
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=org> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# example.org
dn: dc=example,dc=org
objectClass: dcObject
objectClass: organization
dc: example
o: example
# users, example.org
dn: ou=users,dc=example,dc=org
objectClass: organizationalUnit
ou: users
dn: ou=groups,dc=example,dc=org
objectClass: organizationalUnit
ou: groups
dn: uid=sogo,ou=users,dc=example,dc=org
uid: sogo
cn: Sogo
sn: Sogo
mail: sogo@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/sogo
dn: uid=cyrus,ou=users,dc=example,dc=org
uid: cyrus
cn: cyrus
sn: cyrus
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/cyrus
dn: uid=sogo-tests1,ou=users,dc=example,dc=org
uid: sogo-tests1
cn: Dude
sn: Love
givenName: Dude
homePhone: +1 (123) 456-7890
l: Vladivostok
telephoneNumber: +1 (120) 987-6543
mail: sogo-tests1@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/sogo-tests1
dn: uid=sogo-tests2,ou=users,dc=example,dc=org
uid: sogo-tests2
cn: Hewill
sn: Crashit
givenName: Hewill
homePhone: +1 (123) 456-7890
l: Vladivostok
telephoneNumber: +1 (120) 987-6543
mail: sogo-tests2@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/sogo-tests2
dn: uid=sogo-tests3,ou=users,dc=example,dc=org
uid: sogo-tests3
cn: Ithas
sn: Exploded
givenName: Ithas
homePhone: +1 (123) 456-7890
l: Vladivostok
telephoneNumber: +1 (120) 987-6543
mail: sogo-tests3@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/sogo-tests3
dn: uid=sogo-tests-super,ou=users,dc=example,dc=org
uid: sogo-tests-super
cn: John Doe
sn: Doe
givenName: John
homePhone: +1 (123) 456-7890
l: Vladivostok
telephoneNumber: +1 (120) 987-6543
mail: sogo-tests-super@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/sogo-tests-super
dn: uid=res,ou=users,dc=example,dc=org
uid: res
cn: resource No Overbook
sn: source
departmentNumber: 1
description: location
givenName: res
mail: res@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/res
dn: uid=res-nolimit,ou=users,dc=example,dc=org
uid: res-nolimit
cn: resource Overbook
sn: source
departmentNumber: 0
description: location
givenName: res-nolimit
mail: res-nolimit@example.org
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword:: c29nbw==
uidNumber: 1000
gidNumber: 1000
homeDirectory: /home/res-nolimit
# readers, users, example.org
dn: uid=readers,ou=users,dc=example,dc=org
objectClass: extensibleObject
objectClass: groupOfNames
cn: readers
mail: readers@example.org
member: uid=sogo-tests1,ou=users,dc=example,dc=org
member: uid=sogo-tests2,ou=users,dc=example,dc=org
member: uid=sogo-tests3,ou=users,dc=example,dc=org
# search result
search: 2
result: 0 Success
# numResponses: 14
# numEntries: 13
-8
View File
@@ -1,8 +0,0 @@
# original catatnight/postfix
FROM agiledigital/postfix:latest
ADD main.cf /etc/postfix/main.cf
ADD mailname /etc/mailname
ADD virtual /etc/postfix/virtual
ADD entrypoint.sh /entrypoint.sh
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
cp /etc/postfix/main.cf /etc/postfix/main.cf.bak
chown root:root /etc/postfix/virtual
chown root:root /etc/postfix/virtual.db
postmap /etc/postfix/virtual
/opt/install.sh
# /opt/install.sh make changes /etc/postfix/main.cf, so restore bak file
rm -f /etc/postfix/main.cf
cp /etc/postfix/main.cf.bak /etc/postfix/main.cf
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
-1
View File
@@ -1 +0,0 @@
example.org
-52
View File
@@ -1,52 +0,0 @@
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on
# fresh installs.
compatibility_level = 3.6
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = example.org
mydomain = example.org
relayhost =
mailbox_size_limit = 51200000
recipient_delimiter =
inet_interfaces = all
inet_protocols = all
maillog_file = /var/log/mail.log
myorigin = /etc/mailname
default_transport = error
relay_transport = error
mailbox_transport = lmtp:inet:imapd:24
local_recipient_maps = hash:/etc/postfix/virtual
-1
View File
@@ -1 +0,0 @@
@example.org root
-518
View File
@@ -1,518 +0,0 @@
#!/bin/bash
TESTS_RET=0
SRC_SOPE=$1
SRC_SOGO=$2
TESTS_FAILED=false
TESTS_RESULTS=()
JSON_TEST_RESULTS_PATH="/tmp/tests_results.json"
export TERM=xterm
# formatting
bold=$(tput bold)
normal=$(tput sgr0)
underline=$(tput smul)
no_underline=$(tput rmul)
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
blue=$(tput setaf 4)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
white=$(tput setaf 7)
title() {
echo "${bold}${cyan}$1${normal}"
}
subtitle() {
echo "${magenta}$1${normal}"
}
subsubtitle() {
echo "${cyan}$1${normal}"
}
texterror() {
echo "${bold}${red}$1${normal}"
}
textwarning() {
echo "${bold}${yellow}$1${normal}"
}
textsuccess() {
echo "${bold}${green}$1${normal}"
}
stepsuccess() {
echo -e "$1 ${bold}${green}✔ ${normal}${bold}$2${normal}"
}
steperror() {
echo -e "$1 ${bold}${red}𐄂 ${normal}${bold}$2${normal}"
}
in_array() {
local SEARCH_ELEMENT
SEARCH_ELEMENT="$1"
shift
local ELEMENT
for ELEMENT in "$@"; do
if [[ "$ELEMENT" == "$SEARCH_ELEMENT" ]]; then
return 0
fi
done
return 1
}
is_in_docker() {
if [ -f /.dockerenv ]; then
return 0
else
return 1
fi
}
get_latest_github_commit_hash() {
REPO="$1"
BRANCH="${2:-master}"
TOKEN="$3"
GITHUB_API_URL="https://api.github.com/repos/$REPO/commits/$BRANCH"
LATEST_COMMIT_HASH=$(curl -s -k -H "Authorization: token $TOKEN" $GITHUB_API_URL | grep '"sha"' | head -n 1 | awk '{print $2}' | tr -d '",')
echo "$LATEST_COMMIT_HASH"
}
build_system_header() {
echo "${white} "
echo "${white} "
echo "${white} "
echo "${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} "
echo "${white} ${bold}${green}BUILD SYSTEM${normal} "
echo "${white} "
echo ""
}
check_exit_code() {
local EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
return $EXIT_CODE
fi
}
function prep_tests {
# install node modules
cd "$SRC_SOGO/Tests" && \
npm config set loglevel=error && \
npm install > /dev/null
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nError installing node modules"
error_out
fi
# fixup the tests configuration
cd "$SRC_SOGO/Tests/lib" && \
cat >config.js <<EOF
export default {
hostname: "httpd",
port: "81",
username: "sogo-tests1",
password: "sogo",
superuser: "sogo-tests-super",
superuser_password: "sogo",
subscriber_username: "sogo-tests2",
subscriber_password: "sogo",
attendee1: "sogo-tests2@example.org",
attendee1_username: "sogo-tests2",
attendee1_password: "sogo",
attendee1_delegate: "sogo-tests3@example.org",
attendee1_delegate_username: "sogo-tests3",
attendee1_delegate_password: "sogo",
resource_no_overbook: "res",
resource_can_overbook: "res-nolimit",
white_listed_attendee: {
"sogo-tests1": "John Doe <sogo-tests1@example.org>"
},
mailserver: "dovecot",
testput_nbrdays: 30,
sieve_server: "dovecot",
sieve_port: 4190,
sogo_user: "sogo",
sogo_tool_path: "/usr/sbin/sogo-tool",
webCalendarURL: "http://httpd/CanadaHolidays.ics",
timeout: 600000
}
EOF
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nError creating config.js"
error_out
fi
sleep 1
}
function prep_tests_mysql {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-mysql-ldap.conf /etc/sogo/sogo.conf
TMP_FILE=$(mktemp)
chmod 600 $TMP_FILE
cat <<EOF > $TMP_FILE
[client]
user = sogobuild
password = sogo123
host = mariadb
EOF
# drop the mysql database and recreate it
echo "drop database sogo_integration_tests;" | mysql --defaults-extra-file=$TMP_FILE -h mariadb
echo "create database sogo_integration_tests charset=utf8;" | mysql --defaults-extra-file=$TMP_FILE -h mariadb
rm $TMP_FILE
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nError recreating MySQL database"
error_out
fi
}
function prep_tests_postgresql {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-postgresql-ldap.conf /etc/sogo/sogo.conf
# drop the postgresql database and recreate it
# the env var is unsafe, i know... just easier and non sensitive anyway
PGPASSWORD=sogo123 dropdb -U sogobuild -h postgres sogo_integration_tests
PGPASSWORD=sogo123 createdb -O sogobuild -U sogobuild -h postgres sogo_integration_tests
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nError recreating postgresql database"
error_out
fi
}
function prep_tests_mysql_auth {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-mysql.conf /etc/sogo/sogo.conf
}
function prep_tests_postgresql_auth {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-postgresql.conf /etc/sogo/sogo.conf
}
function prep_tests_mysql_combined {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-mysql-ldap-combined.conf /etc/sogo/sogo.conf
}
function prep_tests_mysql_auth_combined {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-mysql-combined.conf /etc/sogo/sogo.conf
}
function prep_tests_postgresql_combined {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-postgresql-ldap-combined.conf /etc/sogo/sogo.conf
}
function prep_tests_postgresql_auth_combined {
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-tests-postgresql-combined.conf /etc/sogo/sogo.conf
}
function error_out {
set +x
echo -e "$MSG"
exit 1
}
function check_tests {
FAIL=$(cat /tmp/out.log | grep -m 1 -Eo "([0-9]+)\s+failure" | cut -d' ' -f 1)
TOTAL=$(cat /tmp/out.log | grep -m 1 -Eo "([0-9]+)\s+spec" | cut -d' ' -f 1)
NOT_EXECUTED=$(cat /tmp/out.log | grep -m 1 -Eo "([0-9]+)\s+pending" | cut -d' ' -f 1)
# If test fail
if [ $FAIL -gt 0 ]
then
TESTS_RET=1
fi
# Console
echo -e "\033[1mTests results for $1\033[0m" >> "$SRC_SOGO/Tests/results/tests_results.txt"
echo -e "Total : $TOTAL" >> "$SRC_SOGO/Tests/results/tests_results.txt"
if [ $FAIL -gt 0 ]
then
echo -e "\033[0;31mFailed : $FAIL\033[0m" >> "$SRC_SOGO/Tests/results/tests_results.txt"
else
echo -e "Failed : $FAIL" >> "$SRC_SOGO/Tests/results/tests_results.txt"
fi
echo -e "Not executed : $NOT_EXECUTED" >> "$SRC_SOGO/Tests/results/tests_results.txt"
if [ $FAIL -gt 0 ]
then
echo -e "\033[0;31mTests failed\033[0m" >> "$SRC_SOGO/Tests/results/tests_results.txt"
else
echo -e "\033[0;36mTests success\033[0m" >> "$SRC_SOGO/Tests/results/tests_results.txt"
fi
echo "" >> "$SRC_SOGO/Tests/results/tests_results.txt"
# HTML
echo "<table style=\"margin-bottom: 10px;\"><tbody><tr><td colspan=\"3\" style=\"background-color: aquamarine;\"><strong>$1</strong></td></tr><tr>" >> "$SRC_SOGO/Tests/results/index.html"
echo "<td>Total</td><td>Failed</td><td>Not executed</td></tr><tr>" >> "$SRC_SOGO/Tests/results/index.html"
if [ $FAIL -gt 0 ]
then
echo "<td>$TOTAL</td><td style=\"color: red;\">$FAIL</td><td>$NOT_EXECUTED</td>" >> "$SRC_SOGO/Tests/results/index.html"
echo "</tr><tr><td colspan=\"3\" style=\"color: red;\"><strong>Tests failed</strong></td>" >> "$SRC_SOGO/Tests/results/index.html"
else
echo "<td>$TOTAL</td><td>$FAIL</td><td>$NOT_EXECUTED</td>" >> "$SRC_SOGO/Tests/results/index.html"
echo "</tr><tr><td colspan=\"3\" style=\"color: #170;\"><strong>Tests success</strong></td>" >> "$SRC_SOGO/Tests/results/index.html"
fi
echo "</tr><tr><td colspan=\"3\"><a href=\"$2.html\" target=\"_blank\">View test report</a></td>" >> "$SRC_SOGO/Tests/results/index.html"
echo "</tr></tbody></table>" >> "$SRC_SOGO/Tests/results/index.html"
if [ $TESTS_RET -eq 1 ]
then
echo -e "\033[0;31mFailed\033[0m"
return 131
else
echo -e "\033[0;36mSuccess\033[0m"
fi
}
function run_tests {
RET=0
USE_PKILL=$3
# create empty logfile
cat /dev/null >/tmp/out.log
if [ "$USE_PKILL" -eq 1 ]; then
pkill -9 sogod
else
service sogod stop
fi
# Kill residual SOGo process
LSOF_OUT=$(lsof -i TCP@127.0.0.1 -Fp | tr -d p)
if [ ! -z "$LSOF_OUT" ]; then
kill -9 $LSOF_OUT
fi
# restart services
if [ "$USE_PKILL" -eq 1 ]; then
su -s /bin/bash -c "/usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log" sogo
else
service sogod start
fi
# wait for it to settle
sleep 3
# run the tests and gather output
cd "$SRC_SOGO/Tests"
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nCan't cd into the Tests folder..."
error_out
fi
npm run test-junit 2>&1 | tee -a /tmp/out.log
RC=$?
GRC=$(($GRC+$RC))
if [ $RC -ne 0 ]; then
MSG="$MSG\nError running the integration tests"
error_out
fi
# source GNUstep.sh
# set +x
#. /usr/share/GNUstep/Makefiles/GNUstep.sh
# set -x
# teststrings
# run only once, no point in running with all the backend
# substitutions
# if [[ -z ${TEST_RUN_COUNT} || ${TEST_RUN_COUNT} -lt 1 ]]; then
# cd Integration
# ./teststrings.sh 2>&1 | tee -a /tmp/out.log
# fi
# stop sogo when we're done
if [ "$USE_PKILL" -eq 1 ]; then
pkill -9 sogod
else
service sogod stop
fi
XML_FILE="$SRC_SOGO/Tests/results/$2"
mv /tmp/results.xml "$XML_FILE"
check_tests "$1" "$2"
# Generate JSON
TOTAL_TESTS=$(xmllint --xpath 'sum(//testsuite/@tests)' "$XML_FILE")
TOTAL_FAILURES=$(xmllint --xpath 'sum(//testsuite/@failures)' "$XML_FILE")
TOTAL_ERRORS=$(xmllint --xpath 'sum(//testsuite/@errors)' "$XML_FILE")
TOTAL_FAILED=$(($TOTAL_FAILURES + $TOTAL_ERRORS))
TOTAL_SUCCESS=$(($TOTAL_TESTS - $TOTAL_FAILED))
if [ "$TOTAL_FAILED" -gt 0 ]; then
FAILED=true
TESTS_FAILED=true
else
FAILED=false
fi
JSON_DATA=$(jq -n \
--argjson total_tests "$TOTAL_TESTS" \
--argjson total_failed "$TOTAL_FAILED" \
--argjson total_success "$TOTAL_SUCCESS" \
--arg description "$1" \
--arg scenario "$2" \
--argjson failed "$FAILED" \
'{scenario: $scenario, description: $description, total_tests: $total_tests, total_failed: $total_failed, total_success: $total_success, failed: $failed}')
TESTS_RESULTS+=("$JSON_DATA")
}
test() {
#set -x
USE_PKILL=${1:-0}
TESTS_FAILED=false
TESTS_RESULTS=()
rm -f "$JSON_TEST_RESULTS_PATH"
if [ "${SKIP_TESTS:-0}" -eq 1 ]; then
subsubtitle "Skipping tests"
return 0;
fi
# INTEGRATION TESTS
if [[ -d "$SRC_SOGO/Tests/results" ]]; then
rm -Rf "$SRC_SOGO/Tests/results"
fi
mkdir -p "$SRC_SOGO/Tests/results"
echo "" > "$SRC_SOGO/Tests/results/tests_results.txt"
echo "<html><head><style>table, th, td {border: 1px solid darkgrey;border-collapse: collapse; width: 400px; font-family: monospace;}</style></head><body>" > "$SRC_SOGO/Tests/results/index.html"
test_title_color="${bold}${yellow}"
# MySQL
echo "${test_title_color}Running tests with LDAP auth and MySQL backend${normal}"
prep_tests
prep_tests_mysql
run_tests "Running tests with LDAP auth and MySQL backend" "results-mysql-ldap.xml" $USE_PKILL
echo "${test_title_color}Running tests with MySQL auth and MySQL backend${normal}"
prep_tests
prep_tests_mysql
prep_tests_mysql_auth
run_tests "Running tests with MySQL auth and MySQL backend" "results-mysql.xml" $USE_PKILL
echo "${test_title_color}Running tests with LDAP auth and MySQL backend, combined database tables${normal}"
prep_tests
prep_tests_mysql
prep_tests_mysql_combined
run_tests "Running tests with LDAP auth and MySQL backend, combined database tables" "results-mysql-ldap-combined.xml" $USE_PKILL
echo "${test_title_color}Running tests with MySQL auth and MySQL backend, combined database tables${normal}"
prep_tests
prep_tests_mysql
prep_tests_mysql_auth_combined
run_tests "Running tests with MySQL auth and MySQL backend, combined database tables" "results-mysql-combined.xml" $USE_PKILL
# PGSQL
echo "${test_title_color}Running tests with LDAP auth and postgresql backend${normal}"
prep_tests
prep_tests_postgresql
run_tests "Running tests with LDAP auth and postgresql backend" "results-postgresql-ldap.xml" $USE_PKILL
echo "${test_title_color}Running tests with postgresql auth and postgresql backend${normal}"
prep_tests
prep_tests_postgresql
prep_tests_postgresql_auth
run_tests "Running tests with postgresql auth and postgresql backend" "results-postgresql.xml" $USE_PKILL
echo "${test_title_color}Running tests with LDAP auth and postgresql backend, combined database tables${normal}"
prep_tests
prep_tests_postgresql
prep_tests_postgresql_combined
run_tests "Running tests with LDAP auth and postgresql backend, combined database tables" "results-postgresql-ldap-combined.xml" $USE_PKILL
echo "${test_title_color}Running tests with postgresql auth and postgresql backend, combined database tables${normal}"
prep_tests
prep_tests_postgresql
prep_tests_postgresql_auth_combined
run_tests "Running tests with postgresql auth and postgresql backend, combined database tables" "results-postgresql-combined.xml" $USE_PKILL
# set -x
# JUnit
for file in $SRC_SOGO/Tests/results/*.xml #$xmlfiles
do
xunit-viewer -r $file -c -o "$file.html"
done
cat "$SRC_SOGO/Tests/results/tests_results.txt"
echo "</body>" >> "$SRC_SOGO/Tests/results/index.html"
chown 644 -R "$SRC_SOGO/Tests/results"
chown -R www-data:www-data "$SRC_SOGO/Tests/results"
# Restore conf
rm /etc/sogo/sogo.conf
cp /etc/sogo/sogo-base.conf /etc/sogo/sogo.conf
if [ "$USE_PKILL" -eq 1 ]; then
pkill -9 sogod
su -s /bin/bash -c "/usr/sbin/sogod -WOWorkersCount 3 -WOPidFile /var/run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log" sogo
else
service sogod restart > /dev/null
fi
# Global json results
TESTS_RESULTS_JSON=$(printf '%s\n' "${TESTS_RESULTS[@]}" | jq -s .)
FINAL_JSON=$(jq -n \
--argjson tests_failed "$TESTS_FAILED" \
--argjson tests "$TESTS_RESULTS_JSON" \
'{failed: $tests_failed, tests: $tests}')
echo "$FINAL_JSON" > $JSON_TEST_RESULTS_PATH
result_link="${bold}${magenta}--------------------------------------------------\nTests results : https://127.0.0.1/tests/index.html${normal}"
# If test fail
if [ $TESTS_RET -eq 1 ]
then
echo -e "$result_link [${bold}${red}Failed${normal}]\n"
return 131
else
echo -e "$result_link [${bold}${green}Success${normal}]\n"
return 0
fi
}
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
cd ${WORKSPACE} \
./configure --enable-debug --disable-strip --enable-mfa \
make \
make install \
echo "register sogo library" \
echo "/usr/local/lib/sogo" > /etc/ld.so.conf.d/sogo.conf \
ldconfig \
echo "create directories and enforce permissions" \
install -o sogo -g sogo -m 755 -d /var/run/sogo \
install -o sogo -g sogo -m 750 -d /var/spool/sogo \
install -o sogo -g sogo -m 750 -d /var/log/sogo
su -s /bin/bash - sogo -c "echo \"set debuginfod enabled off\" >> ~/.gdbinit"
-147
View File
@@ -1,147 +0,0 @@
#!/bin/bash
SRC_SOPE=/src/SOPE/
SRC_SOGO=/src/SOGo/
source /include/common.sh $SRC_SOPE $SRC_SOGO
options="h:b:ba:br:d"
long_options="help,build,build-all,build-resources,debug"
parsed_options=$(getopt -o $options -l $long_options)
# Check for errors in parsing
if [ $? -ne 0 ]; then
exit 1
fi
# Evaluate the parsed options
#eval set -- "$parsed_options"
help() {
echo "${green} ----------------------"
echo "| ${bold}SOGo Dev env${normal}${green} |"
echo " ----------------------"
echo
echo "${normal}Options are :${cyan}"
echo -e "-h, --help\t\tShow help"
echo -e "-b, --build\t\tBuild sogo app"
echo -e "-ba, --build-all\tClean, build sogo and sope"
echo -e "-br, --build-resources\tBuild only sogo JS/CSS resources"
echo -e "-d, --debug\t\tStart sogo in debug with gdb"
echo "${normal}"
}
ssl_fix() {
if [[ -z "${LD_PRELOAD}" ]]; then
LIBSSL_LOCATION=$(find / -type f -name "libssl.so.*" -print -quit);echo "LD_PRELOAD=$LIBSSL_LOCATION" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo
export LD_PRELOAD=$LIBSSL_LOCATION
else
echo "LD_PRELOAD=$LD_PRELOAD" >> /etc/default/sogo
echo "LD_LIBRARY_PATH=/usr/local/lib/sogo:/usr/local/lib:$LD_LIBRARY_PATH" >> /etc/default/sogo
export LD_PRELOAD=$LD_PRELOAD
fi
}
build_resources() {
cd $SRC_SOGO
npm config set loglevel=error
git config --global --add safe.directory '*'
cd UI/WebServerResources
make dev
make install
}
build_sogo() {
service sogod stop
ssl_fix
cd $SRC_SOGO
cd ActiveSync
make && make install
cd ..
./configure --enable-saml2 --enable-debug --disable-strip --enable-mfa
make
make install
build_resources
RC=$?
if [ $RC -ne 0 ]; then
exit $RC
fi
if [ -z "$1" ]
then
service sogod start
fi
}
build_all() {
service sogod stop
cd $SRC_SOPE
make clean
./configure --with-gnustep --enable-debug --disable-strip
make
make install
cd $SRC_SOGO
cd ActiveSync
make clean
cd ..
make clean
build_sogo
RC=$?
if [ $RC -ne 0 ]; then
exit $RC
fi
}
debug() {
build_sogo "norestart"
echo "${magenta}================"
echo "GDB reminders :"
echo " * run : Run app (set breakpoints before)"
echo " * break SOGo.m:494 : Add breakpoint example"
echo " * c : continue"
echo " * n : next"
echo " * list 504 : show lines around"
echo " * p var : print variable 'var'"
echo " * po var : print object 'var'"
echo " * bt : Show stacktrace"
echo " * bt full : Show stacktrace with all vars"
echo "================${normal}"
echo ""
su -s /bin/bash - sogo -c "gdb --args /usr/local/sbin/sogod -WOUseWatchDog NO -WONoDetach YES -WOPort 0.0.0.0:50000 -WOWorkersCount 1 -WOPidFile /var/run/sogo/sogo.pid"
}
# Process the options
while true; do
case "$1" in
-b|--build)
build_sogo
exit 0
;;
-ba|--build-all)
build_all
exit 0
;;
-br|--build-resources)
build_resources
exit 0
;;
-d|--debug)
debug
exit 0
;;
-h|--help)
help
exit 0
;;
--)
shift
break
;;
*)
help
exit 1
;;
esac
done
-53
View File
@@ -1,53 +0,0 @@
#!/bin/bash
bold=$(tput bold)
normal=$(tput sgr0)
green=$(tput setaf 2)
white=$(tput setaf 7)
magenta=$(tput setaf 5)
cyan=$(tput setaf 6)
underline=$(tput smul)
no_underline=$(tput rmul)
cd /src/SOGo
echo "${white} "
echo "${white} "
echo "${white} "
echo "${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} ${green}▒▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒▒${white} "
echo "${white} ${green}▒▒${white} ${green}▒▒${white} "
echo "${white} ${green}▒▒▒▒${white} ${green}▒▒▒▒${white} "
echo "${white} ${green}▒▒▒▒▒▒▒▒▒▒${white} "
echo "${white} "
echo "${white} ${bold}${green}DEVELOPER${normal} "
echo "${white} "
echo "${bold}${magenta}Access : https://127.0.0.1/SOGo/${normal}"
echo "${bold}${cyan}Use ${underline}devenv${no_underline} command to start${normal}"
echo ""
HAS_OLD_SOGO_INSTANCE=$(find /usr/local/lib/sogo/ -type f -name libSOGoUI.so.* | wc -l)
if [ "$HAS_OLD_SOGO_INSTANCE" -gt 1 ]; then
echo "${bold}${red}/!\ You have an instable dev environment (two sogo libraries versions). This can be caused by a disynchronized SOGo code source (docker and local environment) This can be fixed by updating your local git repositories, delete and rebuild docker compose. You can also run devenv -ba.${normal}"
fi
/etc/init.d/sogod restart
# Run for ever
tail -f /dev/null
-107
View File
@@ -1,107 +0,0 @@
{
/* ********************* Main SOGo configuration file **********************
* *
* Since the content of this file is a dictionary in OpenStep plist format, *
* the curly braces enclosing the body of the configuration are mandatory. *
* See the Installation Guide for details on the format. *
* *
* C and C++ style comments are supported. *
* *
* This example configuration contains only a subset of all available *
* configuration parameters. Please see the installation guide more details. *
* *
* ~sogo/GNUstep/Defaults/.GNUstepDefaults has precedence over this file, *
* make sure to move it away to avoid unwanted parameter overrides. *
* *
* **************************************************************************/
/* Database configuration (mysql://, postgresql:// or oracle://) */
WOPort = "0.0.0.0:50000";
// MySQL
SOGoProfileURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_user_profile";
OCSFolderInfoURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_folder_info";
OCSSessionsFolderURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_sessions_folder";
OCSEMailAlarmsFolderURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_alarms_folder";
OCSCacheFolderURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_cache_folder";
OCSStoreURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_store";
OCSAclURL = "mysql://sogobuild:sogo123@mariadb:3306/sogo/sogo_acl";
//Password
SOGoPasswordChangeEnabled = YES;
SOGoPasswordRecoveryEnabled = YES;
SOGoFirstWeekOfYear = "January1";
WOWorkersCount = 10;
WOWatchDogRequestTimeout = 5;
WOListenQueueSize = 15;
SOGoUserSources = (
{
CNFieldName = cn;
IDFieldName = uid;
UIDFieldName = uid;
baseDN = "ou=users,dc=example,dc=org";
bindDN = "cn=admin,dc=example,dc=org";
bindPassword = "password";
canAuthenticate = YES;
displayName = "Shared Addresses";
hostname = "openldap";
id = public;
isAddressBook = YES;
port = 389;
KindFieldName = description;
MultipleBookingsFieldName="departmentNumber";
}
);
SOGoDisableSharing = ();
SOGoDisableExport = ();
SOGoDisableSharingAnyAuthUser = ();
//Identities
SOGoMailAuxiliaryUserAccountsEnabled = YES;
SOGoPageTitle = NewName;
SOGoSieveScriptsEnabled = YES;
SOGoForwardEnabled = YES;
SOGoNotificationEnabled = YES;
SOGoVacationEnabled = YES;
SOGoEnableEMailAlarms = YES;
SOGoEnablePublicAccess = YES;
SOGoTimeZone = Europe/Paris;
SOGoIMAPServer = "imapd:143";
NGImap4AuthMechanism = "plain";
SOGoSieveServer = "sieve://imapd:4190";
SOGoMailingMechanism = smtp;
SOGoSMTPServer = "smtpd";
SOGoCalendarDefaultRoles = ("PublicDAndTViewer");
SOGoAppointmentSendEMailNotifications = YES;
SOGoMailDomain = "example.org";
SOGoLanguage = "English";
SOGoSuperUsernames = ("sogo-tests-super");
SOGoCalendarDefaultRoles = ("PublicDAndTViewer");
SOGoMemcachedHost = "memcached";
SOGoXSRFValidationEnabled = NO;
NGImap4ConnectionStringSeparator = "/";
/* Debug */
SoDebugBaseURL = YES;
SOGoDebugRequests = YES;
ImapDebugEnabled = YES;
LDAPDebugEnabled = YES;
PGDebugEnabled = YES;
SMTPDebugEnabled = YES;
MySQL4DebugEnabled = YES;
SOGoUIxDebugEnabled = YES;
WOLogFile = /var/log/sogo/sogo.log;
SOGoDebugLeaks = YES;
}
-15
View File
@@ -1,15 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "sogo",
"dockerComposeFile": "docker-compose.yml",
"service": "sogo",
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker"
]
}
}
}
-108
View File
@@ -1,108 +0,0 @@
services:
memcached:
image: memcached:1.6
container_name: sogo_memcached
restart: unless-stopped
httpd:
build:
context: ./conf/httpd/
dockerfile: Dockerfile
container_name: sogo_httpd
restart: unless-stopped
depends_on:
- sogo
ports:
- 80:80
- 443:443
volumes:
- ./conf/httpd/ssl:/ssl
- ./conf/httpd/CanadaHolidays.ics:/usr/local/apache2/htdocs/CanadaHolidays.ics
- sogo-static-files:/usr/local/lib/GNUstep
mariadb:
image: mariadb:11
container_name: sogo_mariadb
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: db
ports:
- 3307:3306
volumes:
- sogo-mariadb:/var/lib/mysql
- ./conf/db/mysql.sql:/docker-entrypoint-initdb.d/init-sogo.sql
openldap:
image: bitnami/openldap:2.5
container_name: sogo_openldap
restart: unless-stopped
ports:
- "389:389"
environment:
LDAP_PORT_NUMBER: 389
LDAP_ADMIN_USERNAME: "admin"
LDAP_ADMIN_PASSWORD: "password"
LDAP_BIND_PASSWORD: "password"
LDAP_ROOT: "dc=example,dc=org"
LDAP_ADMIN_DN: "cn=admin,dc=example,dc=org"
LDAP_CUSTOM_LDIF_DIR: "/ldifs"
#BITNAMI_DEBUG: true
volumes:
- ./conf/ldap/users.ldif:/ldifs/users.ldif # User data
imapd: # Dovecot
build:
context: ./conf/dovecot/
dockerfile: Dockerfile
container_name: sogo_dovecot
restart: unless-stopped
depends_on:
- openldap
ports:
- "143:143"
- "993:993"
- "4190:4190"
- "24:24"
volumes:
- sogo-mail-data:/var/mail
- sogo-sieve-data:/var/sieve
smtpd: # Postfix
build:
context: ./conf/postfix/
dockerfile: Dockerfile
container_name: sogo_postfix
restart: unless-stopped
ports:
- "25:25"
depends_on:
- imapd
- openldap
entrypoint: /entrypoint.sh
sogo:
container_name: sogo_dev
restart: unless-stopped
tty: true
build:
context: ../
dockerfile: .devcontainer/Dockerfile.devcontainer
ports:
- 50000:50000
cap_add:
- SYS_PTRACE
- NET_ADMIN
- NET_RAW
depends_on:
- openldap
- memcached
- mariadb
- imapd
- smtpd
volumes:
- ..:/workspace
- sogo-static-files:/usr/local/lib/GNUstep
- ./conf/sogo/sogo.conf:/etc/sogo/sogo.conf
# - /path/to/sope_folder:/src/SOPE # Uncomment this line if you want to mount SOPE source code
volumes:
sogo-mariadb:
sogo-postgres:
sogo-mail-data:
sogo-sieve-data:
sogo-static-files:
-74
View File
@@ -1,74 +0,0 @@
## Dev Container
The SOGo dev container will deploy a complete environnement to work and test with SOGo
This environnement contains:
- a mariadb database
- an imap server (dovecot) and a smtp server (postfix)
- a ldap server for the user source
- an Apache server
- The SOGo instance
## How to use the devcontainer
Simply clone the source code of the SOGo repo and open id with Visual Code Studio. If this is not already the case, you will need the [Dev Container Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Then, simply execute the command "New Dev COntainer" and VCS will start building it.
When it's all build, go to http://127.0.0.1/SOGo. You have 3 users to login with:
`sogo-tests1`, `sogo-tests2`, `sogo-tests3` with all the same password `sogo`
You can only send mail and receive mail among those three users.
**If you have troubles, you may need to build sogo once, see the next section for that.**
## How to work on SOGo
### To modify the source and build
After modifyng the source in VCS, in your container's terminalthere is a command tool `devenv` with following options for building:
```
-b, --build Build sogo app
-ba, --build-all Clean, build sogo and sope
-br, --build-resources Build only sogo JS/CSS resources
```
To build sogo simplye does
```shell
sudo devenv -b
```
- The options -br will only build the front
- The options -ba will also build [SOPE](https://github.com/Alinto/sope) (low-level of SOGo, needs to be build before SOGo)
### To use the debugger
Inside the sogo container there is a tool to launch SOGo with the [debugger gdb](https://sourceware.org/gdb/).
Use one of the following command:
```shell
sudo devenv -d
sudo devenv --debug
```
### To change sogo.conf
The sogo.conf is linked to the one here [.devcontainer/conf/sogo/sogo.conf](conf/sogo/sogo.conf)
Modify it as you wish then you need to restart the sogo service inside the container:
```shell
service sogod restart
```
### To modify SOPE
Sometimes, you may have to change SOPE source code. In order to do that:
- First, clone the SOPE repo locally.
- Uncomment line 101 of the docker-compose.yml file and put the correct path to your SOPE folder. It should end with 'sope' like this: `/home/myuser/github/sope`
- Then, you have to rebuild your devcontainer.
- Now you can modify the source of SOPE and build it by going inside the sogo_dev container and do.
```shell
sudo devenv -ba
```
-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://bugs.sogo.nu/).
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/alinto/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/alinto/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/alinto/sogo/master/UI/Templates/SOGoACLEnglishAdditionAdvisory.wox)
* [UI/Templates/SOGoACLEnglishRemovalAdvisory.wox](https://raw.githubusercontent.com/alinto/sogo/master/UI/Templates/SOGoACLEnglishRemovalAdvisory.wox)
* [UI/Templates/SOGoACLEnglishModificationAdvisory.wox](https://raw.githubusercontent.com/alinto/sogo/master/UI/Templates/SOGoACLEnglishModificationAdvisory.wox)
* [UI/Templates/SOGoFolderEnglishAdditionAdvisory.wox](https://raw.githubusercontent.com/alinto/sogo/master/UI/Templates/SOGoFolderEnglishAdditionAdvisory.wox)
* [UI/Templates/SOGoFolderEnglishRemovalAdvisory.wox](https://raw.githubusercontent.com/alinto/sogo/master/UI/Templates/SOGoFolderEnglishRemovalAdvisory.wox)
* [SoObjects/Mailer/SOGoMailEnglishForward.wo/SOGoMailEnglishForward.html](https://raw.githubusercontent.com/alinto/sogo/master/SoObjects/Mailer/SOGoMailEnglishForward.wo/SOGoMailEnglishForward.html)
* [SoObjects/Mailer/SOGoMailEnglishReply.wo/SOGoMailEnglishReply.html](https://raw.githubusercontent.com/alinto/sogo/master/SoObjects/Mailer/SOGoMailEnglishReply.wo/SOGoMailEnglishReply.html)
The third type is the locale file formatted as a **plist**. Duplicate the English locale. Beware that words with other characters than [a-zA-Z] (accents, non-latin...) must be between double quotes ("). You can look at other files as arabic or french to have an example:
* [UI/MainUI/English.lproj/Locale](https://raw.githubusercontent.com/alinto/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://bugs.sogo.nu) 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 -55
View File
@@ -1,60 +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
Documentation/*.html
*._*
*/*/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
# Tests
Tests/node_modules
Tests/lib/config.js
Tests/results.xml
Tests/results
# SAML2 autogenerated files
SoObjects/SOGo/SOGoSAML2Exceptions.*
node_modules
*.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
+341 -47
View File
@@ -1,60 +1,354 @@
[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, gl_ES: Galician
[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.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.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.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.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.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.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.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.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.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.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.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 -1
View File
@@ -34,7 +34,7 @@ ActiveSync_RESOURCE_FILES += \
ADDITIONAL_OBJCFLAGS += -Wno-deprecated-declarations
ADDITIONAL_INCLUDE_DIRS += -I../SOPE/ -I../SoObjects/
ADDITIONAL_LIB_DIRS += -L../SOPE/GDLContentStore/obj/ -L../SOPE/NGCards/obj/
ADDITIONAL_INCLUDE_DIRS += $(shell pkg-config --cflags libwbxml2)
ADDITIONAL_INCLUDE_DIRS += -I/usr/include/libwbxml-1.0/
ADDITIONAL_LDFLAGS += -Wl,--no-as-needed -lwbxml2
-include GNUmakefile.preamble
+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
+22 -147
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>
@@ -42,11 +46,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "NSDate+ActiveSync.h"
#include "NSString+ActiveSync.h"
#import <NGObjWeb/WOContext+SoObjects.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
@implementation NGVCard (ActiveSync)
//
@@ -83,8 +82,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 +97,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 +137,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 +147,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 +180,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 +211,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,48 +231,9 @@ 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]))
{
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>",
[[o dateByAddingYears: 0 months: 0 days: 0
hours: -12 minutes: 0
seconds: 0]
activeSyncRepresentationInContext: context]];
}
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>", [o activeSyncRepresentationInContext: context]];
if ((o = [self note]))
{
@@ -313,11 +260,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 +391,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 +431,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
+98 -32
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>
@@ -43,6 +46,99 @@ static NSArray *easCommandParameters = nil;
@implementation NSString (ActiveSync)
//
// This is a copy from NSString+XMLEscaping.m from SOPE.
// The difference here is that we use wchar_t instead of unichar.
// This is needed to get the rigth numeric character reference.
// e.g. SMILING FACE WITH OPEN MOUTH
// ok: wchar_t -> &#128515; wrong: unichar -> &#55357; &#56835;
//
// We avoir naming it like the one in SOPE since if the ActiveSync
// bundle is loaded, it'll overwrite the one provided by SOPE.
//
- (NSString *) _stringByEscapingXMLStringUsingCharacters {
register unsigned i, len, j;
register wchar_t *buf;
const wchar_t *chars;
unsigned escapeCount;
if ([self length] == 0) return @"";
NSData *data = [self dataUsingEncoding:NSUTF32StringEncoding];
chars = [data bytes];
len = [data length]/4;
/* check for characters to escape ... */
for (i = 0, escapeCount = 0; i < len; i++) {
switch (chars[i]) {
case '&': case '"': case '<': case '>': case '\r':
escapeCount++;
break;
default:
if (chars[i] < 0x20 || chars[i] > 127)
escapeCount++;
break;
}
}
if (escapeCount == 0 ) {
/* nothing to escape ... */
return [[self copy] autorelease];
}
buf = calloc((len + 5) + (escapeCount * 16), sizeof(wchar_t));
for (i = 0, j = 0; i < len; i++) {
switch (chars[i]) {
/* escape special chars */
case '\r':
buf[j] = '&'; j++; buf[j] = '#'; j++; buf[j] = '1'; j++;
buf[j] = '3'; j++; buf[j] = ';'; j++;
break;
case '&':
buf[j] = '&'; j++; buf[j] = 'a'; j++; buf[j] = 'm'; j++;
buf[j] = 'p'; j++; buf[j] = ';'; j++;
break;
case '"':
buf[j] = '&'; j++; buf[j] = 'q'; j++; buf[j] = 'u'; j++;
buf[j] = 'o'; j++; buf[j] = 't'; j++; buf[j] = ';'; j++;
break;
case '<':
buf[j] = '&'; j++; buf[j] = 'l'; j++; buf[j] = 't'; j++;
buf[j] = ';'; j++;
break;
case '>':
buf[j] = '&'; j++; buf[j] = 'g'; j++; buf[j] = 't'; j++;
buf[j] = ';'; j++;
break;
default:
/* escape big chars */
if (chars[i] > 127) {
unsigned char nbuf[32];
unsigned int k;
sprintf((char *)nbuf, "&#%i;", (int)chars[i]);
for (k = 0; nbuf[k] != '\0'; k++) {
buf[j] = nbuf[k];
j++;
}
}
else if (chars[i] == 0x9 || chars[i] == 0xA || chars[i] == 0xD || chars[i] >= 0x20) { // ignore any unsupported control character
/* nothing to escape */
buf[j] = chars[i];
j++;
}
break;
}
}
self = [[NSString alloc] initWithBytesNoCopy: buf
length: (j*sizeof(wchar_t))
encoding: NSUTF32StringEncoding
freeWhenDone: YES];
return [self autorelease];
}
- (NSString *) sanitizedServerIdWithType: (SOGoMicrosoftActiveSyncFolderType) folderType
{
if (folderType == ActiveSyncEventFolder)
@@ -62,7 +158,7 @@ static NSArray *easCommandParameters = nil;
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
return [self safeStringByEscapingXMLString: YES];
return [self _stringByEscapingXMLStringUsingCharacters];
}
- (int) activeSyncFolderType
@@ -135,31 +231,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 +271,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 +300,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 -4
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"
@@ -38,8 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@class NSURL;
@class NSNumber;
static volatile BOOL easShouldTerminate = NO;
@interface SOGoActiveSyncDispatcher : NSObject
{
NSURL *folderTableURL;
@@ -47,6 +44,7 @@ static volatile BOOL easShouldTerminate = NO;
id context;
NSNumber *syncRequest;
BOOL debugOn;
}
@@ -64,6 +62,5 @@ static volatile BOOL easShouldTerminate = NO;
- (NSURL *) folderTableURL;
- (void) ensureFolderTableExists;
- (BOOL) easShouldTerminate;
@end
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
+81 -612
View File
@@ -29,45 +29,39 @@ 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 +70,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 +162,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 +244,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 +333,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 +380,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 +423,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 +432,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"];
}
}
}
@@ -568,7 +484,7 @@ struct GlobalObjectId {
{
encoding = [[theParts objectAtIndex: i ] objectForKey: @"encoding"];
charset = [[[theParts objectAtIndex: i ] objectForKey: @"parameterList"] objectForKey: @"charset"];
if (encoding && ([encoding caseInsensitiveCompare: @"7bit"] == NSOrderedSame || [encoding caseInsensitiveCompare: @"8bit"] == NSOrderedSame) &&
if (encoding && [encoding caseInsensitiveCompare: @"8bit"] == NSOrderedSame &&
charset && ![charset caseInsensitiveCompare: @"utf-8"] == NSOrderedSame
&& ![charset caseInsensitiveCompare: @"us-ascii"] == NSOrderedSame)
{
@@ -582,91 +498,6 @@ struct GlobalObjectId {
return NO;
}
- (BOOL) _isSigned: (NSDictionary *) thePart
{
NSMutableDictionary *currentPart;
NSArray *subparts;
NSString *type, *subtype;
NSUInteger i;
type = [[thePart objectForKey: @"type"] lowercaseString];
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
if ([type isEqualToString: @"multipart"])
{
if ([subtype isEqualToString: @"signed"])
return YES;
subparts = [thePart objectForKey: @"parts"];
for (i = 0; i < [subparts count]; i++)
{
currentPart = [subparts objectAtIndex: i];
if ([self _isSigned: currentPart])
return YES;
}
}
return NO;
}
- (BOOL) _isSmimeEncrypted: (NSDictionary *) thePart
{
NSMutableDictionary *currentPart;
NSArray *subparts;
NSString *type, *subtype;
NSUInteger i;
type = [[thePart objectForKey: @"type"] lowercaseString];
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
if ([type isEqualToString: @"multipart"])
{
subparts = [thePart objectForKey: @"parts"];
for (i = 0; i < [subparts count]; i++)
{
currentPart = [subparts objectAtIndex: i];
if ([self _isSmimeEncrypted: currentPart])
return YES;
}
}
else if ([type isEqualToString: @"application"] && ([subtype isEqualToString: @"pkcs7-mime"] ||
[subtype isEqualToString: @"x-pkcs7-mime"]))
return YES;
return NO;
}
- (BOOL) _isPGP: (NSDictionary *) thePart
{
NSMutableDictionary *currentPart;
NSArray *subparts;
NSString *type, *subtype, *protocol;
NSUInteger i;
type = [[thePart objectForKey: @"type"] lowercaseString];
subtype = [[thePart objectForKey: @"subtype"] lowercaseString];
protocol = [[[thePart objectForKey: @"parameterList"] objectForKey: @"protocol"] lowercaseString];
if ([type isEqualToString: @"multipart"])
{
if (([protocol isEqualToString: @"application/pgp-signature"] || [protocol isEqualToString: @"application/pgp-encrypted"]))
return YES;
subparts = [thePart objectForKey: @"parts"];
for (i = 0; i < [subparts count]; i++)
{
currentPart = [subparts objectAtIndex: i];
if ([self _isPGP: currentPart])
return YES;
}
}
else if ([type isEqualToString: @"application"] && [subtype isEqualToString: @"pgp-encrypted"])
return YES;
return NO;
}
//
//
//
@@ -691,9 +522,7 @@ struct GlobalObjectId {
else if ([type isEqualToString: @"multipart"])
*theNativeType = 4;
if (([self _isSigned: [self bodyStructure]] ||
[self _isSmimeEncrypted: [self bodyStructure]] ||
[self _isPGP: [self bodyStructure]]) && theMimeSupport > 0)
if (([subtype isEqualToString: @"signed"] || [subtype isEqualToString: @"pkcs7-mime"] ) && theMimeSupport > 0)
{
*theNativeType = 4;
isSMIME = YES;
@@ -708,7 +537,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: @""];
@@ -777,97 +606,15 @@ struct GlobalObjectId {
}
- (NSString *) _truncateContent: (NSString *) theContent
limit: (int) theLimit
truncated: (int *) wasTruncated
{
if ([theContent length] > theLimit)
{
int i, len;
theContent = [theContent substringToIndex: theLimit];
*wasTruncated = 1;
// We search for the first "space" character starting from the
// end and we truncate the string once more. We do this to avoid
// truncating the content in the middle of a XML entity
len = theLimit-1;
for (i = len; i >= 0; i--)
{
if (isspace([theContent characterAtIndex: i]))
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];
}
*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 +647,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 fetchBLOB];
calendar = nil;
NS_DURING
calendar = [iCalCalendar parseSingleFromSource: calendarData];
NS_HANDLER
calendar = nil;
NS_ENDHANDLER
return calendar;
}
}
}
}
return nil;
}
@@ -913,16 +691,17 @@ struct GlobalObjectId {
NSData *d, *globalObjId;
NSArray *attachmentKeys;
iCalCalendar *calendar;
NSString *p;
NSString *p, *subtype;
NSMutableString *s;
id value;
int preferredBodyType, mimeSupport, mimeTruncation, nativeBodyType;
int preferredBodyType, mimeSupport, nativeBodyType;
uint32_t v;
subtype = [[[self bodyStructure] valueForKey: @"subtype"] lowercaseString];
preferredBodyType = [[context objectForKey: @"BodyPreferenceType"] intValue];
mimeSupport = [[context objectForKey: @"MIMESupport"] intValue];
mimeTruncation = [[context objectForKey: @"MIMETruncation"] intValue];
s = [NSMutableString string];
@@ -930,13 +709,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 +728,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 +818,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 +832,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 +846,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 +887,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>"];
@@ -1129,21 +898,19 @@ struct GlobalObjectId {
else
{
// MesssageClass and ContentClass
if ([self _isSigned: [self bodyStructure]])
if ([subtype isEqualToString: @"signed"])
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note.SMIME.MultipartSigned"];
else if ([self _isSmimeEncrypted: [self bodyStructure]])
else if ([subtype isEqualToString: @"pkcs7-mime"])
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note.SMIME"];
else
[s appendFormat: @"<MessageClass xmlns=\"Email:\">%@</MessageClass>", @"IPM.Note"];
[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
@@ -1240,99 +1007,48 @@ struct GlobalObjectId {
AUTORELEASE(content);
content = [content activeSyncRepresentationInContext: context];
len = [content length];
truncated = 0;
// We handle MIMETruncation
switch (mimeTruncation)
{
case 0:
{
content = @"";
len = 0; truncated = 1;
}
break;
case 1:
content = [self _truncateContent: content limit: 4096 truncated: &truncated];
len = [content length];
break;
case 2:
content = [self _truncateContent: content limit: 5120 truncated: &truncated];
len = [content length];
break;
case 3:
content = [self _truncateContent: content limit: 7168 truncated: &truncated];
len = [content length];
break;
case 4:
content = [self _truncateContent: content limit: 10240 truncated: &truncated];
len = [content length];
break;
case 5:
content = [self _truncateContent: content limit: 20480 truncated: &truncated];
len = [content length];
break;
case 6:
content = [self _truncateContent: content limit: 51200 truncated: &truncated];
len = [content length];
break;
case 7:
content = [self _truncateContent: content limit: 102400 truncated: &truncated];
len = [content length];
break;
case 8:
default:
truncated = 0;
}
len = [content length];
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];
}
else
{
{
[s appendString: @"<Body xmlns=\"AirSyncBase:\">"];
// Set the correct type if client requested text/html but we got text/plain.
// For s/mime mails type is always 4 if mimeSupport is 1 or 2.
if (preferredBodyType == 2 && nativeBodyType == 1)
[s appendString: @"<Type>1</Type>"];
else if (([self _isSigned: [self bodyStructure]] ||
[self _isSmimeEncrypted: [self bodyStructure]] ||
[self _isPGP: [self bodyStructure]]) && mimeSupport > 0)
else if (([subtype isEqualToString: @"signed"] || [subtype isEqualToString: @"pkcs7-mime"] ) && mimeSupport > 0)
[s appendString: @"<Type>4</Type>"];
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: @"<Truncated>%d</Truncated>", truncated];
[s appendFormat: @"<Preview></Preview>"];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
[s appendFormat: @"<Part xmlns=\"ItemOperations:\">%d</Part>", [[context objectForKey: @"MultiPartsLen"] count]];
}
else
if (!truncated)
{
[s appendFormat: @"<Truncated>%d</Truncated>", truncated];
[s appendFormat: @"<Preview></Preview>"];
[s appendFormat: @"<Data>%@</Data>", content];
[s appendFormat: @"<EstimatedDataSize>%d</EstimatedDataSize>", len];
}
[s appendString: @"</Body>"];
}
}
// Attachments -namespace 16
attachmentKeys = [self fetchFileAttachmentKeys];
if ([attachmentKeys count] && !([self _isSigned: [self bodyStructure]]))
if ([attachmentKeys count] && !([subtype isEqualToString: @"signed"]))
{
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 +1063,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 +1111,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;
@@ -1409,9 +1120,9 @@ struct GlobalObjectId {
value = [[self mailHeaders] objectForKey: @"references"];
if ([value isKindOfClass: [NSArray class]])
reference = [[[value objectAtIndex: 0] componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
reference = [[[value objectAtIndex: 0] componentsSeparatedByString: @" "] objectAtIndex: 0];
else
reference = [[value componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] objectAtIndex: 0];
reference = [[value componentsSeparatedByString: @" "] objectAtIndex: 0];
if ([reference length] > 0)
[s appendFormat: @"<ConversationId xmlns=\"Email2:\">%@</ConversationId>", [[reference dataUsingEncoding: NSUTF8StringEncoding] activeSyncRepresentationInContext: context]];
@@ -1419,13 +1130,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 +1254,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
+44 -105
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
@@ -168,7 +152,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
o = [organizer cn];
if ([o length])
[s appendFormat: @"<Organizer_Name xmlns=\"Calendar:\">%@</Organizer_Name>", [o activeSyncRepresentationInContext: context]];
[s appendFormat: @"<Organizer_Name xmlns=\"Calendar:\">%@</Organizer_Name>", o];
}
}
@@ -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>
+11 -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,8 +57,7 @@ SetEnv proxy-nokeepalive 1
# Allow from your-cas-host-addr
# </Proxy>
# Redirect / to /SOGo
#RedirectMatch ^/$ https://mail.yourdomain.com/SOGo
ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0
# Enable to use Microsoft ActiveSync support
# Note that you MUST have many sogod workers to use ActiveSync.
@@ -80,24 +67,18 @@ 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
<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
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"
AddDefaultCharset UTF-8
@@ -111,3 +92,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>
-4489
View File
File diff suppressed because it is too large. Load diff
+24847 -87870
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://www.sogo.nu/support.html#/documentation.
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://www.sogo.nu/support.html#/documentation.
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.7 - January 2016</releaseinfo>
<subtitle>for version 2.3.7</subtitle>
<date>2016-01-25</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

Loaded 100 of 3419 files, more files were not shown because too many files have changed in this diff. Show more