0

I have set up a Horde Groupware Webmail Edition server, primarily to use webmail (provided by the hosting provider) and calendar (provided by us). Authentication is set up using IMAP authentication through the IMP (webmail) component:

Main Horde config/conf.php:

$conf['auth']['params']['app'] = 'imp';
$conf['auth']['driver'] = 'application';

IMP config/backends.local.php:

$servers['imap']['hostspec'] = 'sub5.mail.dreamhost.com';
$servers['imap']['hordeauth'] = 'full';
// ... (port, secure, etc.)

This successfully authenticates users against DreamHost's IMAP server so they can log in to Horde. Once logged in through IMP, they can also access Kronolith (calendar component).

I am now trying to set up CalDAV support for the calendar, but I can't get the authentication to work. As a simple test, I take the calendar URL from the Horde that looks like this -- https://horde.example.com/rpc.php/calendars/myusername@example.com/calendar~CALENDAR_ID/ -- and I try to use CURL (with option -u username:password) to retrieve the calendar. Horde returns the following response:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>Username or password does not match</s:message>
  <s:sabredav-version>1.8.12</s:sabredav-version>
</d:error>

Is there a way to get Horde to use the IMAP login for the calendar in CalDAV the way that it works for the web interface?

Moshe Katz
  • 3,053
  • 3
  • 26
  • 41

1 Answers1

0

In the end, I had to switch the main Horde authentication to also use IMAP directly instead of passing it back to IMP.

Here's what I added to conf.local.php:

$conf['auth']['driver'] = 'imap';
$conf['auth']['params']['hostspec'] = 'sub5.mail.dreamhost.com';
$conf['auth']['params']['port'] = 143;
$conf['auth']['params']['secure'] = 'tls';
$conf['auth']['params']['hordeauth'] = 'full';

I have no idea if the last line is actually needed or not, but users were waiting so I didn't try to experiment.

Moshe Katz
  • 3,053
  • 3
  • 26
  • 41