Difference between revisions of "Configuration/hooks/Authentication/IMAP"

From Davical
Jump to navigationJump to search
m (Example: only for consistency)
(delete "known problem" fixed in 1.1.0)
Line 48: Line 48:
== Known problems ==
The following problems exist in the latest [[Release_Notes/1.0.2 | 1.0.2 release.]]
=== New users cannot login ===
To fix this, locate this line in 'inc/drivers_imap_pam.php':
<pre>'modified' => date(),</pre>
And replace it with the following:
<pre>'modified' => date("c"),</pre>

Latest revision as of 02:07, 2 January 2016

Available languages

Last updated for the 1.0.2 release.

Documentation for the IMAP authentication driver (inc/drivers_imap_pam.php).

This driver allows DAViCal to accept authentication via a local or remote IMAP server.

PHP IMAP is required as an extra dependency. Install php5-imap on Debian/Ubuntu based systems.

IMAP Settings

The settings for the IMAP server connection go in the config file /etc/davical/<servername>-conf.php (this file might be in /etc/rscds/ if you upgraded from an older installation).

  $c->authenticate_hook['call'] = 'IMAP_PAM_check';
  $c->authenticate_hook['config'] = array(
      'imap_url'   => '{<IMAP SERVER>}',
      'email_base' => '<EMAIL DOMAIN HOST>'

imap_url is required. IMAP SERVER must be an IMAP URL surrounded by curly brackets as documented in the PHP manual. Some common examples are provided below:

{localhost:143/imap/}                      // Insecure on local server
{localhost:143/imap/tls/}                  // START TLS to a local server
{example.com:993/imap/ssl/}                // Legacy SSL on deprecated port
{example.com:143/imap/tls/novalidate-cert} // Self-signed certificate

Note that authenticating to an external server over TLS/SSL is slow. The connection to the IMAP server will not request a working mailbox and the server response should thus not be too slow.

Providing an hostname/mailname (example.com) through the email_base parameter is optional.


The following config example allows DAViCal to authenticate users via a secure IMAP server at example.com:

  $c->authenticate_hook['call'] = 'IMAP_PAM_check';
  $c->authenticate_hook['config'] = array(
      'imap_url'   => '{example.com:143/imap/tls/}',
      'email_base' => 'example.com'