From Davical
Jump to navigationJump to search


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
{}                // Legacy SSL on deprecated port
{} // 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 ( through the email_base parameter is optional.


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

  $c->authenticate_hook['call'] = 'IMAP_PAM_check';
  $c->authenticate_hook['config'] = array(
      'imap_url'   => '{}',
      'email_base' => ''