* Copyright 1999-2006 Charles J. Hagenbuch * Copyright 1999-2006 Jon Parise * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. */ /* Include Horde's core.php file. */ include_once '../lib/core.php'; /* We should have loaded the String class, from the Horde_Util * package, in core.php. If String:: isn't defined, then we're not * finding some critical libraries. */ if (!class_exists('String')) { echo '
The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the framework module from Horde CVS, and install the packages in it with the install-packages.php script.'; exit; } /* Initialize the Horde_Test:: class. */ if (!(@is_readable('../lib/Test.php'))) { echo 'ERROR: You must install Horde before running this script.'; exit; } require_once '../lib/Test.php'; $horde_test = &new Horde_Test; /* IMP version. */ $module = 'IMP'; require_once './lib/version.php'; $module_version = IMP_VERSION; require TEST_TEMPLATES . 'header.inc'; require TEST_TEMPLATES . 'version.inc'; /* Display versions of other Horde applications. */ $app_list = array( 'gollem' => array( 'error' => 'Gollem provides access to local VFS filesystems to attach files.', 'version' => '1.0' ), 'ingo' => array( 'error' => 'Ingo provides basic mail filtering capabilities to IMP.', 'version' => '1.0' ), 'nag' => array( 'error' => 'Nag allows tasks to be directly created from e-mail data.', 'version' => '2.0' ), 'turba' => array( 'error' => 'Turba provides addressbook/contacts capabilities to IMP.', 'version' => '2.0' ) ); $app_output = $horde_test->requiredAppCheck($app_list); ?>

Other Horde Applications

getPhpVersionInformation(); require TEST_TEMPLATES . 'php_version.inc'; /* PHP modules. */ $module_list = array( 'imap' => array( 'descrip' => 'IMAP Support', 'error' => 'IMP requires the imap module to interact with the mail server. It is required even if you only use pop3 access.', 'fatal' => true ), 'openssl' => array( 'descrip' => 'OpenSSL Support', 'error' => 'The openssl module is required to use S/MIME in IMP. Compile PHP with --with-openssl to activate.', 'fatal' => false ) ); /* PHP settings. */ $setting_list = array( 'file_uploads' => array( 'setting' => true, 'error' => 'file_uploads must be enabled to use various features of IMP. See the INSTALL file for more information.' ) ); /* IMP configuration files. */ $file_list = array( 'config/conf.php' => 'The file ./config/conf.php appears to be missing. You must generate this file as an administrator via Horde. See horde/docs/INSTALL.', 'config/mime_drivers.php' => null, 'config/prefs.php' => null, 'config/servers.php' => null ); /* PEAR modules. */ $pear_list = array( 'HTTP_Request' => array( 'path' => 'HTTP/Request.php', 'error' => 'The HTML composition mode requires HTTP_Request.' ), 'Auth_SASL' => array( 'path' => 'Auth/SASL.php', 'error' => 'If your IMAP server uses CRAM-MD5 or DIGEST-MD5 authentication, this module is required.' ) ); /* Get the status output now. */ $module_output = $horde_test->phpModuleCheck($module_list); $setting_output = $horde_test->phpSettingCheck($setting_list); $file_output = $horde_test->requiredFileCheck($file_list); $pear_output = $horde_test->PEARModuleCheck($pear_list); ?>

PHP Module Capabilities

Miscellaneous PHP Settings

Required IMP Configuration Files

PEAR

PHP Mail Server Support Test

110, 'pop3/ssl' => 995, 'pop3/ssl/novalidate-cert' => 995, 'pop3/tls/novalidate-cert' => 110 ); } else { $conn = array( 'imap/notls' => 143, 'imap/ssl' => 993, 'imap/ssl/novalidate-cert' => 993, 'imap/tls/novalidate-cert' => 143 ); } $success = array(); echo "Attempting to automatically determine the correct connection parameters for your server:\n"; foreach ($conn as $key => $val) { $server_port = !empty($port) ? $port : $val; $mbname = '{' . $server . ':' . $server_port . '/' . $key . '}INBOX'; echo "\n"; } if (!empty($success)) { echo "The following configurations were successful and may be used in your imp/config/servers.php file:\n"; $i = 1; foreach ($success as $val) { echo "
Configuration " . $i++ . "
";
            foreach ($val as $key => $entry) {
                echo "'" . $key . "' => '" . $entry . "'\n";
            }
            echo "
\n"; } if ($type == 'imap') { echo "The following IMAP server information was discovered from the remote server:\n"; $config = reset($success); require_once './lib/IMAP/Client.php'; $imapclient = &new IMP_IMAPClient($config['server'], $config['port'], $config['protocol']); $use_tls = $imapclient->useTLS(); if (!is_a($use_tls, 'PEAR_Error')) { $res = $imapclient->login($user, $passwd); } if (isset($res) && !is_a($res, 'PEAR_Error')) { echo "
Namespace Information
";
                $namespace = $imapclient->namespace();
                if (is_array($namespace)) {
                    foreach ($namespace as $val) {
                        echo "NAMESPACE: \"" . $val['name'] . "\"\n";
                        echo "DELIMITER: " . $val['delimiter'] . "\n";
                        echo "TYPE: " . $val['type'] . "\n\n";
                    }
                } else {
                    echo "Could not retrieve namespace information from IMAP server.\n";
                }
                echo "
\n"; echo "
IMAP CHILDREN support:
";
                echo ($imapclient->queryCapability('CHILDREN')) ? 'SUPPORTED' : 'Not supported';
                echo "
\n"; echo "
IMAP Charset Search Support:
";
                $charset = NLS::getCharset();
                if ($imapclient->searchCharset($charset)) {
                    echo "Server supports searching with the $charset character set.\n";
                } else {
                    echo "Server does not support searching with the $charset character set.\n";
                }
                echo "
\n"; } else { echo "
Could not retrieve IMAP information from the remote server.
"; } } } else { echo "Could not determine a successful connection protocol. Make sure your mail server is running and you have specified the correct port.\n"; } } else { ?>
Server:
Port:(If non-standard port; leave blank to auto-detect using standard ports)
User:
Password:
Server Type: