Giter Site home page Giter Site logo

akonadi-ews's Introduction

Akonadi resource for Microsoft Exchange Web Services

THIS REPOSITORY IS NOW OBSOLETE

Note: The Akonadi EWS resource has been merged into KDE PIM and will be released with KDE PIM 17.12. The code now lives in the kdepim-runtime repository under resources/ews.

This Akonadi resource provides the ability to use Microsoft Exchange accounts with KDE PIM applications like KMail and KOrganizer.

It allows to use KDE PIM applications with Exchange mailboxes, for which the server administrator has not enabled access using standard e-mail protocols (IMAP, POP3 or SMTP). Additionally since the resource communicates with Exchange using its native protocol (also used by Microsoft Outlook) it allows to use the full capabilities of Exchange which are not accessible over IMAP or POP3.

The aim of this project is to allow full management of Exchange mailboxes so that the KDE PIM suite can become a drop-in replacement for Microsoft Outlook.

Currently the EWS resource is an independent project, but in the long term the plan is for this to become part of KDE PIM.

Current status

The EWS resource is currently in preview state. It can be used as a daily driver when it comes to e-mail. For other tasks like calendar interaction (scheduling and accepting meetings) it is necessary to use wither OWA or Microsoft Outlook.

Supported features

  • E-mail reception and full mailbox access
  • Message & folder operations (copying, moving, deleting)
  • Sending e-mail through Exchange (by default Exchange doesn't use SMTP to send messages from clients)
  • Server-side tags
  • Calendar view (read-only)

Planned features

  • Full calendar support (currently only read-only support is provided)
  • Task support
  • Server-side address autocompletion (will need to sort out some KDE PIM limitations)
  • Out-of-office status manipulation
  • Server-side message filtering
  • Access to additional mailboxes & shared calendars

Software requirements

  • Microsoft Exchange 2007 SP1 or later
  • Qt 5.5 or later
  • KDE Frameworks 5.17 or later (at least 5.19 is recommended when using NTLMv2 authentication)*
  • KDE PIM 15.04.0 or later

* Alternatively you can also recompile the kio package and backport the following commits from kio.git:

  • 5961ac8e Fix NTLMv2 stage 3 response creation
  • 2f894291 Try NTLMv2 authentication if the server denies NTLMv1
  • f665dd30 Try multiple authentication methods in case of failures

The last commit is only necessary if your system is also configured to use Kerberos.

Debugging

Some Akonadi basics

Akonadi runs every resource in a separate process, which communicates to the Akonadi server over DBus. When multiple instances of the same resource (for ex. multiple Exchange accounts) are present, each of them also runs in a separate process. You can easily find out your EWS resource instances by running ps -fu $(whoami) | grep akonadi_ews_resource.

Each Akonadi resource has a unique identifier. It is composed automatically out of the resource name and a number, which starts from 0 and is incremented with every new resource of that type. Removing a resource and adding it again will not reset the counter. For example the first instance of the EWS resource would use the identidier akonadi_ews_resource_0. The actual resource identifier is visible in the command line of the resource process after executing the ps command above.

Running the resource process in the terminal

By default the resource processes are started by the Akonadi server in the background. All the output is sent to the log (either the journal in case of systemd or the ~/.xsession-errors otherwise).

It is possible to run the resource process in the foreground in which case all the logs will be visible in the active console. Such mode of operation is very useful for debugging.

To run the resource process interactively:

  1. Learn the resource identifier (use the ps command above).
  2. Kill the resource process. This needs to be done a few times as Akonadi will initially try to restart the resource. The easiest way is to execute while [ $(killall akonadi_ews_resource) ]; do sleep 1; done. Warning, if you have several instances of the Exchange resource (several accounts) this command will terminate all of them.
  3. Execute the resource process interactively (substitute the identifier with the one obtained in step 1: akonadi_ews_resource --identifier akonadi_ews_resource_0.

Once running interactively you can at any moment terminate it by pressing Ctrl+C and start it again.

In order to run the resource process in the background again you have to restart Akonadi by executing akonadictl restart.

Enabling additional debug messages.

Currently there are two kinds of debug messages that can be enabled in addition to the default ones:

  • Request information (log_ews_resource_request) - prints information about each EWS request sent and the response received.
  • Protocol information (log_ews_resource_proto) - dumps all request and response data (XML).

To enable these messages edit (or create) the file ~/.config/QtProject/qtlogging.ini and put the following lines inside:

[Rules]
log_ews_resource_request.debug=true
log_ews_resource_proto.debug=true

Setting each of them to false or adding a # character in front of the line will disable each of the logging categories.

When starting the resource interactively make sure to edit the file and adjust the debug messages before actually starting the resource.

Request dumps

When the protocol information messages are enabled or when some request fails the contents of the request and the associated response will be dumped into files in your /tmp/ directory. The names of the relevant files will be printed in the log next to the information about the failed request. Attaching such dumps can be useful for debugging, however before doing so please make sure they don't contain any confidential information.

Reporting bugs

Please report bugs on the GitHub project page. In most cases it will be a great help when logs are provided.

Note however that the logs may information from your e-mail that might include company confidential information. Before sending any logs please review them and make sure any such information like e-mail addresses, dates or subjects is anonymized (i.e. replaced by some meaningless information).

akonadi-ews's People

Contributors

krissn avatar stefanbruens avatar

Stargazers

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

Watchers

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

akonadi-ews's Issues

new Version

Are their any plans to provide new versions periodically?

Because e.g. for the expamle of arch user repositories there is still 0.8.1 as most recent. But since end of october 2016 there are a lot of commits! Are they not stable at the moment?

BR Daniel

autodiscovery failing

I running Debian Stretch trying to use akonadi-ews to pull my exchange mail. I installed using the ubuntu .deb package. I enter my credentials using the domain field to enter the domain and enter my username and password in the proper fields. It tries to autodiscover and fails. I tried disable the domain field and entered username@domain for the username field and still fails.

Build distro packages with OBS

Kriss,
I love this project, and I am willing to help. It would greatly save time in your package building if your source was grabbed by build.opensuse.org. It has the ability to build packages for multiple distributions. Let me know if you would like me to help here.

-Cameron

Akonadi-ews does not save password in kwallet

I try to create EWS account, and save password but it does not arrives at kwallet. Meanwhile if I delete in kwallet a root instance "akonadi-ews" it will appear again, but with no password. If I try to change created account by typing password there are no changes. I tried to remove all akonadi and kmail settings, even tried new system account - no changes. My system is openSUSE Thumbleweed, kmail (kde frameworks) 17.12. I tried to have more logs with this in console:
export QT_LOGGING_RULES="org.kde.pim.* = true"
akonadictl restart
This showed me such logs when I have changed ews account:

org.kde.pim.ews.client.proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:FindFolder Traversal=\"Deep\"><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:FieldURI FieldURI=\"folder:DisplayName\"/><t:FieldURI FieldURI=\"folder:ParentFolderId\"/></t:AdditionalProperties></m:FolderShape><m:ParentFolderIds><t:DistinguishedFolderId Id=\"msgfolderroot\"/></m:ParentFolderIds></m:FindFolder></soap:Body></soap:Envelope>\n"
org.kde.pim.ews.client.proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:GetFolder><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id=\"inbox\"/><t:DistinguishedFolderId Id=\"calendar\"/><t:DistinguishedFolderId Id=\"tasks\"/><t:DistinguishedFolderId Id=\"contacts\"/></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>\n"
org.kde.pim.ews.client.request: Starting GetFolder request ((EwsId(Distinguished: inbox), EwsId(Distinguished: calendar), EwsId(Distinguished: tasks), EwsId(Distinguished: contacts)))
org.kde.pim.ews: requestPassword: start
org.kde.pim.ews: onWalletOpenedForRead: start true
org.kde.pim.ews: onWalletOpenedForRead: got password
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a6dde0) ""
org.kde.pim.ews.client.proto: response dumped to "/tmp/akonadi-ews-XcTJ2mg/ews_xmldump_TTw8019.xml"
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 401
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a6db60) ""
org.kde.pim.ews.client.proto: response dumped to "/tmp/akonadi-ews-XcTJ2mg/ews_xmldump_Cjd8019.xml"
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 401
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 401
org.kde.pim.ews.client.proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:GetFolder><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id=\"inbox\"/></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>\n"
org.kde.pim.ews.client.request: Starting GetFolder request ((EwsId(Distinguished: inbox)))
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a74bb0) "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Header><h:ServerVersionInfo MajorVersion=\"15\" MinorVersion=\"1\" MajorBuildNumber=\"466\" MinorBuildNumber=\"37\" Version=\"V2016_01_06\" xmlns:h=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><m:GetFolderResponse xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><m:ResponseMessages><m:GetFolderResponseMessage ResponseClass=\"Success\"><m:ResponseCode>NoError</m:ResponseCode><m:Folders><t:Folder><t:FolderId Id=\"AQMkAGU3NDhhMDAANy1lMTk0LTQwZTEtYjQ5MS03NjA4MGE5NWE3ZjkALgAAA11CX9owgSpOh2Ly9Vqw8VIBAGMRBz9aJtNKqXbJT2coS9cAAAIBDAAAAA==\" ChangeKey=\"AQAAABYAAABjEQc/WibTSql2yU9nKEvXAACtJ2ae\"/></t:Folder></m:Folders></m:GetFolderResponseMessage></m:ResponseMessages><"
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a74bb0) "/m:GetFolderResponse></s:Body></s:Envelope"
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a74bb0) ">"
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a74bb0) ""
org.kde.pim.ews.client.proto: response dumped to "/tmp/akonadi-ews-XcTJ2mg/ews_xmldump_XFW8019.xml"
org.kde.pim.ews.client.request: Got GetFolder response (id: f3b41c, name: )
org.kde.pim.ews: requestPassword: start
org.kde.pim.ews: requestPassword: password already set
org.kde.pim.ews.client.proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:GetFolder><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:FieldURI FieldURI=\"folder:DisplayName\"/><t:ExtendedFieldURI PropertySetId=\"9bf757ae-69b5-4d8a-bf1d-2dd0c0871a28\" PropertyName=\"GlobalTags\" PropertyType=\"StringArray\"/><t:ExtendedFieldURI PropertySetId=\"9bf757ae-69b5-4d8a-bf1d-2dd0c0871a28\" PropertyName=\"GlobalTagsVersion\" PropertyType=\"Integer\"/></t:AdditionalProperties></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id=\"msgfolderroot\"/><t:DistinguishedFolderId Id=\"inbox\"/></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>\n"
org.kde.pim.ews.client.request: Starting GetFolder request ((EwsId(Distinguished: msgfolderroot), EwsId(Distinguished: inbox)))
org.kde.pim.ews.client.proto: data KIO::TransferJob(0x560ed5a6dcc0) ""
org.kde.pim.ews.client.proto: response dumped to "/tmp/akonadi-ews-XcTJ2mg/ews_xmldump_Zbw8019.xml"
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 401
ERROR "Failed to process EWS request - HTTP code 401"

HTTP Code 401

Greetings. I am trying to get EWR set up in Kmail, but I'm running into error code 401. My settings are identical to Evolution-EWS. Some odd behavior is this:

Domain checked but blank
Try Connect returns no error and results in the log below, but clicking OK to add account results in 401
log_ews_resource_request: Starting GetFolder request (1 folders)
log_ews_resource_proto: data KIO::TransferJob(0x2a401a0) ""
log_ews_resource_proto: response dumped to "/tmp/akonadi-ews-Xe6csXi/ews_xmldump_aqq3890.xml"
log_ews_resource: Failed to process EWS request - HTTP code 401
log_ews_resource_proto: "<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types\">soap:Header<t:RequestServerVersion Version="Exchange2007_SP1"/></soap:Header>soap:Body<m:GetFolder><m:FolderShape><t:BaseShape>IdOnly</t:BaseShape></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id="inbox"/></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>\n"

Domain checked but filled in with proper domain
401 & this log
log_ews_resource_proto: data KIO::TransferJob(0x280acf0) ""
log_ews_resource_proto: response dumped to "/tmp/akonadi-ews-Xe6csXi/ews_xmldump_meo3890.xml"
log_ews_resource: Failed to process EWS request - HTTP code 401
log_ews_resource: Failed to process EWS request - HTTP code 401

Domain unchecked
401 & this log
log_ews_resource_proto: data KIO::TransferJob(0x280acf0) ""
log_ews_resource_proto: response dumped to "/tmp/akonadi-ews-Xe6csXi/ews_xmldump_meo3890.xml"
log_ews_resource: Failed to process EWS request - HTTP code 401
log_ews_resource: Failed to process EWS request - HTTP code 401

I carefully read the debugging instructions, and I have attached my logs here that have info, but but most are 0 bytes / 100% empty, so they can't be uploaded here.

OneDrive link:
https://1drv.ms/f/s!AkxzHMvKAVWHh9A0j8Pq_ImdZcVSNg

Not sure what I am doing wrong. Sorry if I'm not being descriptive.

I'm on Arch Linux, using Plasma 5.9.

I appreciate your help in advance.

Thanks!
Benjamin

Microsoft Time Zones are not Mapped Correctly to IANA Time Zones

Microsoft has its own naming convention for time zones (see https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx) that does not conform to the IANA time zone database (tzdata).

This fills the logs with a lot of messages like:
kontact[775]: Cannot open "/usr/share/zoneinfo/GMT Standard Time"
kontact[775]: Cannot open "/usr/share/zoneinfo/W. Europe Standard Time"
kontact[775]: Cannot open "/usr/share/zoneinfo/Eastern Standard Time"

Besides that, korganizer partly shows the wrong time for the appointments (depending on whether the locally configured timezone conforms to the timezone used for the appointment).

Fixing this would improve the usability of the calendar component of your really great akonadi plugin a lot.

Segfault while fetching mails

KMail was busy fetching mails when suddenly the resource crashed:

Application: akonadi_ews_resource (akonadi_ews_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6b16d43840 (LWP 21165))]

Thread 5 (Thread 0x7f6b1640e700 (LWP 21173)):
#0  0x0000003a1c8e0d4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x0000003a1f00aac2 in poll (__timeout=-1, __nfds=1, __fds=0x7f6b1640dc60) at /usr/include/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x14798b0, cond=cond@entry=0x14798f0, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_conn.c:459
#3  0x0000003a1f00c72f in xcb_wait_for_event (c=0x14798b0) at /var/tmp/portage/x11-libs/libxcb-1.11.1/work/libxcb-1.11.1/src/xcb_in.c:693
#4  0x00007f6b16857639 in QXcbEventReader::run (this=0x1487a60) at qxcbconnection.cpp:1325
#5  0x0000003a2c0ae928 in QThreadPrivate::start (arg=0x1487a60) at thread/qthread_unix.cpp:341
#6  0x0000003a1d007444 in start_thread (arg=0x7f6b1640e700) at pthread_create.c:334
#7  0x0000003a1c8e9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f6b154ea700 (LWP 21181)):
#0  0x0000003a1eca46e9 in g_mutex_lock (mutex=mutex@entry=0x7f6b08000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gthread-posix.c:1338
#1  0x0000003a1ec539ea in g_main_context_prepare (context=context@entry=0x7f6b08000990, priority=priority@entry=0x7f6b154e9c10) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3444
#2  0x0000003a1ec544b8 in g_main_context_iterate (context=context@entry=0x7f6b08000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3820
#3  0x0000003a1ec5469c in g_main_context_iteration (context=0x7f6b08000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#4  0x0000003a2c2d7efc in QEventDispatcherGlib::processEvents (this=0x7f6b080008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#5  0x0000003a2c282f2a in QEventLoop::exec (this=this@entry=0x7f6b154e9d50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#6  0x0000003a2c0a9dc4 in QThread::exec (this=this@entry=0x3a31c8c240 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:500
#7  0x0000003a31c157d5 in QDBusConnectionManager::run (this=0x3a31c8c240 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:189
#8  0x0000003a2c0ae928 in QThreadPrivate::start (arg=0x3a31c8c240 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:341
#9  0x0000003a1d007444 in start_thread (arg=0x7f6b154ea700) at pthread_create.c:334
#10 0x0000003a1c8e9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f6b14ce9700 (LWP 21182)):
#0  g_mutex_unlock (mutex=0x7f6b0c000990) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gthread-posix.c:1350
#1  0x0000003a1ec5443d in g_main_context_iterate (context=context@entry=0x7f6b0c000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3788
#2  0x0000003a1ec5469c in g_main_context_iteration (context=0x7f6b0c000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#3  0x0000003a2c2d7efc in QEventDispatcherGlib::processEvents (this=0x7f6b0c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#4  0x0000003a2c282f2a in QEventLoop::exec (this=this@entry=0x7f6b14ce8d80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x0000003a2c0a9dc4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#6  0x0000003a2c0ae928 in QThreadPrivate::start (arg=0x14e5240) at thread/qthread_unix.cpp:341
#7  0x0000003a1d007444 in start_thread (arg=0x7f6b14ce9700) at pthread_create.c:334
#8  0x0000003a1c8e9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f6b075ef700 (LWP 21448)):
#0  0x0000003a1c8dcd2d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x0000003a1eca2f90 in read (__nbytes=16, __buf=0x7f6b075eeba0, __fd=<optimized out>) at /usr/include/bits/unistd.h:44
#2  g_wakeup_acknowledge (wakeup=0x7f6b0c002390) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gwakeup.c:210
#3  0x0000003a1ec5400f in g_main_context_check (context=context@entry=0x7f6b00000990, max_priority=2147483647, fds=fds@entry=0x7f6b00003020, n_fds=n_fds@entry=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3632
#4  0x0000003a1ec54530 in g_main_context_iterate (context=context@entry=0x7f6b00000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3837
#5  0x0000003a1ec5469c in g_main_context_iteration (context=0x7f6b00000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#6  0x0000003a2c2d7efc in QEventDispatcherGlib::processEvents (this=0x7f6b000008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#7  0x0000003a2c282f2a in QEventLoop::exec (this=this@entry=0x7f6b075eed80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#8  0x0000003a2c0a9dc4 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#9  0x0000003a2c0ae928 in QThreadPrivate::start (arg=0x158aa70) at thread/qthread_unix.cpp:341
#10 0x0000003a1d007444 in start_thread (arg=0x7f6b075ef700) at pthread_create.c:334
#11 0x0000003a1c8e9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f6b16d43840 (LWP 21165)):
[KCrash Handler]
#6  0x00000000004823ae in EwsFetchItemsJob::compareItemLists (this=this@entry=0x30840f0) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.0/work/akonadi-ews-0.8.0/ewsfetchitemsjob.cpp:267
#7  0x0000000000485e65 in EwsFetchItemsJob::remoteItemFetchDone (this=0x30840f0, job=<optimized out>) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.0/work/akonadi-ews-0.8.0/ewsfetchitemsjob.cpp:206
#8  0x0000003a2c2afd8d in QtPrivate::QSlotObjectBase::call (a=0x7fff52725010, r=0x30840f0, this=0x15edb40) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:124
#9  QMetaObject::activate (sender=sender@entry=0x21e30b0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff52725010) at kernel/qobject.cpp:3715
#10 0x0000003a2c2b0347 in QMetaObject::activate (sender=sender@entry=0x21e30b0, m=m@entry=0x3a34c9a2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff52725010) at kernel/qobject.cpp:3595
#11 0x0000003a34a40372 in KJob::result (this=this@entry=0x21e30b0, _t1=_t1@entry=0x21e30b0) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0_build/src/lib/moc_kjob.cpp:568
#12 0x0000003a34a41b41 in KJob::finishJob (this=this@entry=0x21e30b0, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0/src/lib/jobs/kjob.cpp:109
#13 0x0000003a34a43b2a in KJob::emitResult (this=this@entry=0x21e30b0) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0/src/lib/jobs/kjob.cpp:293
#14 0x00000000004e3b57 in EwsRequest::requestResult (this=0x21e30b0, job=0x1597b80) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.0/work/akonadi-ews-0.8.0/ewsclient/ewsrequest.cpp:132
#15 0x00000000004fdcc4 in EwsRequest::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.0/work/akonadi-ews-0.8.0_build/ewsclient/moc_ewsrequest.cpp:77
#16 0x0000003a2c2af625 in QMetaObject::activate (sender=sender@entry=0x1597b80, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff527252d0) at kernel/qobject.cpp:3730
#17 0x0000003a2c2b0347 in QMetaObject::activate (sender=sender@entry=0x1597b80, m=m@entry=0x3a34c9a2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7fff527252d0) at kernel/qobject.cpp:3595
#18 0x0000003a34a40372 in KJob::result (this=this@entry=0x1597b80, _t1=_t1@entry=0x1597b80) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0_build/src/lib/moc_kjob.cpp:568
#19 0x0000003a34a41b41 in KJob::finishJob (this=this@entry=0x1597b80, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0/src/lib/jobs/kjob.cpp:109
#20 0x0000003a34a43b2a in KJob::emitResult (this=this@entry=0x1597b80) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.23.0/work/kcoreaddons-5.23.0/src/lib/jobs/kjob.cpp:293
#21 0x00000033a06c5a52 in KIO::SimpleJob::slotFinished (this=this@entry=0x1597b80) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/simplejob.cpp:230
#22 0x00000033a06cf646 in KIO::TransferJob::slotFinished (this=0x1597b80) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/transferjob.cpp:166
#23 0x00000033a06d01d1 in KIO::TransferJob::qt_static_metacall (_o=0x1597b80, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0_build/src/core/moc_transferjob.cpp:155
#24 0x0000003a2c2af625 in QMetaObject::activate (sender=sender@entry=0x1596e40, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3730
#25 0x0000003a2c2b0347 in QMetaObject::activate (sender=sender@entry=0x1596e40, m=m@entry=0x33a0978180 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3595
#26 0x00000033a06a5c63 in KIO::SlaveInterface::finished (this=this@entry=0x1596e40) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0_build/src/core/moc_slaveinterface.cpp:424
#27 0x00000033a06a9011 in KIO::SlaveInterface::dispatch (this=0x1596e40, _cmd=<optimized out>, rawdata=...) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/slaveinterface.cpp:160
#28 0x00000033a06a6217 in KIO::SlaveInterface::dispatch (this=0x1596e40) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/slaveinterface.cpp:89
#29 0x00000033a06aa976 in KIO::Slave::gotInput (this=0x1596e40) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/slave.cpp:393
#30 0x00000033a07354c5 in KIO::Slave::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0_build/src/core/moc_slave.cpp:87
#31 0x0000003a2c2af625 in QMetaObject::activate (sender=0x1587350, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3730
#32 0x0000003a2c2b0347 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x33a0976c00 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3595
#33 0x00000033a064e3bf in KIO::Connection::readyRead (this=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0_build/src/core/moc_connection_p.cpp:142
#34 KIO::ConnectionPrivate::dequeue (this=0x157fa80) at /var/tmp/portage/kde-frameworks/kio-5.23.0/work/kio-5.23.0/src/core/connection.cpp:45
#35 0x0000003a2c2b0cca in QObject::event (this=0x1587350, e=<optimized out>) at kernel/qobject.cpp:1256
#36 0x000000339c75b86c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1587350, e=0x15ccc70) at kernel/qapplication.cpp:3804
#37 0x000000339c763312 in QApplication::notify (this=0x7fff52725ff0, receiver=0x1587350, e=0x15ccc70) at kernel/qapplication.cpp:3561
#38 0x0000003a2c285048 in QCoreApplication::notifyInternal2 (receiver=0x1587350, event=event@entry=0x15ccc70) at kernel/qcoreapplication.cpp:1015
#39 0x0000003a2c286e03 in QCoreApplication::sendEvent (event=0x15ccc70, receiver=<optimized out>) at kernel/qcoreapplication.h:225
#40 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x14677d0) at kernel/qcoreapplication.cpp:1650
#41 0x0000003a2c2873a8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1508
#42 0x0000003a2c2d7b03 in postEventSourceDispatch (s=0x14bac60) at kernel/qeventdispatcher_glib.cpp:270
#43 0x0000003a1ec542ed in g_main_dispatch (context=0x7f6b100016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3154
#44 g_main_context_dispatch (context=context@entry=0x7f6b100016f0) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3769
#45 0x0000003a1ec545f0 in g_main_context_iterate (context=context@entry=0x7f6b100016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3840
#46 0x0000003a1ec5469c in g_main_context_iteration (context=0x7f6b100016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.46.2-r3/work/glib-2.46.2/glib/gmain.c:3901
#47 0x0000003a2c2d7ee7 in QEventDispatcherGlib::processEvents (this=0x14c6fa0, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#48 0x0000003a2c282f2a in QEventLoop::exec (this=this@entry=0x7fff52725f50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#49 0x0000003a2c28b29c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285
#50 0x000000339b8f45fc in QGuiApplication::exec () at kernel/qguiapplication.cpp:1607
#51 0x000000339c75b7c5 in QApplication::exec () at kernel/qapplication.cpp:2979
#52 0x00000033afe28c6e in Akonadi::ResourceBase::init (r=r@entry=0x14e59d0) at /var/tmp/portage/kde-apps/akonadi-16.04.2/work/akonadi-16.04.2/src/agentbase/resourcebase.cpp:605
#53 0x000000000049b7d7 in Akonadi::ResourceBase::init<EwsResource> (argc=3, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196
#54 0x0000003a1c8206d0 in __libc_start_main (main=0x447840 <main(int, char**)>, argc=3, argv=0x7fff52726118, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff52726108) at libc-start.c:289
#55 0x000000000044c329 in _start ()

Calendar: Display attendees for events

Hi,

I have a feature request for this very promising piece of software: it would be very cool if the attendees and their response could be displayed for EWS events.

Cannot get data from EWS

Distro: Gentoo Linux
KDE Frameworks: 5.50.0
Qt 5.11.1
kde-apps/akonadi-18.08.1:5
EWS Connector: 5.9.1

Akonadi Console says:
Identifier: akonadi_ews_resource_2
Type: Microsoft Exchange Server (EWS)
Status: Online, Idle
Status Message: Ready
Capabilities: Resource, NeedsNetwork, X-EwsMailTransport
Mimetypes: text/directory, message/rfc822, text/calendar, application/x-vnd.kde.contactgroup, application/x-vnd.akonadi.calendar.event, application/x-vnd.akonadi.calendar.todo

Config seems to be okay, as I can see the folder structure in the 'Subscriptions' Tab of the (native) Config window.

Server Status:
Status: OK
Version: 14.3.123.3 (Exchange 2010 SP3)

Error building

Getting the following error during build of both the release and the latest master.

Generating moc_ewssubscriptionmanager.cpp
/home/icurtis/Documents/Packages/akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp: In member function ‘bool EwsMtaResource::connectEws()’:
/home/icurtis/Documents/Packages/akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp:58:32: error: ‘messageSent’ is not a member of ‘OrgKdeAkonadiEwsResourceInterface’
         connect(mEwsResource, &OrgKdeAkonadiEwsResourceInterface::messageSent, this, &EwsMtaResource::messageSent);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/icurtis/Documents/Packages/akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp: In member function ‘virtual void EwsMtaResource::sendItem(const Akonadi::Item&)’:
/home/icurtis/Documents/Packages/akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp:85:19: error: ‘class OrgKdeAkonadiEwsResourceInterface’ has no member named ‘sendMessage’
     mEwsResource->sendMessage(item.remoteId(), mimeContent);
                   ^~~~~~~~~~~
Generating moc_ewssubscriptionwidget.cpp
uname -r
4.6.3-1-ARCH

Any ideas?

KMail-17.04.3 doesn't allow to use/create EWSMTA "send-account" anymore

Hi there!

I've found that after upgrade KMail to 17.04.3 it is not possible to add EWSMTA account (to be used for sending emails instead of SMTP) anymore.
It ignores the one created with akonadiconsole, and doesn't allow to create non-smtp outgoing account (the "Create" button directly opens dialog to create SMTP account).
Neither restarting akonadiserver helps (ewsmta account still doesn't show in outgoing accounts) 😿

Issues with OAuth2

I'm trying to connect my our corporate email that is hosted on outlook.office365.com.

Nothing I try seems to work, and the error messages are not overly descriptive. All I get is "Failed to process EWS request - HTTP code 401".

Is this supposed to work, or are there some issues somewhere?

How to use this feature

If I have kde-neon - how can i use this feature? i cant't find any hint on this and the documentation and readme lacks a discription of this usage?!?

Mail check often hangs until restart

Often the mail check on my exchange accounts hang, and sometimes cause at crash. The following information is what I have been able to gather from akonadi logs (not sure it it will help at all):

AKONADI LOG:
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot pause an inactive timerCannot pause an inactive timerCannot pause an inactive timerCannot pause an inactive timer"Cannot connect to agent instance with identifier 'akonadi_ews_resource_1', error message: ''"ItemRetrieverException : Unable to contact resourceCannot pause an inactive timerCannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.Cannot resume a timer that is not paused.invalid query "{\n "cond": 0,\n "key": "",\n "limit": -1,\n "negated": false,\n "value": null\n}\n"invalid query "{\n "cond": 0,\n "key": "",\n "limit": -1,\n "negated": false,\n "value": null\n}\n"

KDE CRASH REPORTER:
Application: akonadi_ews_resource (akonadi_ews_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe7c1997f00 (LWP 12378))]

Thread 6 (Thread 0x7fe7a747d700 (LWP 12408)):
#0 0x00007fe7c80981e7 in g_source_iter_next () from /lib64/libglib-2.0.so.0
#1 0x00007fe7c809a63b in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2 0x00007fe7c809b07b in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#3 0x00007fe7c809b26c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4 0x00007fe7d015d73b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#5 0x00007fe7d010e73a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#6 0x00007fe7cff6b5f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#7 0x00007fe7cff6f9da in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8 0x00007fe7cd63b6ca in start_thread () from /lib64/libpthread.so.0
#9 0x00007fe7cf362f7f in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fe7b4b14700 (LWP 12391)):
#0 0x00007fe7cf352bed in read () from /lib64/libc.so.6
#1 0x00007fe7c80df450 in g_wakeup_acknowledge () from /lib64/libglib-2.0.so.0
#2 0x00007fe7c809ac60 in g_main_context_check () from /lib64/libglib-2.0.so.0
#3 0x00007fe7c809b0f4 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#4 0x00007fe7c809b26c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#5 0x00007fe7d015d73b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#6 0x00007fe7d010e73a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#7 0x00007fe7cff6b5f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#8 0x00007fe7cff6f9da in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#9 0x00007fe7cd63b6ca in start_thread () from /lib64/libpthread.so.0
#10 0x00007fe7cf362f7f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fe7b5315700 (LWP 12389)):
#0 0x00007fe7cf35701d in poll () from /lib64/libc.so.6
#1 0x00007fe7c809b156 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2 0x00007fe7c809b26c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007fe7d015d73b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#4 0x00007fe7d010e73a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#5 0x00007fe7cff6b5f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6 0x00007fe7cff6f9da in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#7 0x00007fe7cd63b6ca in start_thread () from /lib64/libpthread.so.0
#8 0x00007fe7cf362f7f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fe7b5b16700 (LWP 12388)):
#0 0x00007fe7cf35701d in poll () from /lib64/libc.so.6
#1 0x00007fe7c809b156 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2 0x00007fe7c809b26c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007fe7d015d73b in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#4 0x00007fe7d010e73a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#5 0x00007fe7cff6b5f3 in QThread::exec() () from /lib64/libQt5Core.so.5
#6 0x00007fe7d7329739 in QDBusConnectionManager::run() () from /lib64/libQt5DBus.so.5
#7 0x00007fe7cff6f9da in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#8 0x00007fe7cd63b6ca in start_thread () from /lib64/libpthread.so.0
#9 0x00007fe7cf362f7f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fe7b6e97700 (LWP 12386)):
#0 0x00007fe7cf35701d in poll () from /lib64/libc.so.6
#1 0x00007fe7cbe64d10 in _xcb_conn_wait () from /lib64/libxcb.so.1
#2 0x00007fe7cbe66aa9 in xcb_wait_for_event () from /lib64/libxcb.so.1
#3 0x00007fe7bad07d69 in QXcbEventReader::run() () from /lib64/libQt5XcbQpa.so.5
#4 0x00007fe7cff6f9da in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5
#5 0x00007fe7cd63b6ca in start_thread () from /lib64/libpthread.so.0
#6 0x00007fe7cf362f7f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fe7c1997f00 (LWP 12378)):
[KCrash Handler]
#6 0x000055dfaf9053e9 in QString::QString (other=..., this=0x7ffffabb4080) at /usr/include/qt5/QtCore/qstring.h:898
#7 EwsRequest::Response::responseCode (this=0x55df80000000) at /usr/src/debug/akonadi-ews-0.8.1/ewsclient/ewsrequest.h:46
#8 EwsSubscriptionManager::getEventsRequestFinished (this=0x55dfb18e8590, job=0x55dfb1917dc0) at /usr/src/debug/akonadi-ews-0.8.1/ewssubscriptionmanager.cpp:205
#9 0x00007fe7d0136ae6 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#10 0x00007fe7d05c98f2 in KJob::result(KJob*, KJob::QPrivateSignal) () from /lib64/libKF5CoreAddons.so.5
#11 0x00007fe7d05cb231 in KJob::finishJob(bool) () from /lib64/libKF5CoreAddons.so.5
#12 0x000055dfaf92306f in EwsGetStreamingEventsRequest::requestDataTimeout (this=0x55dfb1917dc0) at /usr/src/debug/akonadi-ews-0.8.1/ewsclient/ewsgetstreamingeventsrequest.cpp:107
#13 0x00007fe7d0136ae6 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#14 0x00007fe7d0142c98 in QTimer::timerEvent(QTimerEvent*) () from /lib64/libQt5Core.so.5
#15 0x00007fe7d013782b in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#16 0x00007fe7d1023ecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#17 0x00007fe7d102b671 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#18 0x00007fe7d010f7aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#19 0x00007fe7d015cd3b in QTimerInfoList::activateTimers() () from /lib64/libQt5Core.so.5
#20 0x00007fe7d015d291 in timerSourceDispatch(_GSource*, int ()(void), void*) () from /lib64/libQt5Core.so.5
#21 0x00007fe7c809ae42 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#22 0x00007fe7c809b1c0 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#23 0x00007fe7c809b26c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#24 0x00007fe7d015d71f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#25 0x00007fe7d010e73a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /lib64/libQt5Core.so.5
#26 0x00007fe7d011623c in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#27 0x00007fe7d7031aee in Akonadi::ResourceBase::init(Akonadi::ResourceBase*) () from /lib64/libKF5AkonadiAgentBase.so.5
#28 0x000055dfaf901527 in Akonadi::ResourceBase::init (argc=, argv=) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196
#29 0x00007fe7cf27b401 in __libc_start_main () from /lib64/libc.so.6
#30 0x000055dfaf8ab7ca in _start ()

Does not show in kmail

Distro: openSUSE Leap 42.1
kdepim 15.12.3-18.5
Frameworks 5.21.0-12.1
QT 5.5.1

I built Akonadi-EWS from git today https://build.opensuse.org/package/show/home:megamaced/akonadi-ews

In KMail account settings, akonadi-ews is set up. Connects OK. Status shows Exchange 2013 OK. I can see the folder list in the Subscriptions tab.

However in the main KMail window I don't see any Exchange folders. I only have 'Local Folders' in the left hand side

Ews rW Calendar Support

Hey KrissN awesome job on this love it and thanks for your hard work! Just curious as to if there's been any progress on calendar 2way/write support? I'm sure we could open a bounty on it and it'd get a lot of attention! Just let me know how could start something like that if so!

URL rezolve not treated properly

The URL of the Exchange server that we use for setting up Evolution, does not work with this resource.

An error is thrown when I try to connect to the server:

ERROR "Failed to read EWS request XML"

Upon checking the received XML, I saw that it's actually the HTML page from the Outlook webmail login.

I've enabled debugging logs, and that's how I was able to examine the contents of that XML.

I don't know what other details I can and I'm allowed to provide in order to resolve this. Please ask for what you think might be useful, and I'll see what I can do.

access to shared mailboxes

I could not yet figure out how to connect to shared mailboxes using the akonadi-ews agent. Is that implemented at the moment?

What I have tried:

  • With IMAP I can provide domain\username\mailboxalias to connect a shared mailbox. Trying the same approach with the ews ressource gives me a 401 authentication error. The same if I do not specify the domain in the username but only in the domain field of the resource configurator.
  • If I use my regular username but specify the mail address of the shared mailbox, it just adds my regular accounts mail folder.

No contacts shown when Exchange only allows searching and not listing

I'm not sure if this is a user/client issue, but it looks like akonadi-ews doesn't support server-side contact searching.

As far as I can tell, our Exchange server is configured to not allow listing contacts, so I don't see any contacts from the global address book. In Outlook or Evolution, I can still search for contacts, which will make them show up.

Do I need to configure anything to make global Exchange contacts work in Akonadi, or is this feature still missing?

Error on compiling

I want to compile akonadi-ews on Archlinux but i got this error:

Scanning dependencies of target akonadi_ews_resource
[ 49%] Building CXX object CMakeFiles/akonadi_ews_resource.dir/calendar/ewscalendarhandler.cpp.o
In file included from /usr/include/KF5/AkonadiCore/exception.h:28:0,
                 from /usr/include/KF5/AkonadiCore/item.h:26,
                 from /usr/include/KF5/AkonadiCore/Item:1,
                 from /tmp/yaourt-tmp-bw/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsfetchitemdetailjob.h:25,
                 from /tmp/yaourt-tmp-bw/aur-akonadi-ews/src/akonadi-ews-0.8.0/calendar/ewsfetchcalendardetailjob.h:23,
                 from /tmp/yaourt-tmp-bw/aur-akonadi-ews/src/akonadi-ews-0.8.0/calendar/ewscalendarhandler.cpp:24:
/usr/include/KF5/AkonadiCore/std_exception.h:1:44: fatal error: /usr/include/c++/5.3.0/exception: No such file or directory
 #include "/usr/include/c++/5.3.0/exception"
                                            ^
compilation terminated.
CMakeFiles/akonadi_ews_resource.dir/build.make:105: recipe for target 'CMakeFiles/akonadi_ews_resource.dir/calendar/ewscalendarhandler.cpp.o' failed
make[2]: *** [CMakeFiles/akonadi_ews_resource.dir/calendar/ewscalendarhandler.cpp.o] Error 1
CMakeFiles/Makefile2:100: recipe for target 'CMakeFiles/akonadi_ews_resource.dir/all' failed
make[1]: *** [CMakeFiles/akonadi_ews_resource.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I've installed all dependieces. Maybe i missed something? Maybe someone have an idea. Thanks a lot!

crashes after: log_ews_resource: "Could not find handler for item type 4"

Just started using this and i'm getting Application 'akonadi_ews_resource' crashing... on every sync.
Sending mail works ok,
It succesfully fetched some of emails from exchange and then got stuck on something it's not expecting i guess :)

Last info in logs is log_ews_resource: "Could not find handler for item type 4".

What other debugging info can i provide?

log_ews_resource_proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:SyncFolderItems><m:ItemShape><t:BaseShape>IdOnly</t:BaseShape><t:AdditionalProperties><t:ExtendedFieldURI PropertySetId=\"9bf757ae-69b5-4d8a-bf1d-2dd0c0871a28\" PropertyName=\"Tags\" PropertyType=\"StringArray\"/></t:AdditionalProperties></m:ItemShape><m:SyncFolderId><t:FolderId Id=\"AAMkADEyNjI1NjYwLTU4ZDYtNDkzOS04YzhmLWNlOTA1ODIzMjcyYgAuAAAAAABvZbRNcPRBTYjfzKeBgXRAAQDK9FNrSpKHQbzJ/ij8KfDrAD/PewAPAAA=\" ChangeKey=\"AwAAABQAAAAifhXj2Uw5QYjrqf6TKQh4AAAIGQ==\"/></m:SyncFolderId><m:MaxChangesReturned>100</m:MaxChangesReturned></m:SyncFolderItems></soap:Body></soap:Envelope>\n"

log_ews_resource_request: Starting SyncFolderItems request (folder:  EwsId(AAMkADEyNjI1NjYwLTU4ZDYtNDkzOS04YzhmLWNlOTA1ODIzMjcyYgAuAAAAAABvZbRNcPRBTYjfzKeBgXRAAQDK9FNrSpKHQbzJ/ij8KfDrAD/PewAPAAA=, changeKey: AwAAABQAAAAifhXj2Uw5QYjrqf6TKQh4AAAIGQ==) , state: none

log_ews_resource_proto: data KIO::TransferJob(0x1ff4070) "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Header><h:ServerVersionInfo MajorVersion=\"14\" MinorVersion=\"3\" MajorBuildNumber=\"294\" MinorBuildNumber=\"0\" Version=\"Exchange2010_SP2\" xmlns:h=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"/></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><m:SyncFolderItemsResponse xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><m:ResponseMessages><m:SyncFolderItemsResponseMessage ResponseClass=\"Success\"><m:ResponseCode>NoError</m:ResponseCode><m:SyncState>H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In6NX+PX+TXoOfjF+w+P9+/d3znePnlwfLC9f3xyb/vJyZOT7Wd7Tw5Onjx49vD+/Z1f8t3X49fXy+nrNmvzk2yZ1de/xqP3f/NZVc7y+mz2azx8/3d/Mq+bolr+Gofv/+p36f/1IqvfypCTX+PX+C3oa0WmzRcNWv4avzl9tUP/H6NNlf9tX6x++fEXf9R/+M/9lX/wH9z+nr/mr/HP/PLXb7/zp/yRx3/fP/1/bf0fd/6n//bX+D3+xV/8a/ymv8av8Wv/Gr/Jr/Fr4ZVf/9f4Nf5k+vHF8cuzL45f4JNf49n9Zz/5a/8a/ecl/f939v5e0P9/u0i77vOb/MX/ytW/8ev/J8d/7KM/6Nf/+P/+lX8zYL/6NX6NX/OP+u/+4Zc9BH89YJj8mhjzH/T/AAlKrdjtAQAA</m:SyncState><m:IncludesLastItemInRange>true</m:IncludesLastItemInRange><m:Changes><t:Create><t:DistributionList><t:ItemId Id=\"AAMkADEyNjI1NjYwLTU4ZDYtNDkzOS04Yz"

log_ews_resource_proto: data KIO::TransferJob(0x1ff4070) "hmLWNlOTA1ODIzMjcyYgBGAAAAAABvZbRNcPRBTYjfzKeBgXRABwDK9FNrSpKHQbzJ/ij8KfDrAD/PewAPAADK9FNrSpKHQbzJ/ij8KfDrAD/PewoBAAA=\" ChangeKey=\"EgAAABYAAAAOodJ31gfiQYs6gAcn//exAAAAeLXZ\"/></t:DistributionList></t:Create></m:Changes></m:SyncFolderItemsResponseMessage></m:ResponseMessages><"

log_ews_resource_proto: data KIO::TransferJob(0x1ff4070) "/m:SyncFolderItemsResponse></s:Body></s:Envelope"

log_ews_resource_proto: data KIO::TransferJob(0x1ff4070) ">"

log_ews_resource_proto: data KIO::TransferJob(0x1ff4070) ""

log_ews_resource_proto: response dumped to "/tmp/ews_xmldump_l21767.xml"

log_ews_resource_request: Got SyncFolderItems response (1 changes, last included: true, state: m8hrs3)
remoteItemFetchDone

log_ews_resource: "Could not find handler for item type 4"

KCrash: Application 'akonadi_ews_resource' crashing...
KCrash: Attempting to start /usr/lib/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
QSocketNotifier: Invalid socket 7 and type 'Read', disabling...
QSocketNotifier: Invalid socket 12 and type 'Read', disabling...
zsh: suspended (signal)  /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_0

Intermittend crashes, maybe unstable connection

I'm experiencing seemingly random crashes, some of them may be related to a dropped internet connection. This is one (tho I didn't see the internet connection drop this time):

Application: akonadi_ews_resource (akonadi_ews_resource), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f7b4fb1a840 (LWP 5895))]

Thread 6 (Thread 0x7f7b4f1d8700 (LWP 5896)):
#0  0x000000350dee0d4d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x0000003510e0c952 in poll (__timeout=-1, __nfds=1, __fds=0x7f7b4f1d7c60) at /usr/include/bits/poll2.h:46
#2  _xcb_conn_wait (c=c@entry=0x24fc570, cond=cond@entry=0x24fc5b0, vector=vector@entry=0x0, count=count@entry=0x0) at /var/tmp/portage/x11-libs/libxcb-1.12/work/libxcb-1.12/src/xcb_conn.c:479
#3  0x0000003510e0f169 in xcb_wait_for_event (c=0x24fc570) at /var/tmp/portage/x11-libs/libxcb-1.12/work/libxcb-1.12/src/xcb_in.c:693
#4  0x00007f7b4f621cd9 in QXcbEventReader::run (this=0x2508340) at qxcbconnection.cpp:1337
#5  0x00000038f28af7c8 in QThreadPrivate::start (arg=0x2508340) at thread/qthread_unix.cpp:344
#6  0x000000350e607444 in start_thread (arg=0x7f7b4f1d8700) at pthread_create.c:334
#7  0x000000350dee9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f7b4e2ac700 (LWP 5897)):
#0  g_mutex_unlock (mutex=0x7f7b40000990) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gthread-posix.c:1348
#1  0x0000003510253e3e in g_main_context_acquire (context=0x7f7b40000990) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3283
#2  0x0000003510254eb5 in g_main_context_iterate (context=context@entry=0x7f7b40000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3879
#3  0x000000351025510c in g_main_context_iteration (context=0x7f7b40000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3990
#4  0x00000038f2ad92ec in QEventDispatcherGlib::processEvents (this=0x7f7b400008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00000038f2a8676a in QEventLoop::exec (this=this@entry=0x7f7b4e2abd50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00000038f28aae84 in QThread::exec (this=this@entry=0x38f4c8d940 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:507
#7  0x00000038f4c15aa5 in QDBusConnectionManager::run (this=0x38f4c8d940 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:196
#8  0x00000038f28af7c8 in QThreadPrivate::start (arg=0x38f4c8d940 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:344
#9  0x000000350e607444 in start_thread (arg=0x7f7b4e2ac700) at pthread_create.c:334
#10 0x000000350dee9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f7b4daab700 (LWP 5898)):
#0  0x000000350dedcd2d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00000035102a5380 in read (__nbytes=16, __buf=0x7f7b4daaaba0, __fd=<optimized out>) at /usr/include/bits/unistd.h:44
#2  g_wakeup_acknowledge (wakeup=0x7f7b400025b0) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gwakeup.c:210
#3  0x0000003510254a27 in g_main_context_check (context=context@entry=0x7f7b44000990, max_priority=2147483647, fds=fds@entry=0x7f7b44002e20, n_fds=n_fds@entry=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3707
#4  0x0000003510254fa0 in g_main_context_iterate (context=context@entry=0x7f7b44000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3926
#5  0x000000351025510c in g_main_context_iteration (context=0x7f7b44000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3990
#6  0x00000038f2ad92ec in QEventDispatcherGlib::processEvents (this=0x7f7b440008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#7  0x00000038f2a8676a in QEventLoop::exec (this=this@entry=0x7f7b4daaad80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#8  0x00000038f28aae84 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#9  0x00000038f28af7c8 in QThreadPrivate::start (arg=0x2554740) at thread/qthread_unix.cpp:344
#10 0x000000350e607444 in start_thread (arg=0x7f7b4daab700) at pthread_create.c:334
#11 0x000000350dee9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f7b4d2aa700 (LWP 5900)):
#0  0x00000035102a6ad9 in g_mutex_lock (mutex=mutex@entry=0x7f7b38000990) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gthread-posix.c:1336
#1  0x000000351025494e in g_main_context_check (context=context@entry=0x7f7b38000990, max_priority=<optimized out>, fds=fds@entry=0x7f7b38003020, n_fds=n_fds@entry=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3766
#2  0x0000003510254fa0 in g_main_context_iterate (context=context@entry=0x7f7b38000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3926
#3  0x000000351025510c in g_main_context_iteration (context=0x7f7b38000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3990
#4  0x00000038f2ad92ec in QEventDispatcherGlib::processEvents (this=0x7f7b380008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#5  0x00000038f2a8676a in QEventLoop::exec (this=this@entry=0x7f7b4d2a9d80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#6  0x00000038f28aae84 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#7  0x00000038f28af7c8 in QThreadPrivate::start (arg=0x25558d0) at thread/qthread_unix.cpp:344
#8  0x000000350e607444 in start_thread (arg=0x7f7b4d2aa700) at pthread_create.c:334
#9  0x000000350dee9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f7b3f5ef700 (LWP 5917)):
#0  0x000000350dedcd2d in read () at ../sysdeps/unix/syscall-template.S:84
#1  0x00000035102a5380 in read (__nbytes=16, __buf=0x7f7b3f5eeba0, __fd=<optimized out>) at /usr/include/bits/unistd.h:44
#2  g_wakeup_acknowledge (wakeup=0x25b8e80) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gwakeup.c:210
#3  0x0000003510254a27 in g_main_context_check (context=context@entry=0x7f7b34000990, max_priority=2147483647, fds=fds@entry=0x7f7b34003020, n_fds=n_fds@entry=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3707
#4  0x0000003510254fa0 in g_main_context_iterate (context=context@entry=0x7f7b34000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3926
#5  0x000000351025510c in g_main_context_iteration (context=0x7f7b34000990, may_block=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3990
#6  0x00000038f2ad92ec in QEventDispatcherGlib::processEvents (this=0x7f7b340008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#7  0x00000038f2a8676a in QEventLoop::exec (this=this@entry=0x7f7b3f5eed80, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#8  0x00000038f28aae84 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#9  0x00000038f28af7c8 in QThreadPrivate::start (arg=0x2670610) at thread/qthread_unix.cpp:344
#10 0x000000350e607444 in start_thread (arg=0x7f7b3f5ef700) at pthread_create.c:334
#11 0x000000350dee9dad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f7b4fb1a840 (LWP 5895)):
[KCrash Handler]
#6  0x00000000004aece9 in QString::QString (other=..., this=0x7ffc5aed9450) at /usr/include/qt5/QtCore/qstring.h:898
#7  EwsRequest::Response::responseCode (this=0x0) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.1/work/akonadi-ews-0.8.1/ewsclient/ewsrequest.h:46
#8  EwsSubscriptionManager::getEventsRequestFinished (this=0x2658380, job=0x3d59440) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.1/work/akonadi-ews-0.8.1/ewssubscriptionmanager.cpp:205
#9  0x00000038f2ab19ee in QtPrivate::QSlotObjectBase::call (a=0x7ffc5aed9630, r=0x2658380, this=0x31fa860) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:130
#10 QMetaObject::activate (sender=sender@entry=0x3d59440, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc5aed9630) at kernel/qobject.cpp:3723
#11 0x00000038f2ab1f87 in QMetaObject::activate (sender=sender@entry=0x3d59440, m=m@entry=0x38f589a2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc5aed9630) at kernel/qobject.cpp:3602
#12 0x00000038f5640272 in KJob::result (this=this@entry=0x3d59440, _t1=_t1@entry=0x3d59440) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0_build/src/lib/moc_kjob.cpp:568
#13 0x00000038f5641a41 in KJob::finishJob (this=this@entry=0x3d59440, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0/src/lib/jobs/kjob.cpp:109
#14 0x00000038f5643a2a in KJob::emitResult (this=this@entry=0x3d59440) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0/src/lib/jobs/kjob.cpp:293
#15 0x00000000004f5b37 in EwsRequest::requestResult (this=0x3d59440, job=0x3d7f7b0) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.1/work/akonadi-ews-0.8.1/ewsclient/ewsrequest.cpp:140
#16 0x00000000005102d4 in EwsRequest::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-misc/akonadi-ews-0.8.1/work/akonadi-ews-0.8.1_build/ewsclient/moc_ewsrequest.cpp:77
#17 0x00000038f2ab1262 in QMetaObject::activate (sender=sender@entry=0x3d7f7b0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc5aed98f0) at kernel/qobject.cpp:3740
#18 0x00000038f2ab1f87 in QMetaObject::activate (sender=sender@entry=0x3d7f7b0, m=m@entry=0x38f589a2e0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffc5aed98f0) at kernel/qobject.cpp:3602
#19 0x00000038f5640272 in KJob::result (this=this@entry=0x3d7f7b0, _t1=_t1@entry=0x3d7f7b0) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0_build/src/lib/moc_kjob.cpp:568
#20 0x00000038f5641a41 in KJob::finishJob (this=this@entry=0x3d7f7b0, emitResult=emitResult@entry=true) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0/src/lib/jobs/kjob.cpp:109
#21 0x00000038f5643a2a in KJob::emitResult (this=this@entry=0x3d7f7b0) at /var/tmp/portage/kde-frameworks/kcoreaddons-5.28.0/work/kcoreaddons-5.28.0/src/lib/jobs/kjob.cpp:293
#22 0x00000030e68c7742 in KIO::SimpleJob::slotFinished (this=this@entry=0x3d7f7b0) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/simplejob.cpp:230
#23 0x00000030e68d1336 in KIO::TransferJob::slotFinished (this=0x3d7f7b0) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/transferjob.cpp:166
#24 0x00000030e68c5fcb in KIO::SimpleJob::slotError (this=0x3d7f7b0, err=<optimized out>, errorText=...) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/simplejob.cpp:243
#25 0x00000030e68c61df in KIO::SimpleJob::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0_build/src/core/moc_simplejob.cpp:102
#26 0x00000038f2ab1262 in QMetaObject::activate (sender=sender@entry=0x36bf790, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffc5aed9cc0) at kernel/qobject.cpp:3740
#27 0x00000038f2ab1f87 in QMetaObject::activate (sender=sender@entry=0x36bf790, m=m@entry=0x30e6b7b180 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffc5aed9cc0) at kernel/qobject.cpp:3602
#28 0x00000030e68a7796 in KIO::SlaveInterface::error (this=this@entry=0x36bf790, _t1=149, _t2=...) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0_build/src/core/moc_slaveinterface.cpp:412
#29 0x00000030e68aabf7 in KIO::SlaveInterface::dispatch (this=0x36bf790, _cmd=<optimized out>, rawdata=...) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/slaveinterface.cpp:192
#30 0x00000030e68a7d97 in KIO::SlaveInterface::dispatch (this=0x36bf790) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/slaveinterface.cpp:89
#31 0x00000030e68ac4f6 in KIO::Slave::gotInput (this=0x36bf790) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/slave.cpp:398
#32 0x00000030e6937785 in KIO::Slave::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0_build/src/core/moc_slave.cpp:87
#33 0x00000038f2ab1262 in QMetaObject::activate (sender=0x3e0cd40, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3740
#34 0x00000038f2ab1f87 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x30e6b79c00 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3602
#35 0x00000030e684e54f in KIO::Connection::readyRead (this=<optimized out>) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0_build/src/core/moc_connection_p.cpp:142
#36 KIO::ConnectionPrivate::dequeue (this=0x40805c0) at /var/tmp/portage/kde-frameworks/kio-5.28.0/work/kio-5.28.0/src/core/connection.cpp:45
#37 0x00000038f2ab2a6a in QObject::event (this=0x3e0cd40, e=<optimized out>) at kernel/qobject.cpp:1263
#38 0x00000030e115b9fc in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x3e0cd40, e=0x47550c0) at kernel/qapplication.cpp:3799
#39 0x00000030e1163242 in QApplication::notify (this=0x7ffc5aeda670, receiver=0x3e0cd40, e=0x47550c0) at kernel/qapplication.cpp:3556
#40 0x00000038f2a885e8 in QCoreApplication::notifyInternal2 (receiver=0x3e0cd40, event=event@entry=0x47550c0) at kernel/qcoreapplication.cpp:988
#41 0x00000038f2a8a613 in QCoreApplication::sendEvent (event=0x47550c0, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#42 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x24c7da0) at kernel/qcoreapplication.cpp:1649
#43 0x00000038f2a8ab78 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#44 0x00000038f2ad8ef3 in postEventSourceDispatch (s=0x252f040) at kernel/qeventdispatcher_glib.cpp:276
#45 0x0000003510254d5d in g_main_dispatch (context=0x7f7b480016f0) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3203
#46 g_main_context_dispatch (context=context@entry=0x7f7b480016f0) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3856
#47 0x0000003510255060 in g_main_context_iterate (context=context@entry=0x7f7b480016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3929
#48 0x000000351025510c in g_main_context_iteration (context=0x7f7b480016f0, may_block=1) at /var/tmp/portage/dev-libs/glib-2.50.1/work/glib-2.50.1/glib/gmain.c:3990
#49 0x00000038f2ad92d7 in QEventDispatcherGlib::processEvents (this=0x253fc40, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#50 0x00000038f2a8676a in QEventLoop::exec (this=this@entry=0x7ffc5aeda5d0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:210
#51 0x00000038f2a8ea2c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#52 0x00000030e06f489c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1639
#53 0x00000030e115b955 in QApplication::exec () at kernel/qapplication.cpp:2975
#54 0x00000030f2828d5e in Akonadi::ResourceBase::init (r=r@entry=0x254da50) at /var/tmp/portage/kde-apps/akonadi-16.08.2/work/akonadi-16.08.2/src/agentbase/resourcebase.cpp:605
#55 0x00000000004aab17 in Akonadi::ResourceBase::init<EwsResource> (argc=3, argv=<optimized out>) at /usr/include/KF5/AkonadiAgentBase/resourcebase.h:196
#56 0x000000350de206d0 in __libc_start_main (main=0x44ab60 <main(int, char**)>, argc=3, argv=0x7ffc5aeda798, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc5aeda788) at libc-start.c:289
#57 0x000000000044f6e9 in _start ()

EWS resource fails to retrieve folder tree

Imported from KDE bug 78629.

Vincent Fortier says:

In this case I manually entered the EWS URL and hit Try connect. Which i found simpler to evolution as the user don't really care about the underlying UUID type OAB URL. Although a connection successful may be appropriate? It ended up not adding any folder within kmail for the new account (maybie a bug related to kmail and totally unrelated to your new feature, will further investigate?). Although from the subscription tab I can select my various folders and as well, it says "ready" under it in the reception tab.

Moving emails forth and back to the Sent folder updates emails date (needs confirmation)

I recently realized that when moving a Sent email forth to another folder and then back again to the Sent folder, its date (let's say an email sent 2 weeks ago) is replaced by the date of the day in which the email is moved (let's say today).

This behavior occurs with my "Sent" emails, and the only way to fix this issue was to connect via imap and move forth and back all Sent emails, so the original date was restablished.

Could you please test whether this is a general issue? I am not 100% sure if this is related to akonadi-ews or to the Exchange/Office365 server itself (I recently migrated from Exchange to Office 365).

Also, I am not sure if this behavior happens also for folders other than Sent. I didn't experience such an issue with other folders, but I'm not sure if I moved emails from other folders. I would prefer not to test this myself as this is a production email, and now everything seems back to normal.

' Failed to process EWS request - HTTP code 401'

Kubuntu 16.04
Linux 4.8.0-36-generic #36~16.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

akonadi-ews_0.8.1-1_amd64.deb

When i try to login to the address https://owa..com/ews/exchange.asmx
I get ' Failed to process EWS request - HTTP code 401'

I have tried many different ways to do this...
domain\username
domain\emailaddress
and many more none works ...

can you tell me what i am doing wrong ... or do you need more info to help me out here?

Single-day events show up as two days

When creating a new all-day event in Outlook for a single day, it shows up as occupying two days in KOrganizer.

This seems like a bug in akonadi-ews, perhaps because of a misinterpretation of the 00:00-00:00 timespan?

Mail is no longer retrieved

I am using the synfolderhierarchy-workaround branch, which enabled me to actually see the folders in my mail account and to manipulate them.

Everything worked fine for a while, but for a few days I do not get new e-mails and can not see the current ones.

All I see is the message, that "the folder content is retrieved".

Another symptom: If I right-click on the account in the folder panel in kmail, I can no longer access the server side subscription menu item, and the local subscription dialog does no let me change anything. The "ok" button is simply grayed out.

When I enable the Akonadi Debugger, the only messages appearing when I enter an exchange folder and select an unread message are:


akonadi_ews_resource_0 (0x283e080) 36 { Command: "FetchCollections" Collections: "UID 70" Depth: "0" Resource: "akonadi_ews_resource_0" Mimetypes: "()" Ancestors Depth: "1" Ancestors Attributes: "QSet()" Enabled: "false" Sync: "true" Display: "false" Index: "false" Status: "false" }

akonadi_ews_resource_0 (0x283e080) 36 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "70" Name: "Posteingang" Parent ID: "48" Remote ID: "INBOX" Remote Revision: "AQAAABYAAACaO5Mk+OpdSZ0IKfynfzpRAAIAK4ol" Resource: "akonadi_ews_resource_0" Mimetypes: "(inode/directory, message/rfc822)" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "false" Interval: "1" Cache Timeout: "-1" Sync on Demand: "true" Local Parts: "(ALL, RFC822)" } Ancestors: { { ID: "48" Remote ID: "AAMkAGZkZTEzZWU4LWZjNWMtNDRhYy1hOTY1LWE0NDA1ZjY5MmIxNAAuAAAAAACjILxiRkEsQYwd0fD6h+1VAQCaO5Mk+OpdSZ0IKfynfzpRAAAAAAAKAAA=" Name: "HAVI Exchange" Attributes: "QMap()" } } Attributes: "QMap((AccessRights, a)(ENTITYDISPLAY, ("" "mail-folder-inbox" "" ()))(SpecialCollectionAttribute, inbox))" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }

akonadi_ews_resource_0 (0x283e080) 36 { Response: "FetchCollections" Error Code: "0" Error Msg: "" ID: "-1" Name: "" Parent ID: "-1" Remote ID: "" Remote Revision: "" Resource: "" Mimetypes: "()" Statistics: { Count: "-1" Unseen: "-1" Size: "-1" } Search Query: "" Search Collections: "QVector()" Cache Policy: { Inherit: "true" Interval: "-1" Cache Timeout: "-1" Sync on Demand: "false" Local Parts: "()" } Ancestors: { } Attributes: "QMap()" Display: "Undefined" Sync: "Undefined" Index: "Undefined" Enabled: "true" Virtual: "false" Referenced: "false" }


The first message is printed in red.

Every 30 seconds the same messages appear.

I have tried both streaming notifications and time based polling, to no avail. Letting the resource to sync everything through the Akonadi Console triggers nothing.

Plugin documentation

Sorry to use a bug report in order to contact.

It seems that you have implemented a kmailtransport plugin.

I plan to do the same in order to replace the deleted sendmail plugin for kmail.

Could you point me to documentation of how to implement ?

Thank you

Bastien

Cannot open any emails after upgrading KDE PIM from 16.08 to 16.12

I referenced this problem in #20 and #22 but I figured it was discrete enough from the titles of those issues to open a new ticket.

Ever since upgrading to akonadi 16.12 and KMail 5.4.0 around two weeks ago, I can no longer open any of the emails I have in my list. The list of emails still loads just fine, and most of the time checking mail does eventually download the email list correctly.

However, whenever I click on an email, the message pane just says "Retrieving Folder Contents Please wait . . .". At the bottom of the KMail window I frequently get a message that says "Unable to fetch item from backend (collection -1): Unable to retrieve item from resource: Did not receive a reply. Possible..." and nothing else happens.

I also noticed that in the regular akonadi logs, if I open an email that it thinks I have already viewed it never seems to send any requests to the Exchange resource to collect the email text like it used to on previous versions of akonadi. I even turned on the verbose logging and I still don't get anything that appears to be useful on previously read emails (i.e. I get nothing other than the regular periodic checks that it does).

With the verbose logging on, if I click on an email that KMail thinks is new, I get this in the log every time:

log_ews_resource_proto: "<?xml version=\"1.0\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><soap:Header><t:RequestServerVersion Version=\"Exchange2007_SP1\"/></soap:Header><soap:Body><m:GetEvents><m:SubscriptionId>FQBleDEuY29ycC5kaWdpY2VydC5jb20QAAAA7hRhMqARlUO7xbBiV58y0bJNFcyTNdQIEAAAAFr/j08Gc6dGhTMgyRV0eTM=</m:SubscriptionId><m:Watermark>AQAAAGH6mPzTFJ9Mmq1JdXMMZ2XRcEPAAAAAAE=</m:Watermark></m:GetEvents></soap:Body></soap:Envelope>\n"
log_ews_resource_proto: data KIO::TransferJob(0x151aa70) "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Header><h:ServerVersionInfo MajorVersion=\"15\" MinorVersion=\"0\" MajorBuildNumber=\"1236\" MinorBuildNumber=\"1\" Version=\"V2_23\" xmlns:h=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/></s:Header><s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><m:GetEventsResponse xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\"><m:ResponseMessages><m:GetEventsResponseMessage ResponseClass=\"Success\"><m:ResponseCode>NoError</m:ResponseCode><m:Notification><t:SubscriptionId>FQBleDEuY29ycC5kaWdpY2VydC5jb20QAAAA7hRhMqARlUO7xbBiV58y0bJNFcyTNdQIEAAAAFr/j08Gc6dGhTMgyRV0eTM=</t:SubscriptionId><t:PreviousWatermark>AQAAAGH6mPzTFJ9Mm7q1JdXMMZ2XRcEPAAAAAAE=</t:PreviousWatermark><t:MoreEvents>false</t:MoreEvents><t:StatusEvent><t:Watermark>AQAAAGH6mPzTFJ9Mm7q1JdXMMZ0JRsEPAAAAAAE=</t:Watermark></t:StatusEvent></m:Notification></m:GetEventsResponseMessage></m:ResponseMessages></m:GetEventsResponse"
log_ews_resource_proto: data KIO::TransferJob(0x151aa70) "></s:Body></s:"
log_ews_resource_proto: data KIO::TransferJob(0x151aa70) "Envelope>"
log_ews_resource_proto: data KIO::TransferJob(0x151aa70) ""
log_ews_resource_proto: response dumped to "/tmp/akonadi-ews-XsHQ4ys/ews_xmldump_QF13791.xml"
log_ews_resource:  StatusEvent
log_ews_resource_request: Got GetEvents response (1 notifications, 1 events)

And the response dump:

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="1236" MinorBuildNumber="1" Version="V2_23" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:GetEventsResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:GetEventsResponseMessage ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:Notification><t:SubscriptionId>FQBleDEuY29ycC5kadpY2ydC5jb20QAAA7hRhMqARlUO7xbBiV58y0bJNFcyTNdQIEAAAAFr/j08Gc6dGhTMgyRV0eTM=</t:SubscriptionId><t:PreviousWatermark>AQAAAGH6mzTFJ9Mm7q1JdXMMZ2RcEPAAAAAE=</t:PreviousWatermark><t:MoreEvents>false</t:MoreEvents><t:StatusEvent><t:Watermark>AQAAGH6mPzTFJ9Mmq1JdXMMZJRsEPAAAAAE=</t:Watermark></t:StatusEvent></m:Notification></m:GetEventsResponseMessage></m:ResponseMessages></m:GetEventsResponse></s:Body></s:Envelope>

(I modified a number of the strings in there in case you notice they don't match up any more or something, I can provide an unedited response via email if necessary)

Afterwards, nothing changes. The pane shows nothing and the same message appears at the bottom of the KMail window.

Ask for compile the code

Hello,

first: really thanks for that great work 👍 I'am using the DEB-Packages in KDE-Neon. So i would like compile the actual code and build my own packages.

Is there a little manual to do this? I'am right when i say i must install NEON with DEV packages? So normal Ubuntu with this dev packages from the default sources do not work? And maybe some commands like cmake.... sorry i'am not a dev!

Best Regards

Crash after resume from suspend to disk

I just did "echo disk > /sys/power/state" and the system went to sleep. After resuming, akonadi-ews-resource crashed and dumped a lot of xml files to /tmp.

Include packaging source

It would be cool to have sources for building .deb/.rpm packages in the repo. Among other things this would allow to automate artifacts building with each release (Travis, etc).

Failed to process EWS request - HTTP code 400

When I try to add an EWS resource I get the following error.

Here I have configured the resource using OAtuh. The authentication seems to work but than I get a error 400 without further motivations.

Server autodiscovery fails, so I have used this link: https://myserver.com/ews/exchange.asmx

$ QT_LOGGING_RULE=log_ews_resource_request.debug=true /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_0                                                       
Please register the custom scheme 'urn' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
ERROR "Failed to process EWS request - HTTP code 400"
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400
ERROR "Failed to process EWS request - HTTP code 400"
Please register the custom scheme 'urn' via QWebEngineUrlScheme::registerScheme() before installing the custom scheme handler.
org.kde.pim.ews.client: Starting OAuth2 authentication
org.kde.pim.ews.client: Launching browser for authentication
org.kde.pim.ews.client: PKeyAuth certificates not found
js: Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead.
qt.xkb.compose: failed to create compose table
org.kde.pim.ews.client: Authentication succeeded
org.kde.pim.ews.client: Failed to process EWS request - HTTP code 400

Support Microsoft Exchange Proxy Settings (Outlook Anywhere)

Many Exchange server are not directly exposed to the internet. Instead of using a VPN, Outlook can connect to such servers via a proxy server using HTTP, this feature is called Outlook Anywhere my Microsoft.

However, akonadi-ews in its current version does not allow to enter proxy settings. Is there any plan to implement proxy feature in akonadi-ews?

See here for reference to this feature

Kmail is not syncing removed messages with Exchange Server and not autoupdate

Everything seemed to work now after i removed some subfolders on my email server.
But following issues are now.

First: the setting is, that akonadi ews should check for new mails every 0,5 minutes, but i always have to reload the folders for checking new mails.

The other and most important thing is, that when i delete mails from the inbox and move inside of kmail to the trash it not syncing with the exchange server and on my outlook webinterface and the smartphone, the mails are there.
When i go into the advance options of the Akonadi EWS and clear the folder Cache the mails coming back into my kmail inbox.
I can send emails, i can get them by using reload, but i cant move or delete them on kmail.

im using the closed testing source self compiled, because the Master didnt worked for me.

Failing to connect to Exchange server

Pretty newbie issue/question - sorry about that.

I compiled the agent from source on Kubuntu 15.10 (KDE Frameworks 5.18.0, Qt 5.5.1). However I am failing to connect to Exchange server. Every attempt ends up with "Failed to process EWS request - HTTP code 401". I am using for several month DavMail so it should work. I have tried the EWS URL like this https://autodiscover.xxxxxxx.zzz/ews/exchange.asmx (that's how it's done in DavMail - AFAIK workaround) and like this: https://autodiscover.xxxxxxx.zzz/ews/ The error code would suggest the username/password is wrong accessing the URL? But I'm sure it's right. Can it be an issue with NTLMv2 as you suggest?

How can I enable some logging that is there in the code and where to see results? No luck with Debugger in Akonadi Console.

Move to KDE infrastructure

Is it planned to move this project to the KDE infrastructure?

Since it's a (very) useful addition to the KDE PIM stack, I'd say it should be in the same place.

Unable to send mail, configure ewsmtaresource on 17.04

Hi,

sorry if this is the wrong place to ask, but I'm having a hard time getting mail delivery to work. How do I configure Kmail to use the ewsmtaresource, or what else has to be done to make it work?

Things I tried:

  • add the ewsmtaresource using akonadiconsole (it wasn't running before)
  • try to add a sending account in KMail, but it seems to insist on SMTP and I do not see any way to add anything other than SMTP.

I'm using Kmail 17.04 with latest akonadi-ews git

It took more than an hour to receive sent emails via Microsoft Exchange Web Services (EWS)

It took more than an hour to receive sent emails via the Microsoft Exchange Web Services (EWS). This is related to the following comment:

https://micreabog.wordpress.com/2016/05/01/akonadi-resource-for-microsoft-exchange-web-services-ews/#comment-5

The same issue occurred in two identical tests. Both tests had no body, neither attachments (but were identified by a distinct subject).

In contrast, the same typeof email arrived within a minute if sent through the SMTP server (which I use for now as a workaround).

Please let me know if you would like me to help doing further testing.

Can't install on Arch Linux (Makepkg was unable to build akonadi-ews)

Scanning dependencies of target akonadi_ewsmta_resource
[ 94%] Building CXX object CMakeFiles/akonadi_ewsmta_resource.dir/ewsmtaresource.cpp.o
In file included from /tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp:20:0:
/tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.h:41:10: warning: by ‘virtual void EwsMtaResource::retrieveItems(const Akonadi::Collection&)’ [-Woverloaded-virtual]
void retrieveItems(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
^~~~~~~~~~~~~
/tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp: In member function ‘bool EwsMtaResource::connectEws()’:
/tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp:58:32: error: ‘messageSent’ is not a member of ‘OrgKdeAkonadiEwsResourceInterface’
connect(mEwsResource, &OrgKdeAkonadiEwsResourceInterface::messageSent, this, &EwsMtaResource::messageSent);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp: In member function ‘virtual void EwsMtaResource::sendItem(const Akonadi::Item&)’:
/tmp/yaourt-tmp-alex/aur-akonadi-ews/src/akonadi-ews-0.8.0/ewsmtaresource.cpp:85:19: error: ‘class OrgKdeAkonadiEwsResourceInterface’ has no member named ‘sendMessage’
mEwsResource->sendMessage(item.remoteId(), mimeContent);
^~~~~~~~~~~
make[2]: *** [CMakeFiles/akonadi_ewsmta_resource.dir/build.make:106: CMakeFiles/akonadi_ewsmta_resource.dir/ewsmtaresource.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/akonadi_ewsmta_resource.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
==> ERROR: A failure occurred in package().
Aborting...
==> ERROR: Makepkg was unable to build akonadi-ews.
==> Restart building akonadi-ews ? [y/N]
==> ------------------------------------
==>

Akonadi passes Android as OS to exchange

Passing Android as OS results in a request to secure the PC which is useless on Linux.
Accepting the next steps ends in the Android store to install an app to secure the phone.
Why is akonadi ews coming from Linux has to mimic Android.
The connection from there fails.

Server-side address autocompletion

In this projects README, you write as planned feature:

Server-side address autocompletion (will need to sort out some KDE PIM limitations)

What are those limitations and is someone working on those? Can you please provide some details? What help to do you require?

Can connect to exchange (sbs 2011) sync ok, but can't view mails

Hello,

i'am using here KDE-Neon 5.10 with Kmail 5.5.2. I have a connection to the Exchange Server, sync all Mail fine, but can't see a mail. Only the message "Folder Index is loading, please wait".
Is there a option on Client/Server that i can solve the problem.

Very Thanks :)

Failed to read POX response - unknown protocol 'EXHTTP'

While this worked just fine until yesterday, this morning the akonadi resource stays in offline mode even though sometimes is able to read folders and get new emails.

The autodiscover button show this message:

Failed to read POX response - unknown protocol 'EXHTTP'

Starting akonadi-ews manually from the command line shows this:

LANG=C /usr/bin/akonadi_ews_resource --identifier akonadi_ews_resource_0
Pass a valid window to KWallet::Wallet::openWallet().
Root folder is  EwsId(Top of Information Store, changeKey: AQAAABYAAAAA2S8yaDtQR6BZmWGLxhu4AABP63My)
log_ews_resource: Both tag lists in version 0 - not syncing
false
false
Root folder is  EwsId(Top of Information Store, changeKey: AQAAABYAAAAA2S8yaDtQR6BZmWGLxhu4AABP63My)
log_ews_resource: Both tag lists in version 0 - not syncing
false
log_ews_resource: Root collection fetched:  Collection ID: 15    remote ID: AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEIAAA=
   name: company
   url: QUrl(akonadi:?collection=15)
   parent: 0
   resource: akonadi_ews_resource_0
   rights: QFlags()
   contents mime type: (message/rfc822, inode/directory)
   isVirtual: false
    CachePolicy:
   inherit: true
   interval: -1
   timeout: -1
   sync on demand: false
   local parts: (ALL)
    CollectionStatistics:
   count: -1
   unread count: -1
   size: -1
false
false
log_ews_resource: Registering folder INBOX(39) as special collection 1
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAELAAA=(25) as special collection 2
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEJAAA=(19) as special collection 3
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEKAAA=(42) as special collection 4
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEPAAA=(41) as special collection 5
log_ews_resource: Failed to read EWS request - expected a child element in Folders element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Both tag lists in version 0 - not syncing
log_ews_resource: Registering folder INBOX(39) as special collection 1
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAELAAA=(25) as special collection 2
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEJAAA=(19) as special collection 3
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEKAAA=(42) as special collection 4
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEPAAA=(41) as special collection 5
Root folder is  EwsId(Top of Information Store, changeKey: AQAAABYAAAAA2S8yaDtQR6BZmWGLxhu4AABP63My)
log_ews_resource: Both tag lists in version 0 - not syncing
false
log_ews_resource: Failed to read EWS request - expected a child element in Folders element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Registering folder INBOX(39) as special collection 1
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAELAAA=(25) as special collection 2
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEJAAA=(19) as special collection 3
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEKAAA=(42) as special collection 4
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEPAAA=(41) as special collection 5
log_ews_resource: Both tag lists in version 0 - not syncing


retrieveItem
log_ews_resource: Failed to process EWS request: Timeout on server
owa.company.com: Socket operation timed out
ERROR "Failed to process EWS request: Timeout on server\nowa.company.com: Socket operation timed out"
log_ews_resource: Failed to process EWS request: Timeout on server
owa.company.com: Socket operation timed out
ERROR "Failed to process EWS request: Timeout on server\nowa.company.com: Socket operation timed out"
EwsMailHandler::setItemPayload
0 attachments
Root folder is  EwsId(Top of Information Store, changeKey: AQAAABYAAAAA2S8yaDtQR6BZmWGLxhu4AABP63My)
log_ews_resource: Both tag lists in version 0 - not syncing
false
false
false
log_ews_resource: Root collection fetched:  Collection ID: 15    remote ID: AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEIAAA=
   name: company
   url: QUrl(akonadi:?collection=15)
   parent: 0
   resource: akonadi_ews_resource_0
   rights: QFlags()
   contents mime type: (message/rfc822, inode/directory)
   isVirtual: false
    CachePolicy:
   inherit: true
   interval: -1
   timeout: -1
   sync on demand: false
   local parts: (ALL)
    CollectionStatistics:
   count: -1
   unread count: -1
   size: -1
log_ews_resource: Failed to read EWS request - expected a child element in Folders element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Failed to read EWS request - expected GetFolderResponse element.
log_ews_resource: Registering folder INBOX(39) as special collection 1
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAELAAA=(25) as special collection 2
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEJAAA=(19) as special collection 3
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEKAAA=(42) as special collection 4
log_ews_resource: Registering folder AAMkAGYyZTcyOTcxLWQxOWMtNDlkMC1hMjVjLWVhZTlmMTAwYTRhNAAuAAAAAADauHaq+CerQaw+i7eSZBr8AQAA2S8yaDtQR6BZmWGLxhu4AAAAAAEPAAA=(41) as special collection 5
log_ews_resource: Both tag lists in version 0 - not syncing

If needed the debug log is at https://paste.kde.org/pd6ybrwo2/wt1baz (password akonadi).

Thanks

Error response is not handled correctly in EwsGetFolderRequest

After I deleted a folder from outside kontact (i.e. a different kontact on another computer), akonadi-ews was no longer able to synchronize the account.

The server responds with the following message (shortened and reformatted):

<?xml version="1.0" encoding="utf-8"?>                                                                                                            
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">                                                                                  
  <s:Header>                                                                                                                                      
    <h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MajorVersion="15" MinorVersion="1" MajorBuildNumber="1034" MinorBuildNumber="26" Version="V2017_01_07"/>                                                                            
  </s:Header>                                                                                                                                     
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">                                     
    <m:GetFolderResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">                                                                                                                                
      <m:ResponseMessages>                                                                                                                        
        <m:GetFolderResponseMessage ResponseClass="Success">                                                                                      
          <m:ResponseCode>NoError</m:ResponseCode>                                                                                                
          <m:Folders>                                                                                                                             
            <t:Folder>                                                                                                                            
              <t:FolderId Id="AAMkAGU0NjRhMTNiLTcxNWItNDQ2YS05OGQ1LWY0N2QyOTE3ZGE0OAAuAAAAAABVndXjmYa2TJeya3R3NcK5AQDbPMzgbs3fSoYAI/xeTJ7HAAAAabzMAAA=" ChangeKey="AQAAABYAAADVV7DQctuIRYeYB4MK+03/AAHv5W0h"/>                                                                                      
            </t:Folder>                                                                                                                           
          </m:Folders>                                                                                                                            
        </m:GetFolderResponseMessage>                                                                                                             
        <m:GetFolderResponseMessage ResponseClass="Error">                                                                                        
          <m:MessageText>The specified object was not found in the store., The process failed to get the correct properties.</m:MessageText>      
          <m:ResponseCode>ErrorItemNotFound</m:ResponseCode>                                                                                      
          <m:DescriptiveLinkKey>0</m:DescriptiveLinkKey>                                                                                          
          <m:Folders/>                                                                                                                            
        </m:GetFolderResponseMessage>                                                                                                             
        <m:GetFolderResponseMessage ResponseClass="Success">                                                                                      
          <m:ResponseCode>NoError</m:ResponseCode>                                                                                                
          <m:Folders>                                                                                                                             
            <t:Folder>                                                                                                                            
              <t:FolderId Id="AAMkAGU0NjRhMTNiLTcxNWItNDQ2YS05OGQ1LWY0N2QyOTE3ZGE0OAAuAAAAAABVndXjmYa2TJeya3R3NcK5AQDbPMzgbs3fSoYAI/xeTJ7HAAAAafAvAAA=" ChangeKey="AQAAABYAAADVV7DQctuIRYeYB4MK+03/AACZqJhD"/>                                                                                      
            </t:Folder>                                                                                                                           
          </m:Folders>                                                                                                                            
        </m:GetFolderResponseMessage>                                                                                                             
      </m:ResponseMessages>                                                                                                                       
    </m:GetFolderResponse>                                                                                                                        
  </s:Body>                                                                                                                                       
</s:Envelope>

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.