Change how WebDAV discovery logins to the server
When I go to Edit→Accounts→Add Calendar→Caldav and enter as server https://milter.aegee.org and as user aaa@milter.aegee.org, click on Search and give as password abc , Evolution asks for password and shows the found calendar in the “Choose a calendar” dialog. When Evolution is run as ESR_DEBUG=1 WEBDAV_DEBUG=all CALDAV_DEBUG=1 CARDDAV_DEBUG=1 evolution
, I see that it calls PROPFIND / and PROPFIND /.well-known/caldav on host milter.aegee.org .
If I go to Edit→Accounts→Add Collection account and enter as email address aaa@milter.aegee.org I expect that the same will happen: the SRV records will be skipped, as they do not exist, the IMAP account will be skipped, since milter.aegee.org:143 does not present a certificate with SubjectAlternativeName milter.aegee.org and Evolution will call PROPFIND /.well-known/caldav on Host:milter.aegee.org . The logs of Evolution show no HTTP calls and the “New Collection Account” dialog shows “Found no candidates”.
If I click on Advanced options, enter as server https://milter.aegee.org, Evolution requires password to continue for CalDAV/CardDAV. It then does the respective HTTP calls, but once the server wants a password, by returning:
> PROPFIND /dav/calendars HTTP/1.1
> Soup-Debug-Timestamp: 1567775289
> Soup-Debug: EWebDAVSession 1 (0x11d9940), SoupMessage 2 (0x7fa07c48cb90), SoupSocket 3 (0x1e1a4d0), restarted
> Host: mail.aegee.org
> User-Agent: Evolution/3.34.0
> Connection: close
> Cache-Control: no-cache
> Pragma: no-cache
> Depth: 0
> Content-Type: application/xml; charset="utf-8"
> Accept-Language: en-us, en;q=0.9
> Content-Length: 227
> Authorization: Basic [aaa:***]
>
> <propfind xmlns="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
> <prop>
> <resourcetype/>
> <current-user-principal/>
> <principal-URL/>
> <c:calendar-home-set/>
> <c:calendar-user-address-set/>
> </prop>
> </propfind>
< HTTP/1.1 401 Unauthorized
< Soup-Debug-Timestamp: 1567775290
< Soup-Debug: SoupMessage 2 (0x7fa07c48cb90)
< Server: nginx
< Date: Fri, 06 Sep 2019 13:08:10 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 427
< Connection: close
< Vary: Accept-Encoding
< WWW-Authenticate: Basic realm="AEGEE.ORG"
< WWW-Authenticate: Negotiate
<
> PROPFIND /dav/calendars HTTP/1.1
> Soup-Debug-Timestamp: 1567775290
> Soup-Debug: EWebDAVSession 1 (0x11d9940), SoupMessage 2 (0x7fa07c48cb90), SoupSocket 4 (0x1e1a330), restarted
> Host: mail.aegee.org
> User-Agent: Evolution/3.34.0
> Connection: close
> Cache-Control: no-cache
> Pragma: no-cache
> Depth: 0
> Content-Type: application/xml; charset="utf-8"
> Accept-Language: en-us, en;q=0.9
> Content-Length: 227
> Authorization: Basic [aaa:***]
>
> <propfind xmlns="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
> <prop>
> <resourcetype/>
> <current-user-principal/>
> <principal-URL/>
> <c:calendar-home-set/>
> <c:calendar-user-address-set/>
> </prop>
> </propfind>
< HTTP/1.1 401 Unauthorized
< Soup-Debug-Timestamp: 1567775290
< Soup-Debug: SoupMessage 2 (0x7fa07c48cb90)
< Server: nginx
< Date: Fri, 06 Sep 2019 13:08:10 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 427
< Connection: close
< Vary: Accept-Encoding
< WWW-Authenticate: Basic realm="AEGEE.ORG"
< WWW-Authenticate: Negotiate
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>401 Unauthorized</title><
/head><body><h1>Unauthorized</h1><p>Authentication failed</p><hr><address>Cyrus-HTTP/3.0.11-58-g47c16b669-dirty Cyrus-SASL/2.1.27 OpenSSL/1.1 Zlib
/1.2.11 Brotli/1.0.7 LibXML/2.9.9 SQLite/3.29.0 LibiCal/3.0 ICU4C/63.1 Jansson/2.12 Server at 127.0.0.3 Port 80</address></body></html>
Evolution shows again nothing found.
> Authorization: Basic [aaa:***]
is misleading, it must be > Authorization: Basic [aaa@milter.aegee.org:***]
There are two PROPFIND /dav/calendars calls. On the first, I do not see body in the logs.
Trying with CURL:
curl -u aaa@milter.aegee.org:abc -HDepth:0 -XPROPFIND -HContent-Type:application/xml \
--data "<?xml version='1.0' encoding='UTF-8' ?>
<propfind xmlns='DAV:' xmlns:CAL='urn:ietf:params:xml:ns:caldav'><prop>
<resourcetype/><current-user-principal/><principal-URL/><CAL:calendar-home-set/><CAL:calendar-user-address-set/>
</prop></propfind>" https://mail.aegee.org/dav/calendars/
returns correct data, while
curl -u aaa:abc -HDepth:0 -XPROPFIND -HContent-Type:application/xml \
--data "<?xml version='1.0' encoding='UTF-8' ?>
<propfind xmlns='DAV:' xmlns:CAL='urn:ietf:params:xml:ns:caldav'><prop>
<resourcetype/><current-user-principal/><principal-URL/><CAL:calendar-home-set/><CAL:calendar-user-address-set/>
</prop></propfind>" https://mail.aegee.org/dav/calendars/
(without domain after the username) returns: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>401 Unauthorized</title></head><body><h1>Unauthorized</h1><p>Authentication failed</p><hr><address>Cyrus-HTTP/3.0.11-58-g47c16b669-dirty Cyrus-SASL/2.1.27 OpenSSL/1.1 Zlib/1.2.11 Brotli/1.0.7 LibXML/2.9.9 SQLite/3.29.0 LibiCal/3.0 ICU4C/63.1 Jansson/2.12 Server at 127.0.0.3 Port 80</address></body></html>
I cannot get a state with Curl, where no body is returned, to see why Evolution does not log after the first PROPFIND a body
- Check why Evolution makes two PROPFIND /dav/calendars/ calls
- Check why Evolution does not print on the first call the body of the answer
- When authenticating over HTTP with username containing @domain, send the whole username including the realm to the server
- Check why a collection account for aaa@milter.aegee.org cannot be created and in particular, why no HTTP calls are made by Evolution.