[ Index ]
 

Code source de IMP H3 (4.1.5)

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/config/ -> servers.php.dist (source)

   1  <?php
   2  /**
   3   * $Horde: imp/config/servers.php.dist,v 1.50.2.18 2006/09/12 01:05:59 slusarz Exp $
   4   *
   5   * This file is where you specify what mail servers people using your
   6   * installation of IMP can log in to.
   7   *
   8   * Properties that can be set for each server:
   9   *
  10   * name: This is the plaintext, english name that you want displayed
  11   *       to people if you are using the drop down server list.
  12   *
  13   * server: The hostname of the mail server to connect to.
  14   *
  15   * hordeauth: If this parameter is present and true, then IMP will attempt
  16   *            to use the user's existing credentials (the username/password
  17   *            they used to log in to Horde) to log in to this source. If this
  18   *            parameter is 'full', the username will be used unmodified;
  19   *            otherwise everything after and including the first @ in the
  20   *            username will be stripped off before attempting authentication.
  21   *
  22   * protocol: One of the following strings:
  23   *             + 'imap/notls'
  24   *             + 'imap/ssl'
  25   *             + 'imap/tls'
  26   *             + 'pop3/notls'
  27   *             + 'pop3/ssl'
  28   *             + 'pop3/tls'
  29   *
  30   *           If using 'pop3/*' you will connect to a POP3 mail server and
  31   *           all folder options will be automatically turned off (POP3 does
  32   *           not support folders).  If you want folders (and for much
  33   *           improved performance) it is HIGHLY RECOMMENDED that IMAP should
  34   *           be used instead.
  35   *
  36   *           NOTE: Due to limitations within PHP, IMP can only support auto-
  37   *                 detection of namespace parameters with IMAP TLS connections
  38   *                 (e.g 'imap/tls') if using PHP version 5.1.0 or greater.
  39   *                 If using a version of PHP less than 5.1.0, the following
  40   *                 options are available:
  41   *                 1. RECOMMENDED - If a secure IMAP connection is needed, use
  42   *                    a direct connection to a SSL enabled IMAP port
  43   *                    (e.g. 'imap/ssl').
  44   *                 2. If you absolutely must use TLS, then it is REQUIRED to
  45   *                    define the 'namespace' parameter (see below).
  46   *
  47   *           The ssl and tls options will only work if you've compiled PHP
  48   *           against a SSL-enabled version of c-client, used the
  49   *           --with-imap-ssl and --with-openssl flags when compiling PHP,
  50   *           and you have a mail server server which supports SSL.
  51   *
  52   *           ** The test script can help automatically determine the   **
  53   *           ** correct protocol value to use.  See the 'Testing IMP'  **
  54   *           ** section of imp/docs/INSTALL for instructions on how to **
  55   *           ** access the test script.                                **
  56   *
  57   *           NOTE - If you are using a self-signed server certificate with
  58   *           either imap/ssl, imap/tls, pop3/ssl, or pop3/tls, you MUST add
  59   *           '/novalidate-cert' to the end of the protocol string. For imap,
  60   *           this would be 'imap/ssl/novalidate-cert' or
  61   *           'imap/tls/novalidate-cert', and for pop3 it would be
  62   *           'pop3/ssl/novalidate-cert' or 'pop3/tls/novalidate-cert'. This
  63   *           is necessary to tell c-client not to complain about the lack of
  64   *           a valid CA on the certificate.
  65   *
  66   * port: The port that the mail service/protocol you selected runs on.
  67   *       Default values:
  68   *         'pop3'    110
  69   *         'pop3s'   995
  70   *         'imap'    143
  71   *         'imaps'   993
  72   *
  73   *       ** The test script can help automatically determine the      **
  74   *       ** correct port value to use.  See the 'Testing IMP' section **
  75   *       ** of imp/docs/INSTALL for instructions on how to access the **
  76   *       ** test script.                                              **
  77   *
  78   * maildomain: What to put after the @ when sending mail. i.e. if you want
  79   *             all mail to look like 'From: user@example.com' set
  80   *             maildomain to 'example.com'. It is generally useful when
  81   *             the sending host is different from the mail receiving host. This
  82   *             will also be used to complete unqualified addresses when
  83   *             composing mail.
  84   *
  85   * smtphost: If specified, and $conf['mailer']['type'] is set to 'smtp',
  86   *           IMP will use this host for outbound SMTP connections.  This
  87   *           value overrides any existing $conf['mailer']['params']['host']
  88   *           value at runtime.
  89   *
  90   * smtpport: If specified, and $conf['mailer']['type'] is set to 'smtp',
  91   *           IMP will use this port for outbound SMTP connections.  This value
  92   *           overrides any existing $conf['mailer']['params']['port'] value at
  93   *           runtime.
  94   *
  95   * realm: ONLY USE REALM IF YOU ARE USING IMP FOR HORDE AUTHENTICATION,
  96   *        AND YOU HAVE MULTIPLE SERVERS AND USERNAMES OVERLAP BETWEEN
  97   *        THOSE SERVERS. If you only have one server, or have multiple
  98   *        servers with no username clashes, or have full user@example.com
  99   *        usernames, you DO NOT need a realm setting. If you set one, an
 100   *        '@' symbol plus the realm will be appended to the username that
 101   *        users log in to IMP with to create the username that Horde treats
 102   *        the user as. So with a realm of 'example.com', the username
 103   *        'jane' would be treated by Horde (NOT your IMAP/POP server) as
 104   *        'jane@example.com', and the username 'jane@example.com' would be
 105   *        treated as 'jane@example.com@example.com' - an occasion where you
 106   *        probably don't need a realm setting.
 107   *
 108   * preferred: Only useful if you want to use the same servers.php file
 109   *            for different machines: if the hostname of the IMP machine is
 110   *            identical to one of those in the preferred list, then the
 111   *            corresponding option in the select box will include SELECTED
 112   *            (i.e. it is selected per default). Otherwise the first entry
 113   *            in the list is selected.
 114   *
 115   * quota: Use this if you want to display a users quota status on various
 116   *        IMP pages. Set 'driver' equal to the mailserver and 'params'
 117   *        equal to any extra parameters needed by the driver (see the
 118   *        comments located at the top of imp/lib/Quota/[quotadriver].php
 119   *        for the parameters needed for each driver).
 120   *
 121   *        Currently available drivers:
 122   *          false        --  Disable quota checking (DEFAULT)
 123   *
 124   *          'command'    --  Use the UNIX quota command to determine quotas
 125   *          'courier'    --  Use the Courier-IMAP server to handle quotas
 126   *                           You must be connecting to a Courier-IMAP server
 127   *                           to use this driver
 128   *          'cyrus'      --  Use the Cyrus IMAP server to handle quotas
 129   *                           You must be connecting to a Cyrus IMAP server
 130   *                           to use this driver
 131   *          'logfile'    --  Allow quotas on servers where IMAP Quota
 132   *                           commands are not supported, but quota info
 133   *                           appears in the servers messages log for the IMAP
 134   *                           server.
 135   *          'mdaemon'    --  Use Mdaemon servers to handle quotas
 136   *          'mercury32'  --  Use Mercury/32 servers to handle quotas
 137   *
 138   * admin: Use this if you want to enable mailbox management for administrators
 139   *        via Horde's user administration interface.  The mailbox management
 140   *        gets enabled if you let IMP handle the Horde authentication with the
 141   *        'application' authentication driver.  Your IMAP server needs to
 142   *        support mailbox management via IMAP commands.
 143   *        Do not define this value if you do not want mailbox management.
 144   *
 145   * acl: Use this if you want to use Access Control Lists (folder sharing)
 146   *      Set 'driver' equal to the type of ACL your server supports and
 147   *      'params' to an array containing any additional parameters the
 148   *      driver needs. Not all IMAP servers currently support this
 149   *      feature.
 150   *
 151   *      At present the only drivers supported are 'rfc2086' and 'rfc4314' (in
 152   *      Horde 3.1+), neither of which require any parameters.
 153   *
 154   *      SECURITY NOTE: If you do not have the PEAR Auth_SASL module
 155   *      installed, the 'rfc2086' driver will send user passwords to the
 156   *      IMAP server in plain text when retrieving ACLs.
 157   *
 158   *
 159   * *** The following options should NOT be set unless you REALLY know what ***
 160   * *** you are doing! FOR MOST PEOPLE, AUTO-DETECTION OF THESE PARAMETERS  ***
 161   * *** (the default if the parameters are not set) SHOULD BE USED!         ***
 162   *
 163   * namespace: The list of namespaces that exist on the server.  This entry
 164   *            must be an array. Example:
 165   *            'namespace' => array('#shared/', '#news/', '#ftp/', '#public/')
 166   *            This parameter must be set if using a TLS connection.
 167   *            Additionally, this parameter may be set if not using a TLS
 168   *            connection and you want to allow access to namespaces that may
 169   *            not be publicly advertised by the IMAP server (see RFC
 170   *            2342 [3]). These additional namespaces will be added to the list
 171   *            of available namespaces returned by the server.
 172   *
 173   * imap_config: Manually set IMAP server configuration information. Please see
 174   *              http://wiki.horde.org/ImpImapConfig for information on this
 175   *              parameter.  THIS PARAMETER IS NOT OFFICIALLY SUPPORTED BY THE
 176   *              HORDE PROJECT.  This entry must be an array with the following
 177   *              elements:
 178   *              'children' - (boolean) Whether the IMAP server supports the
 179   *                           CHILDREN command.
 180   *              'namespace' - (array) The namespace configuration of the
 181   *                            server.  See the return from
 182   *                            IMAP_Client::namespace() (located in
 183   *                            imp/lib/IMAP/Client.php) for the structure of
 184   *                            this array.
 185   *              'search_charset' - (array) A list of charsets the IMAP server
 186   *                                 supports for searches.
 187   *
 188   * timeout: Manually set server timeouts. This option only works with PHP >=
 189   *          4.3.3. This entry must be an array with the following possible
 190   *          elements (if an element is missing, the default value is used):
 191   *          IMAP_OPENTIMEOUT - (integer) The timeout for open actions.
 192   *          IMAP_READTIMEOUT - (integer) The timeout for read actions.
 193   *          IMAP_WRITETIMEOUT - (integer) The timeout for write actions.
 194   *          IMAP_CLOSETIMEOUT - (integer) The timeout for close actions.
 195   *
 196   * login_tries: Manually set the number of login tries we make to the server.
 197   *              The PHP imap_open() function will try to login 3 times to a
 198   *              server before failing.  This value indicates the number of
 199   *              times we call imap_open() before IMP fails (we pause one second
 200   *              between imap_open() calls). The default value is 3 (meaning IMP
 201   *              may attempt to login to the server 9 times).  If you have a
 202   *              mail server that will lock out an account if a certain number
 203   *              of incorrect login attempts occur within a certain period of
 204   *              time, you may want to set this to a lower value.  The minimum
 205   *              value for this setting is 1.
 206   */
 207  
 208  /* Any entries whose key value ('foo' in $servers['foo']) begin with '_'
 209   * (an underscore character) will be treated as prompts, and you won't be
 210   * able to log in to them. The only property these entries need is 'name'.
 211   * This lets you put labels in the list, like this example: */
 212  $servers['_prompt'] = array(
 213      'name' => _("Choose a mail server:")
 214  );
 215  
 216  /* Example configurations: */
 217  
 218  $servers['imap'] = array(
 219      'name' => 'IMAP Server',
 220      'server' => 'imap.example.com',
 221      'hordeauth' => false,
 222      'protocol' => 'imap/notls',
 223      'port' => 143,
 224      'maildomain' => 'example.com',
 225      'smtphost' => 'smtp.example.com',
 226      'smtpport' => 25,
 227      'realm' => '',
 228      'preferred' => '',
 229  );
 230  
 231  $servers['cyrus'] = array(
 232      'name' => 'Cyrus IMAP Server',
 233      'server' => 'cyrus.example.com',
 234      'hordeauth' => false,
 235      'protocol' => 'imap/notls',
 236      'port' => 143,
 237      'maildomain' => 'example.com',
 238      'smtphost' => 'smtp.example.com',
 239      'smtpport' => 25,
 240      'realm' => '',
 241      'preferred' => '',
 242      'admin' => array(
 243          'params' => array(
 244              'login' => 'cyrus',
 245              'password' => 'cyrus_pass',
 246              // The 'userhierarchy' parameter defaults to 'user.'
 247              // If you are using a nonstandard hierarchy for personal
 248              // mailboxes, you will need to set it here.
 249              'userhierarchy' => 'user.',
 250              // Although these defaults are normally all that is required,
 251              // you can modify the following parameters from their default
 252              // values.
 253              'protocol' => 'imap/notls',
 254              'hostspec' => 'localhost',
 255              'port' => 143
 256          )
 257      ),
 258      'quota' => array(
 259          'driver' => 'cyrus',
 260          'params' => array(),
 261      ),
 262      'acl' => array(
 263          'driver' => 'rfc2086',
 264      ),
 265  );
 266  
 267  $servers['pop'] = array(
 268      'name' => 'POP3 Server',
 269      'server' => 'pop.example.com',
 270      'hordeauth' => false,
 271      'protocol' => 'pop3',
 272      'port' => 110,
 273      'maildomain' => 'example.com',
 274      'smtphost' => 'smtp.example.com',
 275      'smtpport' => 25,
 276      'realm' => '',
 277      'preferred' => '',
 278  );
 279  
 280  $servers['exchange'] = array(
 281      'name' => 'Exchange 5.5 server',
 282      'server' => 'exchange.example.com',
 283      'hordeauth' => false,
 284      'protocol' => 'imap',
 285      'port' => 143,
 286      'maildomain' => '',
 287      'smtphost' => 'smtp.example.com',
 288      'realm' => '',
 289      'preferred' => '',
 290  );
 291  
 292  if ($GLOBALS['conf']['kolab']['enabled']) {
 293      $servers['kolab'] = array(
 294          'name' => 'Kolab Cyrus IMAP Server',
 295          'server' => $GLOBALS['conf']['kolab']['imap']['server'],
 296          'hordeauth' => 'full',
 297          'protocol' => 'imap/notls/novalidate-cert',
 298          'port' => $GLOBALS['conf']['kolab']['imap']['port'],
 299          'maildomain' => $GLOBALS['conf']['kolab']['imap']['maildomain'],
 300          'realm' => '',
 301          'preferred' => '',
 302          'quota' => array(
 303              'driver' => 'cyrus',
 304              'params' => array(),
 305          ),
 306          'acl' => array(
 307              'driver' => 'rfc2086',
 308          ),
 309      );
 310  }


Généré le : Thu Nov 29 12:30:07 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics