Table des matières

RQ : install in /var/www/horde, root of the website

Prerequists

First, create a dedicated mysql account and database.

Variables :

DEFAULT_MAIL_DOMAIN="mydomain.com"
MAIL_SERVER_HOSTNAME="mail"
MAIL_SERVER_FQDN="${MAIL_SERVER_HOSTNAME}.${DEFAULT_MAIL_DOMAIN}"
IMAP_SERVER="localhost"
SMTP_SERVER="localhost"
ADMIN_MAIL="admin@${DEFAULT_MAIL_DOMAIN}"
CONTACT_MAIL="postmaster@$DEFAULT_MAIL_DOMAIN"
INSTALL_PATH="/var/www/horde"
FORCESSL="1"
PFARWDBNAME="db_name"
PFARWDBUSER="db_username"
PFARWDBPW="db_password"

Horde install

Installation is done via PEAR. Using Debian packages leads to library problems.

apt-get install php5-gd php5-mysql php5-mcrypt \
    php5-imap php5-tidy php5-cli php-pear \
    php5-memcache php5-geoip make \
    php5-curl php5-ldap php5-idn php5-sasl \
    libssh2-php aspell aspell-en aspell-fr \
    php5-imagick php-net-ldap2 libimage-exiftool-perl \
    php-pear
 
pear upgrade PEAR
pear channel-discover pear.horde.org
 
mkdir -p $INSTALL_PATH
cd $INSTALL_PATH
pear install horde/horde_role
pear run-scripts horde/horde_role
# Filesystem location for the base Horde application : see $INSTALL_PATH
pear install -a -B horde/groupware
root@mail:~# pear upgrade PEAR
WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus"
downloading PEAR-1.10.0.tgz ...
Starting to download PEAR-1.10.0.tgz (291,155 bytes)
.............................................................done: 291,155 bytes
downloading Archive_Tar-1.4.0.tgz ...
Starting to download Archive_Tar-1.4.0.tgz (20,018 bytes)
...done: 20,018 bytes
downloading Structures_Graph-1.1.1.tgz ...
Starting to download Structures_Graph-1.1.1.tgz (12,402 bytes)
...done: 12,402 bytes
downloading Console_Getopt-1.4.1.tgz ...
Starting to download Console_Getopt-1.4.1.tgz (5,580 bytes)
...done: 5,580 bytes
downloading XML_Util-1.3.0.tgz ...
Starting to download XML_Util-1.3.0.tgz (17,186 bytes)
...done: 17,186 bytes
upgrade ok: channel://pear.php.net/Archive_Tar-1.4.0
upgrade ok: channel://pear.php.net/Structures_Graph-1.1.1
upgrade ok: channel://pear.php.net/Console_Getopt-1.4.1
upgrade ok: channel://pear.php.net/XML_Util-1.3.0
upgrade ok: channel://pear.php.net/PEAR-1.10.0
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
root@mail:~# pear channel-discover pear.horde.org
Adding Channel "pear.horde.org" succeeded
Discovery of channel "pear.horde.org" succeeded
root@mail:~# mkdir -p $INSTALL_PATH
root@mail:~# cd $INSTALL_PATH
root@mail:/var/www/horde# pear install horde/horde_role
downloading Horde_Role-1.0.1.tgz ...
Starting to download Horde_Role-1.0.1.tgz (10,977 bytes)
.....done: 10,977 bytes
install ok: channel://pear.horde.org/Horde_Role-1.0.1
horde/Horde_Role has post-install scripts:
/usr/share/php/PEAR/Installer/Role/Horde/Role.php
Horde_Role: Use "pear run-scripts horde/Horde_Role" to finish setup.
DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES
root@mail:/var/www/horde# pear run-scripts horde/horde_role
Including external post-installation script "/usr/share/php/PEAR/Installer/Role/Horde/Role.php" - any errors are in this script
Inclusion succeeded
running post-install script "Horde_Role_postinstall->init()"
init succeeded
Filesystem location for the base Horde application : /var/www/horde
Configuration successfully saved to PEAR config.
Install scripts complete
root@mail:/var/www/horde# pear install -a -B horde/groupware
WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus"
Failed to download pear/Date_Holidays within preferred state "stable", latest release is version 0.21.8, stability "alpha", use "channel://pear.php.net/Date_Holidays-0.21.8" to install
Failed to download pear/Text_LanguageDetect within preferred state "stable", latest release is version 0.3.0, stability "alpha", use "channel://pear.php.net/Text_LanguageDetect-0.3.0" to install
Failed to download pecl/idn within preferred state "stable", latest release is version 0.2.0, stability "beta", use "channel://pecl.php.net/idn-0.2.0" to install
WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2"
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
Failed to download pear/SOAP within preferred state "stable", latest release is version 0.13.0, stability "beta", use "channel://pear.php.net/SOAP-0.13.0" to install
Failed to download pear/XML_Serializer within preferred state "stable", latest release is version 0.20.2, stability "beta", use "channel://pear.php.net/XML_Serializer-0.20.2" to install
Failed to download pear/Console_Color2 within preferred state "stable", latest release is version 0.1.2, stability "alpha", use "channel://pear.php.net/Console_Color2-0.1.2" to install
WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2"
Unknown remote channel: pear.nrk.io
Failed to download pecl/msgpack within preferred state "stable", latest release is version 0.5.7, stability "beta", use "channel://pecl.php.net/msgpack-0.5.7" to install
Failed to download pear/Numbers_Words within preferred state "stable", latest release is version 0.18.1, stability "beta", use "channel://pear.php.net/Numbers_Words-0.18.1" to install
Failed to download pear/Image_Text within preferred state "stable", latest release is version 0.7.0, stability "beta", use "channel://pear.php.net/Image_Text-0.7.0" to install
WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"
WARNING: "pear/Net_URL" is deprecated in favor of "pear/Net_URL2"
WARNING: "pear/HTTP_Request" is deprecated in favor of "pear/HTTP_Request2"
WARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"
horde/kronolith can optionally use package "pear/Date_Holidays" (version >= 0.21.0)
horde/Horde_Core can optionally use package "pear/Text_LanguageDetect"
horde/Horde_Db can optionally use PHP extension "oci8"
horde/Horde_Cache can optionally use PHP extension "eaccelerator" (version >= 0.9.5, version <= 0.9.6, excluded versions: 0.9.6)
horde/Horde_Mime can optionally use package "pecl/idn"
horde/Horde_Rpc can optionally use PHP extension "xmlrpc"
pear/Services_Weather can optionally use package "pear/SOAP" (version >= 0.7.5)
pear/Services_Weather can optionally use package "pear/XML_Serializer" (version >= 0.8)
pear/Console_Table can optionally use package "pear/Console_Color2" (version >= 0.1.2)
horde/Horde_HashTable can optionally use package "channel://pear.nrk.io/Predis" (version >= 0.8.3)
horde/Horde_Pack can optionally use package "pecl/msgpack"
pear/Text_CAPTCHA can optionally use package "pear/Numbers_Words"
pear/Text_CAPTCHA can optionally use package "pear/Image_Text" (version >= 0.7.0)
downloading groupware-5.2.10.tgz ...
Starting to download groupware-5.2.10.tgz (120,891 bytes)
..........................done: 120,891 bytes
downloading content-2.0.4.tgz ...
Starting to download content-2.0.4.tgz (21,670 bytes)
...done: 21,670 bytes
downloading gollem-3.0.5.tgz ...
Starting to download gollem-3.0.5.tgz (953,125 bytes)
...done: 953,125 bytes
downloading horde-5.2.7.tgz ...
Starting to download horde-5.2.7.tgz (2,909,938 bytes)
...done: 2,909,938 bytes
downloading kronolith-4.2.9.tgz ...
Starting to download kronolith-4.2.9.tgz (2,600,760 bytes)
...done: 2,600,760 bytes
downloading mnemo-4.2.7.tgz ...
Starting to download mnemo-4.2.7.tgz (1,200,357 bytes)
....done: 1,200,357 bytes
downloading nag-4.2.5.tgz ...
Starting to download nag-4.2.5.tgz (1,638,351 bytes)
...done: 1,638,351 bytes
downloading timeobjects-2.1.0.tgz ...
Starting to download timeobjects-2.1.0.tgz (372,127 bytes)
...done: 372,127 bytes
downloading trean-1.1.2.tgz ...
Starting to download trean-1.1.2.tgz (596,996 bytes)
...done: 596,996 bytes
downloading turba-4.2.8.tgz ...
Starting to download turba-4.2.8.tgz (1,984,117 bytes)
...done: 1,984,117 bytes
downloading Horde_Core-2.22.0.tgz ...
Starting to download Horde_Core-2.22.0.tgz (1,640,311 bytes)
...done: 1,640,311 bytes
downloading Horde_Date-2.1.1.tgz ...
Starting to download Horde_Date-2.1.1.tgz (69,825 bytes)
...done: 69,825 bytes
downloading Horde_Exception-2.0.6.tgz ...
Starting to download Horde_Exception-2.0.6.tgz (24,113 bytes)
...done: 24,113 bytes
downloading Horde_Db-2.2.3.tgz ...
Starting to download Horde_Db-2.2.3.tgz (93,803 bytes)
...done: 93,803 bytes
downloading Horde_Injector-2.0.4.tgz ...
Starting to download Horde_Injector-2.0.4.tgz (21,829 bytes)
...done: 21,829 bytes
downloading Horde_Rdo-2.0.4.tgz ...
Starting to download Horde_Rdo-2.0.4.tgz (34,317 bytes)
...done: 34,317 bytes
downloading Horde_Util-2.5.6.tgz ...
Starting to download Horde_Util-2.5.6.tgz (36,392 bytes)
...done: 36,392 bytes
downloading Horde_Argv-2.0.11.tgz ...
Starting to download Horde_Argv-2.0.11.tgz (63,708 bytes)
...done: 63,708 bytes
downloading Horde_Controller-2.0.3.tgz ...
Starting to download Horde_Controller-2.0.3.tgz (10,650 bytes)
...done: 10,650 bytes
downloading Horde_ElasticSearch-1.0.3.tgz ...
Starting to download Horde_ElasticSearch-1.0.3.tgz (3,859 bytes)
...done: 3,859 bytes
downloading Horde_Auth-2.1.10.tgz ...
Starting to download Horde_Auth-2.1.10.tgz (58,867 bytes)
...done: 58,867 bytes
downloading Horde_Cache-2.5.0.tgz ...
Starting to download Horde_Cache-2.5.0.tgz (21,312 bytes)
...done: 21,312 bytes
downloading Horde_Editor-2.0.4.tgz ...
Starting to download Horde_Editor-2.0.4.tgz (744,771 bytes)
...done: 744,771 bytes
downloading Horde_Mime-2.9.2.tgz ...
Starting to download Horde_Mime-2.9.2.tgz (141,965 bytes)
...done: 141,965 bytes
downloading Horde_Mime_Viewer-2.1.1.tgz ...
Starting to download Horde_Mime_Viewer-2.1.1.tgz (158,271 bytes)
...done: 158,271 bytes
downloading Horde_Perms-2.1.5.tgz ...
Starting to download Horde_Perms-2.1.5.tgz (37,611 bytes)
...done: 37,611 bytes
downloading Horde_Serialize-2.0.4.tgz ...
Starting to download Horde_Serialize-2.0.4.tgz (16,062 bytes)
...done: 16,062 bytes
downloading Horde_Support-2.1.4.tgz ...
Starting to download Horde_Support-2.1.4.tgz (24,457 bytes)
...done: 24,457 bytes
downloading Horde_Url-2.2.4.tgz ...
Starting to download Horde_Url-2.2.4.tgz (16,255 bytes)
...done: 16,255 bytes
downloading Horde_Vfs-2.3.0.tgz ...
Starting to download Horde_Vfs-2.3.0.tgz (72,130 bytes)
...done: 72,130 bytes
downloading Horde_View-2.0.5.tgz ...
Starting to download Horde_View-2.0.5.tgz (43,917 bytes)
...done: 43,917 bytes
downloading Horde_Share-2.0.7.tgz ...
Starting to download Horde_Share-2.0.7.tgz (59,644 bytes)
...done: 59,644 bytes
downloading Horde_Alarm-2.2.5.tgz ...
Starting to download Horde_Alarm-2.2.5.tgz (38,266 bytes)
...done: 38,266 bytes
downloading Horde_Autoloader-2.1.1.tgz ...
Starting to download Horde_Autoloader-2.1.1.tgz (15,486 bytes)
...done: 15,486 bytes
downloading Horde_Browser-2.0.10.tgz ...
Starting to download Horde_Browser-2.0.10.tgz (37,272 bytes)
...done: 37,272 bytes
downloading Horde_Form-2.0.11.tgz ...
Starting to download Horde_Form-2.0.11.tgz (192,911 bytes)
...done: 192,911 bytes
downloading Horde_Group-2.0.5.tgz ...
Starting to download Horde_Group-2.0.5.tgz (20,754 bytes)
...done: 20,754 bytes
downloading Horde_Http-2.1.5.tgz ...
Starting to download Horde_Http-2.1.5.tgz (15,040 bytes)
...done: 15,040 bytes
downloading Horde_Image-2.3.3.tgz ...
Starting to download Horde_Image-2.3.3.tgz (769,167 bytes)
...done: 769,167 bytes
downloading Horde_LoginTasks-2.0.5.tgz ...
Starting to download Horde_LoginTasks-2.0.5.tgz (30,016 bytes)
...done: 30,016 bytes
downloading Horde_Mail-2.6.2.tgz ...
Starting to download Horde_Mail-2.6.2.tgz (37,133 bytes)
...done: 37,133 bytes
downloading Horde_Nls-2.0.5.tgz ...
Starting to download Horde_Nls-2.0.5.tgz (446,788 bytes)
...done: 446,788 bytes
downloading Horde_Prefs-2.7.4.tgz ...
Starting to download Horde_Prefs-2.7.4.tgz (53,945 bytes)
...done: 53,945 bytes
downloading Horde_Rpc-2.1.5.tgz ...
Starting to download Horde_Rpc-2.1.5.tgz (38,795 bytes)
...done: 38,795 bytes
downloading Horde_Text_Diff-2.1.1.tgz ...
Starting to download Horde_Text_Diff-2.1.1.tgz (29,004 bytes)
...done: 29,004 bytes
downloading Horde_Token-2.0.6.tgz ...
Starting to download Horde_Token-2.0.6.tgz (31,120 bytes)
...done: 31,120 bytes
downloading Horde_Text_Filter-2.3.2.tgz ...
Starting to download Horde_Text_Filter-2.3.2.tgz (52,757 bytes)
...done: 52,757 bytes
downloading Horde_Tree-2.0.4.tgz ...
Starting to download Horde_Tree-2.0.4.tgz (18,995 bytes)
...done: 18,995 bytes
downloading Net_DNS2-1.4.1.tgz ...
Starting to download Net_DNS2-1.4.1.tgz (80,324 bytes)
...done: 80,324 bytes
downloading Services_Weather-1.4.7.tgz ...
Starting to download Services_Weather-1.4.7.tgz (55,519 bytes)
...done: 55,519 bytes
downloading Horde_ActiveSync-2.29.2.tgz ...
Starting to download Horde_ActiveSync-2.29.2.tgz (361,586 bytes)
...done: 361,586 bytes
downloading Horde_Feed-2.0.3.tgz ...
Starting to download Horde_Feed-2.0.3.tgz (1,612,391 bytes)
...done: 1,612,391 bytes
downloading Horde_Oauth-2.0.3.tgz ...
Starting to download Horde_Oauth-2.0.3.tgz (6,134 bytes)
...done: 6,134 bytes
downloading Horde_OpenXchange-1.0.0.tgz ...
Starting to download Horde_OpenXchange-1.0.0.tgz (5,953 bytes)
...done: 5,953 bytes
downloading Horde_Service_Facebook-2.0.8.tgz ...
Starting to download Horde_Service_Facebook-2.0.8.tgz (31,046 bytes)
...done: 31,046 bytes
downloading Horde_Service_Twitter-2.1.5.tgz ...
Starting to download Horde_Service_Twitter-2.1.5.tgz (9,715 bytes)
...done: 9,715 bytes
downloading Horde_Service_Weather-2.2.0.tgz ...
Starting to download Horde_Service_Weather-2.2.0.tgz (188,393 bytes)
...done: 188,393 bytes
downloading Horde_SyncMl-2.0.5.tgz ...
Starting to download Horde_SyncMl-2.0.5.tgz (134,681 bytes)
...done: 134,681 bytes
downloading Console_Table-1.2.1.tgz ...
Starting to download Console_Table-1.2.1.tgz (11,332 bytes)
...done: 11,332 bytes
downloading File_Find-1.3.3.tgz ...
Starting to download File_Find-1.3.3.tgz (8,092 bytes)
...done: 8,092 bytes
downloading File_Fstab-2.0.3.tgz ...
Starting to download File_Fstab-2.0.3.tgz (7,084 bytes)
...done: 7,084 bytes
downloading Horde_Data-2.1.3.tgz ...
Starting to download Horde_Data-2.1.3.tgz (44,319 bytes)
...done: 44,319 bytes
downloading Horde_Date_Parser-2.0.4.tgz ...
Starting to download Horde_Date_Parser-2.0.4.tgz (29,661 bytes)
...done: 29,661 bytes
downloading Horde_Dav-1.1.2.tgz ...
Starting to download Horde_Dav-1.1.2.tgz (218,883 bytes)
...done: 218,883 bytes
downloading Horde_History-2.3.5.tgz ...
Starting to download Horde_History-2.3.5.tgz (26,165 bytes)
...done: 26,165 bytes
downloading Horde_Icalendar-2.1.1.tgz ...
Starting to download Horde_Icalendar-2.1.1.tgz (102,095 bytes)
...done: 102,095 bytes
downloading Horde_Lock-2.1.1.tgz ...
Starting to download Horde_Lock-2.1.1.tgz (17,366 bytes)
...done: 17,366 bytes
downloading Horde_Notification-2.0.2.tgz ...
Starting to download Horde_Notification-2.0.2.tgz (20,926 bytes)
...done: 20,926 bytes
downloading Horde_Timezone-1.0.9.tgz ...
Starting to download Horde_Timezone-1.0.9.tgz (21,519 bytes)
...done: 21,519 bytes
downloading Date-1.4.7.tgz ...
Starting to download Date-1.4.7.tgz (55,754 bytes)
...done: 55,754 bytes
downloading Horde_Test-2.5.1.tgz ...
Starting to download Horde_Test-2.5.1.tgz (802,217 bytes)
...done: 802,217 bytes
downloading Horde_Cli-2.0.6.tgz ...
Starting to download Horde_Cli-2.0.6.tgz (26,797 bytes)
...done: 26,797 bytes
downloading Horde_Crypt-2.6.1.tgz ...
Starting to download Horde_Crypt-2.6.1.tgz (148,742 bytes)
...done: 148,742 bytes
downloading Horde_Pdf-2.0.5.tgz ...
Starting to download Horde_Pdf-2.0.5.tgz (52,597 bytes)
...done: 52,597 bytes
downloading Horde_Routes-2.0.4.tgz ...
Starting to download Horde_Routes-2.0.4.tgz (45,025 bytes)
...done: 45,025 bytes
downloading Horde_Queue-1.1.2.tgz ...
Starting to download Horde_Queue-1.1.2.tgz (11,837 bytes)
...done: 11,837 bytes
downloading Horde_Imsp-2.0.8.tgz ...
Starting to download Horde_Imsp-2.0.8.tgz (33,153 bytes)
...done: 33,153 bytes
downloading Horde_Kolab_Format-2.0.7.tgz ...
Starting to download Horde_Kolab_Format-2.0.7.tgz (58,180 bytes)
...done: 58,180 bytes
downloading Horde_Kolab_Storage-2.1.4.tgz ...
Starting to download Horde_Kolab_Storage-2.1.4.tgz (169,692 bytes)
...done: 169,692 bytes
downloading Horde_Ldap-2.3.1.tgz ...
Starting to download Horde_Ldap-2.3.1.tgz (64,817 bytes)
...done: 64,817 bytes
downloading Horde_Compress-2.1.3.tgz ...
Starting to download Horde_Compress-2.1.3.tgz (2,193,766 bytes)
...done: 2,193,766 bytes
downloading Horde_Compress_Fast-1.1.0.tgz ...
Starting to download Horde_Compress_Fast-1.1.0.tgz (12,955 bytes)
...done: 12,955 bytes
downloading Horde_CssMinify-1.0.2.tgz ...
Starting to download Horde_CssMinify-1.0.2.tgz (11,580 bytes)
...done: 11,580 bytes
downloading Horde_HashTable-1.2.3.tgz ...
Starting to download Horde_HashTable-1.2.3.tgz (16,592 bytes)
...done: 16,592 bytes
downloading Horde_JavascriptMinify-1.1.2.tgz ...
Starting to download Horde_JavascriptMinify-1.1.2.tgz (13,056 bytes)
...done: 13,056 bytes
downloading Horde_Log-2.1.2.tgz ...
Starting to download Horde_Log-2.1.2.tgz (14,547 bytes)
...done: 14,547 bytes
downloading Horde_Pack-1.0.5.tgz ...
Starting to download Horde_Pack-1.0.5.tgz (15,938 bytes)
...done: 15,938 bytes
downloading Horde_Secret-2.0.4.tgz ...
Starting to download Horde_Secret-2.0.4.tgz (13,603 bytes)
...done: 13,603 bytes
downloading Horde_SessionHandler-2.2.4.tgz ...
Starting to download Horde_SessionHandler-2.2.4.tgz (23,764 bytes)
...done: 23,764 bytes
downloading Horde_Template-2.0.2.tgz ...
Starting to download Horde_Template-2.0.2.tgz (14,865 bytes)
...done: 14,865 bytes
downloading Horde_Translation-2.2.0.tgz ...
Starting to download Horde_Translation-2.2.0.tgz (15,761 bytes)
...done: 15,761 bytes
downloading Horde_Imap_Client-2.29.3.tgz ...
Starting to download Horde_Imap_Client-2.29.3.tgz (242,287 bytes)
...done: 242,287 bytes
downloading Horde_JavascriptMinify_Jsmin-1.0.1.tgz ...
Starting to download Horde_JavascriptMinify_Jsmin-1.0.1.tgz (4,776 bytes)
...done: 4,776 bytes
downloading Horde_Kolab_Server-2.0.4.tgz ...
Starting to download Horde_Kolab_Server-2.0.4.tgz (101,950 bytes)
...done: 101,950 bytes
downloading Horde_Kolab_Session-2.0.2.tgz ...
Starting to download Horde_Kolab_Session-2.0.2.tgz (21,214 bytes)
...done: 21,214 bytes
downloading Horde_Mongo-1.0.3.tgz ...
Starting to download Horde_Mongo-1.0.3.tgz (11,078 bytes)
...done: 11,078 bytes
downloading Horde_SpellChecker-2.1.2.tgz ...
Starting to download Horde_SpellChecker-2.1.2.tgz (13,227 bytes)
...done: 13,227 bytes
downloading Text_CAPTCHA-1.0.2.tgz ...
Starting to download Text_CAPTCHA-1.0.2.tgz (196,576 bytes)
...done: 196,576 bytes
downloading Text_Figlet-1.0.2.tgz ...
Starting to download Text_Figlet-1.0.2.tgz (8,775 bytes)
...done: 8,775 bytes
downloading pam-1.0.3.tgz ...
Starting to download pam-1.0.3.tgz (6,671 bytes)
...done: 6,671 bytes
downloading Horde_Memcache-2.0.7.tgz ...
Starting to download Horde_Memcache-2.0.7.tgz (14,519 bytes)
...done: 14,519 bytes
downloading APC-3.1.13.tgz ...
Starting to download APC-3.1.13.tgz (171,591 bytes)
...done: 171,591 bytes
downloading Horde_ListHeaders-1.2.2.tgz ...
Starting to download Horde_ListHeaders-1.2.2.tgz (16,437 bytes)
...done: 16,437 bytes
downloading Horde_Stream-1.6.2.tgz ...
Starting to download Horde_Stream-1.6.2.tgz (17,823 bytes)
...done: 17,823 bytes
downloading Horde_Stream_Filter-2.0.3.tgz ...
Starting to download Horde_Stream_Filter-2.0.3.tgz (13,502 bytes)
...done: 13,502 bytes
downloading Horde_Text_Flowed-2.0.2.tgz ...
Starting to download Horde_Text_Flowed-2.0.2.tgz (14,241 bytes)
...done: 14,241 bytes
downloading intl-3.0.0.tgz ...
Starting to download intl-3.0.0.tgz (248,200 bytes)
...done: 248,200 bytes
downloading LZF-1.6.3.tgz ...
Starting to download LZF-1.6.3.tgz (15,545 bytes)
...done: 15,545 bytes
downloading Horde_Stream_Wrapper-2.1.2.tgz ...
Starting to download Horde_Stream_Wrapper-2.1.2.tgz (5,479 bytes)
...done: 5,479 bytes
downloading pecl_http-2.5.3.tgz ...
Starting to download pecl_http-2.5.3.tgz (191,863 bytes)
...done: 191,863 bytes
downloading XML_SVG-1.1.0.tgz ...
Starting to download XML_SVG-1.1.0.tgz (7,663 bytes)
...done: 7,663 bytes
downloading Horde_Idna-1.0.3.tgz ...
Starting to download Horde_Idna-1.0.3.tgz (6,556 bytes)
...done: 6,556 bytes
downloading Horde_Smtp-1.9.1.tgz ...
Starting to download Horde_Smtp-1.9.1.tgz (31,855 bytes)
...done: 31,855 bytes
downloading Net_SMTP-1.7.1.tgz ...
Starting to download Net_SMTP-1.7.1.tgz (14,815 bytes)
...done: 14,815 bytes
downloading Horde_Xml_Element-2.0.3.tgz ...
Starting to download Horde_Xml_Element-2.0.3.tgz (10,899 bytes)
...done: 10,899 bytes
downloading xdiff-1.4.1.tgz ...
Starting to download xdiff-1.4.1.tgz (8,623 bytes)
...done: 8,623 bytes
downloading Horde_Text_Filter_Jsmin-1.0.1.tgz ...
Starting to download Horde_Text_Filter_Jsmin-1.0.1.tgz (4,601 bytes)
...done: 4,601 bytes
downloading HTTP_Request-1.4.4.tgz ...
Starting to download HTTP_Request-1.4.4.tgz (17,109 bytes)
...done: 17,109 bytes
downloading Net_FTP-1.4.0.tgz ...
Starting to download Net_FTP-1.4.0.tgz (35,344 bytes)
...done: 35,344 bytes
downloading Cache-1.5.6.tgz ...
Starting to download Cache-1.5.6.tgz (31,384 bytes)
...done: 31,384 bytes
downloading DB-1.8.2.tgz ...
Starting to download DB-1.8.2.tgz (131,693 bytes)
...done: 131,693 bytes
downloading Horde_Mapi-1.0.5.tgz ...
Starting to download Horde_Mapi-1.0.5.tgz (17,821 bytes)
...done: 17,821 bytes
downloading Horde_Xml_Wbxml-2.0.2.tgz ...
Starting to download Horde_Xml_Wbxml-2.0.2.tgz (26,594 bytes)
...done: 26,594 bytes
downloading Net_IMAP-1.1.3.tgz ...
Starting to download Net_IMAP-1.1.3.tgz (40,494 bytes)
...done: 40,494 bytes
downloading horde_lz4-1.0.8.tgz ...
Starting to download horde_lz4-1.0.8.tgz (31,134 bytes)
...done: 31,134 bytes
downloading Horde_Css_Parser-1.0.7.tgz ...
Starting to download Horde_Css_Parser-1.0.7.tgz (80,157 bytes)
...done: 80,157 bytes
downloading Horde_Constraint-2.0.2.tgz ...
Starting to download Horde_Constraint-2.0.2.tgz (5,032 bytes)
...done: 5,032 bytes
downloading Horde_Scribe-2.0.2.tgz ...
Starting to download Horde_Scribe-2.0.2.tgz (5,074 bytes)
...done: 5,074 bytes
downloading igbinary-1.2.1.tgz ...
Starting to download igbinary-1.2.1.tgz (36,869 bytes)
...done: 36,869 bytes
downloading Horde_Crypt_Blowfish-1.1.0.tgz ...
Starting to download Horde_Crypt_Blowfish-1.1.0.tgz (25,976 bytes)
...done: 25,976 bytes
downloading Horde_Socket_Client-2.0.0.tgz ...
Starting to download Horde_Socket_Client-2.0.0.tgz (12,722 bytes)
...done: 12,722 bytes
downloading Horde_Stringprep-1.0.2.tgz ...
Starting to download Horde_Stringprep-1.0.2.tgz (63,820 bytes)
...done: 63,820 bytes
downloading mongo-1.6.11.tgz ...
Starting to download mongo-1.6.11.tgz (209,141 bytes)
...done: 209,141 bytes
downloading Text_Password-1.1.1.tgz ...
Starting to download Text_Password-1.1.1.tgz (4,357 bytes)
...done: 4,357 bytes
downloading raphf-1.1.0.tgz ...
Starting to download raphf-1.1.0.tgz (12,649 bytes)
...done: 12,649 bytes
downloading propro-1.0.0.tgz ...
Starting to download propro-1.0.0.tgz (6,217 bytes)
...done: 6,217 bytes
downloading Net_Socket-1.0.14.tgz ...
Starting to download Net_Socket-1.0.14.tgz (5,600 bytes)
...done: 5,600 bytes
downloading Auth_SASL-1.0.6.tgz ...
Starting to download Auth_SASL-1.0.6.tgz (9,119 bytes)
...done: 9,119 bytes
downloading Net_URL-1.0.15.tgz ...
Starting to download Net_URL-1.0.15.tgz (6,303 bytes)
...done: 6,303 bytes
downloading Math_BigInteger-1.0.2.tgz ...
Starting to download Math_BigInteger-1.0.2.tgz (27,854 bytes)
...done: 27,854 bytes
downloading Horde_Thrift-2.0.2.tgz ...
Starting to download Horde_Thrift-2.0.2.tgz (22,656 bytes)
...done: 22,656 bytes
install ok: channel://pear.horde.org/Horde_Util-2.5.6
install ok: channel://pear.horde.org/Horde_Autoloader-2.1.1
install ok: channel://pear.php.net/Net_DNS2-1.4.1
install ok: channel://pear.php.net/Console_Table-1.2.1
install ok: channel://pear.php.net/File_Find-1.3.3
install ok: channel://pear.php.net/File_Fstab-2.0.3
install ok: channel://pear.php.net/Date-1.4.7
install ok: channel://pear.horde.org/Horde_Queue-1.1.2
install ok: channel://pear.horde.org/Horde_Template-2.0.2
install ok: channel://pear.horde.org/Horde_Translation-2.2.0
install ok: channel://pear.php.net/Text_Figlet-1.0.2
install ok: channel://pecl.php.net/pam-1.0.3
install ok: channel://pecl.php.net/APC-3.1.13
install ok: channel://pear.horde.org/Horde_Stream_Filter-2.0.3
install ok: channel://pecl.php.net/intl-3.0.0
install ok: channel://pecl.php.net/LZF-1.6.3
install ok: channel://pear.horde.org/Horde_Stream_Wrapper-2.1.2
install ok: channel://pear.php.net/XML_SVG-1.1.0
install ok: channel://pecl.php.net/xdiff-1.4.1
install ok: channel://pear.php.net/Net_FTP-1.4.0
install ok: channel://pear.php.net/Cache-1.5.6
install ok: channel://pear.php.net/DB-1.8.2
install ok: channel://pear.horde.org/horde_lz4-1.0.8
install ok: channel://pear.horde.org/Horde_Css_Parser-1.0.7
install ok: channel://pear.horde.org/Horde_Constraint-2.0.2
install ok: channel://pecl.php.net/igbinary-1.2.1
install ok: channel://pear.horde.org/Horde_Stringprep-1.0.2
install ok: channel://pecl.php.net/mongo-1.6.11
install ok: channel://pear.php.net/Text_Password-1.1.1
install ok: channel://pecl.php.net/raphf-1.1.0
install ok: channel://pecl.php.net/propro-1.0.0
install ok: channel://pear.php.net/Net_Socket-1.0.14
install ok: channel://pear.php.net/Auth_SASL-1.0.6
install ok: channel://pear.php.net/Net_URL-1.0.15
install ok: channel://pear.php.net/Math_BigInteger-1.0.2
install ok: channel://pear.horde.org/Horde_Thrift-2.0.2
install ok: channel://pear.horde.org/Horde_Exception-2.0.6
install ok: channel://pear.horde.org/Horde_LoginTasks-2.0.5
install ok: channel://pear.horde.org/Horde_Nls-2.0.5
install ok: channel://pear.horde.org/Horde_Imsp-2.0.8
install ok: channel://pear.horde.org/Horde_Mongo-1.0.3
install ok: channel://pear.php.net/Text_CAPTCHA-1.0.2
install ok: channel://pear.horde.org/Horde_Text_Flowed-2.0.2
install ok: channel://pecl.php.net/pecl_http-2.5.3
install ok: channel://pear.php.net/Net_SMTP-1.7.1
install ok: channel://pear.php.net/HTTP_Request-1.4.4
install ok: channel://pear.horde.org/Horde_Xml_Wbxml-2.0.2
install ok: channel://pear.php.net/Net_IMAP-1.1.3
install ok: channel://pear.horde.org/Horde_Scribe-2.0.2
install ok: channel://pear.horde.org/Horde_Date-2.1.1
install ok: channel://pear.horde.org/Horde_Injector-2.0.4
install ok: channel://pear.horde.org/Horde_Argv-2.0.11
install ok: channel://pear.horde.org/Horde_Auth-2.1.10
install ok: channel://pear.horde.org/Horde_Serialize-2.0.4
install ok: channel://pear.horde.org/Horde_Support-2.1.4
install ok: channel://pear.horde.org/Horde_Url-2.2.4
install ok: channel://pear.horde.org/Horde_Vfs-2.3.0
install ok: channel://pear.horde.org/Horde_Browser-2.0.10
install ok: channel://pear.horde.org/Horde_Group-2.0.5
install ok: channel://pear.horde.org/Horde_Text_Diff-2.1.1
install ok: channel://pear.php.net/Services_Weather-1.4.7
install ok: channel://pear.horde.org/Horde_Notification-2.0.2
install ok: channel://pear.horde.org/Horde_Pdf-2.0.5
install ok: channel://pear.horde.org/Horde_Routes-2.0.4
install ok: channel://pear.horde.org/Horde_Kolab_Format-2.0.7
install ok: channel://pear.horde.org/Horde_Ldap-2.3.1
install ok: channel://pear.horde.org/Horde_Compress_Fast-1.1.0
install ok: channel://pear.horde.org/Horde_HashTable-1.2.3
install ok: channel://pear.horde.org/Horde_Log-2.1.2
install ok: channel://pear.horde.org/Horde_Kolab_Session-2.0.2
install ok: channel://pear.horde.org/Horde_SpellChecker-2.1.2
install ok: channel://pear.horde.org/Horde_Memcache-2.0.7
install ok: channel://pear.horde.org/Horde_Stream-1.6.2
install ok: channel://pear.horde.org/Horde_Idna-1.0.3
install ok: channel://pear.horde.org/Horde_Xml_Element-2.0.3
install ok: channel://pear.horde.org/Horde_Socket_Client-2.0.0
install ok: channel://pear.horde.org/Horde_Db-2.2.3
install ok: channel://pear.horde.org/Horde_Controller-2.0.3
install ok: channel://pear.horde.org/Horde_Cache-2.5.0
install ok: channel://pear.horde.org/Horde_Editor-2.0.4
install ok: channel://pear.horde.org/Horde_View-2.0.5
install ok: channel://pear.horde.org/Horde_Alarm-2.2.5
install ok: channel://pear.horde.org/Horde_Http-2.1.5
install ok: channel://pear.horde.org/Horde_Image-2.3.3
install ok: channel://pear.horde.org/Horde_Mail-2.6.2
install ok: channel://pear.horde.org/Horde_Token-2.0.6
install ok: channel://pear.horde.org/Horde_Text_Filter-2.3.2
install ok: channel://pear.horde.org/Horde_Tree-2.0.4
install ok: channel://pear.horde.org/Horde_Date_Parser-2.0.4
install ok: channel://pear.horde.org/Horde_Lock-2.1.1
install ok: channel://pear.horde.org/Horde_Test-2.5.1
install ok: channel://pear.horde.org/Horde_Cli-2.0.6
install ok: channel://pear.horde.org/Horde_CssMinify-1.0.2
install ok: channel://pear.horde.org/Horde_JavascriptMinify-1.1.2
install ok: channel://pear.horde.org/Horde_Pack-1.0.5
install ok: channel://pear.horde.org/Horde_SessionHandler-2.2.4
install ok: channel://pear.horde.org/Horde_Kolab_Server-2.0.4
install ok: channel://pear.horde.org/Horde_Mapi-1.0.5
install ok: channel://pear.horde.org/Horde_Crypt_Blowfish-1.1.0
install ok: channel://pear.horde.org/Horde_Rdo-2.0.4
install ok: channel://pear.horde.org/Horde_ElasticSearch-1.0.3
install ok: channel://pear.horde.org/Horde_Perms-2.1.5
install ok: channel://pear.horde.org/Horde_Feed-2.0.3
install ok: channel://pear.horde.org/Horde_Oauth-2.0.3
install ok: channel://pear.horde.org/Horde_Service_Facebook-2.0.8
install ok: channel://pear.horde.org/Horde_Service_Weather-2.2.0
install ok: channel://pear.horde.org/Horde_History-2.3.5
install ok: channel://pear.horde.org/Horde_Icalendar-2.1.1
install ok: channel://pear.horde.org/Horde_Secret-2.0.4
install ok: channel://pear.horde.org/Horde_JavascriptMinify_Jsmin-1.0.1
install ok: channel://pear.horde.org/Horde_ListHeaders-1.2.2
install ok: channel://pear.horde.org/Horde_Smtp-1.9.1
install ok: channel://pear.horde.org/Horde_Text_Filter_Jsmin-1.0.1
install ok: channel://pear.horde.org/Horde_Mime-2.9.2
install ok: channel://pear.horde.org/Horde_Share-2.0.7
install ok: channel://pear.horde.org/Horde_OpenXchange-1.0.0
install ok: channel://pear.horde.org/Horde_Service_Twitter-2.1.5
install ok: channel://pear.horde.org/Horde_SyncMl-2.0.5
install ok: channel://pear.horde.org/Horde_Timezone-1.0.9
install ok: channel://pear.horde.org/Horde_Prefs-2.7.4
install ok: channel://pear.horde.org/Horde_Data-2.1.3
install ok: channel://pear.horde.org/Horde_Crypt-2.6.1
install ok: channel://pear.horde.org/Horde_Kolab_Storage-2.1.4
install ok: channel://pear.horde.org/Horde_Compress-2.1.3
install ok: channel://pear.horde.org/Horde_Imap_Client-2.29.3
install ok: channel://pear.horde.org/Horde_Mime_Viewer-2.1.1
install ok: channel://pear.horde.org/Horde_ActiveSync-2.29.2
install ok: channel://pear.horde.org/Horde_Core-2.22.0
install ok: channel://pear.horde.org/content-2.0.4
install ok: channel://pear.horde.org/timeobjects-2.1.0
install ok: channel://pear.horde.org/Horde_Form-2.0.11
install ok: channel://pear.horde.org/Horde_Dav-1.1.2
install ok: channel://pear.horde.org/Horde_Rpc-2.1.5
install ok: channel://pear.horde.org/horde-5.2.7
install ok: channel://pear.horde.org/gollem-3.0.5
install ok: channel://pear.horde.org/kronolith-4.2.9
install ok: channel://pear.horde.org/mnemo-4.2.7
install ok: channel://pear.horde.org/nag-4.2.5
install ok: channel://pear.horde.org/trean-1.1.2
install ok: channel://pear.horde.org/turba-4.2.8
install ok: channel://pear.horde.org/groupware-5.2.10

Horde groupware configuration

groupware-install
Installing Horde Groupware
 
Configuring database settings
 
What database backend should we use? 
    (false) [None]
    (mysql) MySQL / PDO
    (mysqli) MySQL (mysqli)
    (oci8) Oracle
    (pgsql) PostgreSQL
    (sqlite) SQLite
 
Type your choice []: mysql
 
Username to connect to the database as* [] hordeuser 
Password to connect with 
How should we connect to the database? 
    (unix) UNIX Sockets
    (tcp) TCP/IP
 
Type your choice [unix]: 
 
Location of UNIX socket [] /var/run/mysqld/mysqld.sock
 
Database name to use* [] hordedb
 
Internally used charset* [utf-8] 
Use SSL to connect to the server? 
    (1) Yes
    (0) No
 
Type your choice [0]: 
 
Certification Authority to use for SSL connections [] 
Split reads to a different server? 
    (false) Disabled
    (true) Enabled
 
Type your choice [false]: 
 
Writing main configuration file... done.
 
Creating and updating database tables... done.
 
Configuring administrator settings
 
Specify a user name for the administrator account: admin@mydomain.com
Specify a password for the administrator account: 
 
Writing main configuration file... done.
 
 
 
Thank you for using Horde Groupware!
chown -R www-data:www-data $INSTALL_PATH

horde configuration

Based on : http://howto.biapy.com/fr/debian-gnu-linux/applications-web/e-mails/installer-horde-groupware-webmail-edition-sur-debian and : https://blog-du-grouik.tinad.fr/post/2012/11/25/horde-5

cat << "EOF" > $INSTALL_PATH/config/conf.local.php
<?php
 
$runningMode="prod";
//$runningMode="conf";
 
/* logging */
$conf['activesync']['logging']['type'] = 'horde';
$conf['log']['priority'] = 'INFO';
/*
$conf['log']['priority'] = 'DEBUG';
$conf['activesync']['logging']['path'] = '/data/horde/activesync';
$conf['activesync']['logging']['level'] = '1';
$conf['activesync']['logging']['type'] = 'perdevice';
*/
 
/* admin email */
$conf['auth']['admins'] = array('__ADMIN_MAIL');
 
/* problem managment */
$conf['problems']['maildomain'] = '__DEFAULT_MAIL_DOMAIN';
$conf['problems']['email'] = '__CONTACT_MAIL';
 
/* SSL URLs */
$conf['use_ssl'] = __FORCESSL;
 
/* authentication */
if ($runningMode == "prod") {
  $conf['auth']['driver'] = 'customsql';
  $conf['auth']['params']['count_bad_logins'] = true;
  $conf['auth']['params']['login_block'] = true;
  $conf['auth']['params']['phptype'] = 'mysqli';
  $conf['auth']['params']['socket'] = '/var/run/mysqld/mysqld.sock';
  $conf['auth']['params']['protocol'] = 'unix';
  $conf['auth']['params']['username'] = '__PFARWDBUSER';
  $conf['auth']['params']['password'] = '__PFARWDBPW';
  $conf['auth']['params']['database'] = '__PFARWDBNAME';
  $conf['auth']['params']['query_auth'] = 'SELECT * FROM mailbox WHERE username=\L AND domain=SUBSTRING_INDEX(\L, \'@\', -1) AND password = \P AND active=\'1\'';
  //$conf['auth']['params']['query_add'] = 'INSERT INTO mailbox (username, password, name, maildir, quota, local_part, domain, created, modified, active) VALUES( \L, \P, \'\', CONCAT(SUBSTRING_INDEX(\L, \'@\', -1),\'/\',SUBSTRING_INDEX(\L, \'@\', 1),\'/\'), \'0\', SUBSTRING_INDEX(\L, \'@\', 1), SUBSTRING_INDEX(\L, \'@\', -1), NOW(), NOW(), \'1\'  ); INSERT INTO alias (address, goto, domain, created, modified, active) VALUES ( \L, \L, SUBSTRING_INDEX(\L, \'@\', -1), NOW(), NOW(), \'1\'  )';
  $conf['auth']['params']['query_add'] = 'ADDING USER DISABLED - PLEASE USE PostfixAdmin.';
  $conf['auth']['params']['query_getpw'] = 'SELECT password FROM mailbox WHERE username=\L';
  $conf['auth']['params']['query_update'] = 'UPDATE mailbox SET username=\L, password=\P, modified=NOW() WHERE username=\O;';
  $conf['auth']['params']['query_resetpassword'] = 'UPDATE mailbox SET  password=\P, modified=NOW() WHERE username=\L;';
  //$conf['auth']['params']['query_remove'] = 'UPDATE mailbox SET active=\'0\' WHERE username=\L;';
  $conf['auth']['params']['query_remove'] = 'REMOVING USER DISABLED - PLEASE USE PostfixAdmin.';
  $conf['auth']['params']['query_list'] = 'SELECT username FROM mailbox WHERE domain=SUBSTRING_INDEX(\L, \'@\', -1) AND active=\'1\'';
  $conf['auth']['params']['query_exists'] = 'SELECT 1 FROM mailbox WHERE username = \L AND active=\'1\'';
  $conf['auth']['params']['encryption'] = 'crypt-md5';
  }
else {
  $conf['auth']['driver'] = 'sql';
  $conf['auth']['params']['driverconfig'] = 'horde';
  $conf['auth']['params']['encryption'] = 'ssha';
  $conf['auth']['params']['show_encryption'] = false;
  $conf['auth']['params']['count_bad_logins'] = false;
  $conf['auth']['params']['login_block'] = false;
  $conf['auth']['params']['login_block_count'] = 5;
  $conf['auth']['params']['login_block_time'] = 5;
  }
 
/* IMAP */
$servers['imap']['hostspec'] = '__IMAP_SERVER';
$servers['imap']['hordeauth'] = 'full';
$servers['imap']['secure'] = 'tls';
$conf['imap']['enabled'] = true;
$conf['imap']['server'] = '__IMAP_SERVER';
$conf['imap']['port'] = 143;
$conf['imap']['secure'] = 'tls';
$conf['imap']['maildomain'] = '__DEFAULT_MAIL_DOMAIN';
$conf['imap']['cache_folders'] = true;
 
/* horde mailer */
$conf['mailer']['params']['host'] = 'localhost';
$conf['mailer']['params']['port'] = 25;
$conf['mailer']['params']['secure'] = 'tls';
$conf['mailer']['params']['localhost'] = 'localhost';
$conf['mailer']['params']['username_auth'] = false;
$conf['mailer']['params']['password_auth'] = false;
$conf['mailer']['params']['auth'] = false;
$conf['mailer']['params']['lmtp'] = false;
$conf['mailer']['type'] = 'smtp';
 
/* email composing */
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_attachments'] = false;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
 
/* spelling check */
$conf['spell']['driver'] = 'aspell';
$conf['spell']['params'] = array(
  'path' => '/usr/bin/aspell'
  );
 
/* activeSync */
$conf['activesync']['enabled'] = true;
$conf['activesync']['emailsync'] = true;
$conf['activesync']['params']['driverconfig'] = 'horde';
$conf['activesync']['storage'] = 'Sql';
$conf['activesync']['auth']['type'] = 'basic';
$conf['activesync']['version'] = '14';
$conf['activesync']['autodiscovery'] = 'full';
$conf['activesync']['hosts']['imap']['host'] = '__IMAP_SERVER';
$conf['activesync']['hosts']['imap']['port'] = 143;
$conf['activesync']['hosts']['smtp']['host'] = '__SMTP_SERVER';
$conf['activesync']['hosts']['smtp']['port'] = 587;
$conf['activesync']['hosts']['smtp']['popauth'] = false;
$conf['activesync']['outlookdiscovery'] = true;
$conf['activesync']['logging']['type'] = 'horde';
$conf['activesync']['ping']['heartbeatmin'] = 20;
$conf['activesync']['ping']['heartbeatmax'] = 2700;
$conf['activesync']['ping']['heartbeatdefault'] = 20;
$conf['activesync']['ping']['deviceping'] = true;
$conf['activesync']['ping']['waitinterval'] = 15;
 
/* security */
$conf['auth']['checkip'] = false;
 
/* image manipulation */
$conf['image']['driver'] = 'Imagick';
$conf['exif']['driver'] = 'Exiftool';
$conf['exif']['params'] = array(
  'exiftool' => '/usr/bin/exiftool'
  );
 
EOF
 
sed -i "s/__DEFAULT_MAIL_DOMAIN/${DEFAULT_MAIL_DOMAIN}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__MAIL_SERVER_FQDN/${MAIL_SERVER_FQDN}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__IMAP_SERVER/${IMAP_SERVER}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__SMTP_SERVER/${SMTP_SERVER}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__ADMIN_MAIL/${ADMIN_MAIL}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__CONTACT_MAIL/${CONTACT_MAIL}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__PFARWDBNAME/${PFARWDBNAME}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__PFARWDBUSER/${PFARWDBUSER}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__PFARWDBPW/${PFARWDBPW}/g" $INSTALL_PATH/config/conf.local.php
sed -i "s/__FORCESSL/${FORCESSL}/g" $INSTALL_PATH/config/conf.local.php
chmod 640 $INSTALL_PATH/config/conf.local.php
chown www-data:www-data $INSTALL_PATH/config/conf.local.php
 
cat << "EOF" > $INSTALL_PATH/config/registry.local.php
<?PHP
$this->applications['horde']['webroot'] = '';
EOF
chmod 640 $INSTALL_PATH/config/registry.local.php
chown www-data:www-data $INSTALL_PATH/config/registry.local.php

Apache 2.4 configuration

cp -a /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf__
TMPFILE=$(tempfile --suffix ".install_horde" tempfile)
cat << 'EOF' > $TMPFILE
 
  # CalDAV/CardDAV autodiscovery
  RedirectPermanent /.well-known/caldav /rpc.php/
  RedirectPermanent /.well-known/carddav /rpc.php/
 
  # Outlook autodiscover URL.
  Alias /autodiscover/autodiscover.xml /var/www/horde/rpc.php
  Alias /autodiscover/Autodiscover.xml /var/www/horde/rpc.php
  Alias /autodiscover/AutoDiscover.xml /var/www/horde/rpc.php
  Alias /autodiscover/autoDiscover.xml /var/www/horde/rpc.php
 
  # ActiveSync
  Alias /Microsoft-Server-ActiveSync /var/www/horde/rpc.php
 
  <Directory __INSTALL_PATH>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride 
    Require all granted
    RewriteEngine On
  </Directory>
 
EOF
sed --follow-symlinks -i "s|DocumentRoot.*|DocumentRoot ${INSTALL_PATH}/|g" /etc/apache2/sites-enabled/000-default.conf
sed --follow-symlinks -i "s|^.*</VirtualHost>.*$||g" /etc/apache2/sites-enabled/000-default.conf
cat $TMPFILE >> /etc/apache2/sites-enabled/000-default.conf
echo "</VirtualHost>" >> /etc/apache2/sites-enabled/000-default.conf
sed --follow-symlinks -i "s|__INSTALL_PATH|${INSTALL_PATH}/|g" /etc/apache2/sites-enabled/000-default.conf
rm $TMPFILE

If SSL, please add the same to the config file, and tune SSL allowed ciphers

a2enmod rewrite
service apache2 stop
service apache2 start

Horde imp install

cd $INSTALL_PATH
pear install -a -B horde/IMP
chown -R www-data:www-data imp/
root@mail:/var/www/horde# pear install -a -B horde/IMP
Unknown remote channel: phpseclib.sourceforge.net
horde/imp can optionally use package "channel://phpseclib.sourceforge.net/File_ASN1"
downloading imp-6.2.10.tgz ...
Starting to download imp-6.2.10.tgz (4,993,229 bytes)
.........................................................................................................done: 4,993,229 bytes
downloading Horde_Itip-2.1.0.tgz ...
Starting to download Horde_Itip-2.1.0.tgz (36,092 bytes)
...done: 36,092 bytes
downloading Horde_Mail_Autoconfig-1.0.2.tgz ...
Starting to download Horde_Mail_Autoconfig-1.0.2.tgz (17,725 bytes)
...done: 17,725 bytes
downloading Horde_Service_Gravatar-1.0.0.tgz ...
Starting to download Horde_Service_Gravatar-1.0.0.tgz (13,162 bytes)
...done: 13,162 bytes
install ok: channel://pear.horde.org/Horde_Itip-2.1.0
install ok: channel://pear.horde.org/Horde_Mail_Autoconfig-1.0.2
install ok: channel://pear.horde.org/Horde_Service_Gravatar-1.0.0
install ok: channel://pear.horde.org/imp-6.2.10

Horde imp configuration

cat << "EOF" > $INSTALL_PATH/imp/config/conf.php
<?php
// $Id: 48bf0b4cc99e7941b4432a29e70e145b8d654cc7 $
$conf['user']['allow_view_source'] = true;
$conf['server']['server_list'] = 'none';
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_attachments'] = false;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
$conf['compose']['reply_limit'] = 200000;
$conf['compose']['ac_threshold'] = 3;
$conf['compose']['htmlsig_img_size'] = 30000;
$conf['pgp']['keylength'] = 0;
$conf['maillog']['driver'] = 'history';
$conf['sentmail']['driver'] = 'Null';
$conf['contactsimage']['backends'] = array('IMP_Contacts_Avatar_Addressbook');
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
EOF
 
cat << "EOF" > $INSTALL_PATH/imp/config/backends.local.php
<?php
$servers['imap'] = array(
    'disabled' => false,
    'name' => 'IMAP Server',
    'hostspec' => 'localhost',
    ’realm’ => ’__DEFAULT_MAIL_DOMAIN’,
    'hordeauth' => 'full',
    'protocol' => 'imap',
    'port' => 143,
    'secure' => 'tls',
    'maildomain' => '',
    'cache' => false,
);
EOF
sed -i "s/__DEFAULT_MAIL_DOMAIN/${DEFAULT_MAIL_DOMAIN}/g" $INSTALL_PATH/imp/config/backends.local.php
chmod 640 $INSTALL_PATH/imp/config/backends.local.php
chown www-data:www-data $INSTALL_PATH/imp/config/backends.local.php

IMP : display inline html

cat << 'EOF' > $INSTALL_PATH/imp/config/mime_drivers.local.php
<?php
// display inline html
$mime_drivers['plain']['inline'] = true;
$mime_drivers['html']['inline'] = true;
EOF
chmod 640 $INSTALL_PATH/imp/config/mime_drivers.local.php
chown www-data:www-data $INSTALL_PATH/imp/config/mime_drivers.local.php
Move emails to trash when deleted
mkdir --parents $INSTALL_PATH/imp/config/prefs.d
chown www-data:www-data $INSTALL_PATH/imp/config/prefs.d
cat << 'EOF' > $INSTALL_PATH/imp/config/prefs.d/use_trash.php
<?php
// Move deleted messages to trash folder
$_prefs['use_trash']['value'] = 1;
EOF
chmod 640 $INSTALL_PATH/imp/config/prefs.d/use_trash.php
chown www-data:www-data $INSTALL_PATH/imp/config/prefs.d/use_trash.php

Ingo - managesieve

In order to use server site filters and action over incoming email in Horde, you need to install ingo.

pear install -a -B horde/ingo

Then goto the Horde administration pannel, clieck on “SQL DB schema is out of date.” at right of Ingo application. And at last, create the configuration files :

cat << "EOF" > $INSTALL_PATH/ingo/config/conf.php
<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: 48142d13ef06c07f56427fe5b43981631bdbfdb0 $
$conf['storage']['driver'] = 'prefs';
$conf['rules']['userheader'] = true;
$conf['spam']['header'] = 'X-Spam-Level';
$conf['spam']['char'] = '*';
$conf['spam']['compare'] = 'string';
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
EOF
cat << "EOF" > $INSTALL_PATH/ingo/config/backends.local.php
<?php
/* Sieve local */
$backends['imap']['disabled'] = true;
$backends['sieve']['disabled'] = false;
$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['hostspec'] = '__DEFAULT_MAIL_DOMAIN';
$backends['sieve']['transport'][Ingo::RULE_ALL]['params']['usetls'] = true;
$backends['sieve']['script'][Ingo::RULE_ALL]['params']['utf8'] = true;
EOF
sed -i "s/__DEFAULT_MAIL_DOMAIN/${DEFAULT_MAIL_DOMAIN}/g" $INSTALL_PATH/ingo/config/backends.local.php
cat << "EOF" > $INSTALL_PATH/ingo/config/hooks.local.php
<?php
class Ingo_Hooks
{
    public function transport_auth($driver)
    {
        switch ($driver) {
        case 'timsieved':
            $full_user = $GLOBALS['registry']->getAuth(null);
            return array(
                'euser' => $full_user,
                'username' => $full_user
            );
        }
    }
}
EOF
cat << "EOF" > $INSTALL_PATH/ingo/config/prefs.local.php
<?php
$_prefs['spam']['locked'] = true;
EOF

Finish and tuning

Login as admin to horde, go to “administration → configuration”, click on “update database schemes”

Tuning php limits

cp -a /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini_
sed -i "s/^memory_limit =.*$/memory_limit = 256M/g" /etc/php5/apache2/php.ini
sed -i "s/^upload_max_filesize.*$/upload_max_filesize = 32M/g" /etc/php5/apache2/php.ini
sed -i "s/^post_max_size.*$/post_max_size = 64M/g" /etc/php5/apache2/php.ini
service apache2 stop
service apache2 start

Disabling apps : goto permissions and add one for the app, keep permissions blank.

Cron for email alarms

cat << 'EOF' > /etc/cron.d/horde
# Horde Alarms
*/5 * * * *   www-data   test -x /usr/bin/horde-alarms && cd /var/www/horde/ && /usr/bin/horde-alarms
EOF
pear config-set -c horde horde_dir /var/www/horde system
service cron stop
service cron start

Theme : see http://wiki.horde.org/Doc/Dev/Themes

Android activesync

In french (sorry) A cause de bugs dans la version 5, suivre cette procédure (effacera toutes les données mail, agenda, contacts) :

If after android accounts and apps data purge, you still have problems : - install F-Droid - install Tasks (tasks sync works !) - install DAVdroid - add your caldav/carddav accounts (one by folder/share)

OTHER/TODO

$_prefs['use_trash']['value'] = 1; \$_prefs['use_trash']['value'] = true; \$_prefs['spam_folder']['value'] = Horde_String::convertCharset('Junk', 'UTF-8', 'UTF7-IMAP'); \$_prefs['move_ham_after_report']['value'] = 1;

https://petermolnar.eu/linux-tech-coding/debian-lightweight-mailserver-postfix-dovecot-dspam

# if error : Class 'Sabre\DAV\Client' not found [pid 1671 on line 23 of “/usr/share/php/Horde/Dav/Client.php”] apt-get install php-sabre-dav php-sabre-vobject

TODO : users default presets