<?php
/**
 * $Horde: ingo/config/backends.php.dist,v 1.20 2004/11/09 10:35:37 jan Exp $
 *
 * Ingo works purely on a preferred mechanism for server selection. There are
 * a number of properties that you can set for each backend:
 *
 * driver:       The Ingo_Driver driver to use to get the script to the
 *               backend server. Valid options:
 *                   'null'       --  No backend server
 *                   'timsieved'  --  Cyrus timsieved server
 *                   'vfs'        --  Use Horde VFS
 *
 * preferred:    This is the field that is used to choose which server is
 *               used. The value for this field may be a single string or an
 *               array of strings containing the hostnames to use with this
 *               server.
 *
 * hordeauth:    Ingo uses the current logged in username and password. If
 *               you want the full username@realm to be used to connect then
 *               set this to 'full' otherwise set this to true and just the
 *               username will be used to connect to the driver.
 *
 * params:       An array containing any additional information that the
 *               Ingo_Driver class needs.
 *
 * script:       The type of Ingo_Script driver this server uses.
 *               Valid options:
 *                   'imap'      --  IMAP client side filtering
 *                   'procmail'  --  Procmail scripts
 *                   'sieve'     --  Sieve scripts
 *
 * scriptparams: An array containing any additional information that the
 *               Ingo_Script driver needs.
 */

/* IMAP Example */
$backends['imap'] = array(
    'driver' => 'null',
    'preferred' => 'example.com',
    'hordeauth' => true,
    'params' => array(),
    'script' => 'imap',
    'scriptparams' => array()
);

/* Procmail Example */
$backends['procmail'] = array(
    'driver' => 'vfs',
    'preferred' => 'example.com',
    'hordeauth' => true,
    'params' => array(
        // Hostname of the VFS server
        'hostspec' => 'ftp.example.com',
        // Name of the procmail config file to write
        'procmailrc' => '.procmailrc',
        // Port of the VFS server
        'port' => 21,
        // The VFS driver to use
        'vfstype' => 'ftp'
    ),
    'script' => 'procmail',
    'scriptparams' => array(
        // What path style does the IMAP server use ['mbox'|'maildir']?
        'path_style' => 'mbox',
        // An array of variables to append to every generated script.
        // Use if you need to set up specific environment variables.
        'variables' => array(
            // Example for the $PATH variable
            // 'PATH' => '/usr/bin'
        )
    )
);

/* Sieve Example */
$backends['sieve'] = array(
    'driver' => 'timsieved',
    'preferred' => 'example.com',
    'hordeauth' => true,
    'params' => array(
        // Hostname of the timsieved server
        'hostspec' => 'mail.example.com',
        // Login type of the server
        'logintype' => 'PLAIN',
        // Port number of the timsieved server
        'port' => 2000,
        // Name of the sieve script
        'scriptname' => 'ingo'
    ),
    'script' => 'sieve',
    'scriptparams' => array()
);

/* Kolab Example (using Sieve) */
if ($GLOBALS['conf']['kolab']['enabled']) {
    $backends['kolab'] = array(
        'driver' => 'timsieved',
        'preferred' => '',
        'hordeauth' => 'full',
        'params' => array(
            'hostspec' => $GLOBALS['conf']['kolab']['imap']['server'],
            'logintype' => 'PLAIN',
            'port' => $GLOBALS['conf']['kolab']['imap']['sieveport'],
            'scriptname' => 'kmail-vacation.siv'
        ),
        'script' => 'sieve',
        'scriptparams' => array()
    );
}
