Saturday 25 April, 2009

Installation and Configuration Of Horde on Fedora 10

Step By step Guide to Installation and Configuration Of Horde on Fedora 10

Horde is The Horde Framework provides a common structure and interface for Horde applications (such as IMP, a web-based mail program).

Basicaly I want to try new webmail for cyrus IMAP. So I was in searching for good Webmail application. I tried roundcubemail and atmail also. Both are good in looks but lack in features.

So Friends, Lets start.


1. Prerequisites


apache, php php-imap php-mysql, mysql-server imap(cyrus-imapd) sendmail poppasswd.
Note that This is the prerequisites for my installation.



To install this application you need to have root access on system. off cource.

Open a gnome-terminal ( Kaali Khidaki) my favorite terminal.

switch to root user.

$su -

2. Configure PHP


open /etc/php.ini and edit bellow lines

file_uploads = On
short_open_tag = On


###install horde application and componants. also install turba and kronolith. the address book and calender application along with this.
ingo is The Horde web-based Email Filter Rules Manager
and imp is webmail application.

[root@lp ~]#yum install imp horde kronolith turba ingo -y

It will install few dependamcies also.

3. Configure mysql
Check that mysql is running:
# service mysqld restart

Create the horde database:
# cd /usr/share/horde/scripts/sql/
# vi vim create.mysql.sql #Important#edit the default password
# mysql -p < create.mysql.sql # create the tables

Test to see if you can connect to the database:
# mysql -h localhost -D horde -u horde -p
Exit mysql with the command 'exit'
If you can't connect, look a the throubleshooting guide before continuing


4. Configure Horde config files

Go to:
# cd horde/config

and make a copy of the default configuration files:

Here is my config files fo refence.

[root@lp ~]# cat /etc/horde/conf.php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: horde/config/conf.xml,v 1.74.2.69 2008/06/05 09:05:50 jan Exp $
$conf['vhosts'] = false;
$conf['debug_level'] = E_ALL;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['umask'] = 077;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
$conf['urls']['pretty'] = false;
$conf['safe_ips'] = array();
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/horde';
$conf['sql']['phptype'] = false;
$conf['auth']['admins'] = array('Administrator', 'root', 'sukhdev');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['params']['dsn'] = '{localhost:143/imap/notls}';
$conf['auth']['params']['imapconfig'] = 'dsn';
$conf['auth']['driver'] = 'imap';
$conf['signup']['allow'] = false;
$conf['log']['enabled'] = false;
$conf['log_accesskeys'] = false;
$conf['prefs']['driver'] = 'session';
$conf['alarms']['driver'] = false;
$conf['datatree']['driver'] = 'null';
$conf['group']['driver'] = 'datatree';
$conf['group']['cache'] = false;
$conf['perms']['driver'] = 'datatree';
$conf['share']['no_sharing'] = false;
$conf['share']['any_group'] = false;
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'datatree';
$conf['cache']['default_lifetime'] = 86400;
$conf['cache']['params']['sub'] = 0;
$conf['cache']['driver'] = 'file';
$conf['lock']['driver'] = 'none';
$conf['token']['driver'] = 'none';
$conf['mailer']['params']['sendmail_path'] = '/usr/lib/sendmail';
$conf['mailer']['params']['sendmail_args'] = '-oi';
$conf['mailer']['type'] = 'sendmail';
$conf['mailformat']['brokenrfc2231'] = false;
$conf['vfs']['type'] = 'none';
$conf['sessionhandler']['type'] = 'none';
$conf['sessionhandler']['memcache'] = false;
$conf['problems']['email'] = 'webmaster@example.com';
$conf['problems']['maildomain'] = 'example.com';
$conf['problems']['tickets'] = false;
$conf['problems']['attachments'] = true;
$conf['menu']['apps'] = array();
$conf['menu']['always'] = false;
$conf['menu']['links']['help'] = 'all';
$conf['menu']['links']['options'] = 'authenticated';
$conf['menu']['links']['problem'] = 'all';
$conf['menu']['links']['login'] = 'all';
$conf['menu']['links']['logout'] = 'authenticated';
$conf['hooks']['permsdenied'] = false;
$conf['hooks']['username'] = false;
$conf['hooks']['preauthenticate'] = false;
$conf['hooks']['postauthenticate'] = false;
$conf['hooks']['authldap'] = false;
$conf['hooks']['groupldap'] = false;
$conf['portal']['fixed_blocks'] = array();
$conf['accounts']['driver'] = 'null';
$conf['user']['verify_from_addr'] = false;
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;
$conf['memcache']['enabled'] = false;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */



5. Configure Horde for IMP
Edit this files to allow IMP to run under Horde:

Again I am posting my config file here,

[root@lp ~]# cat /etc/horde/imp/conf.php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: imp/config/conf.xml,v 1.53.2.33 2008/05/06 17:54:04 slusarz Exp $
$conf['spell']['driver'] = '';
$conf['utils']['gnupg_keyserver'] = array('pgp.mit.edu');
$conf['utils']['gnupg_timeout'] = 10;
$conf['menu']['apps'] = array();
$conf['user']['select_sentmail_folder'] = false;
$conf['user']['allow_resume_all_in_drafts'] = false;
$conf['user']['allow_folders'] = true;
$conf['user']['allow_resume_all'] = false;
$conf['user']['allow_view_source'] = true;
$conf['user']['alternate_login'] = false;
$conf['user']['redirect_on_logout'] = false;
$conf['user']['select_view'] = true;
$conf['server']['server_list'] = 'shown';
$conf['server']['fixed_folders'] = array();
$conf['server']['sort_limit'] = 0;
$conf['server']['cache_folders'] = true;
$conf['server']['token_lifetime'] = 1800;
$conf['server']['cachejs'] = 'none';
$conf['server']['cachecss'] = 'none';
$conf['mailbox']['show_preview'] = false;
$conf['fetchmail']['show_account_colors'] = false;
$conf['fetchmail']['size_limit'] = 4000000;
$conf['msgcache']['use_msgcache'] = false;
$conf['mlistcache']['use_mlistcache'] = false;
$conf['msgsettings']['filtering']['words'] = './config/filter.txt';
$conf['msgsettings']['filtering']['replacement'] = '****';
$conf['spam']['reporting'] = false;
$conf['notspam']['reporting'] = false;
$conf['print']['add_printedby'] = false;
$conf['msg']['prepend_header'] = true;
$conf['msg']['append_trailer'] = true;
$conf['compose']['allow_receipts'] = true;
$conf['compose']['special_characters'] = true;
$conf['compose']['use_vfs'] = false;
$conf['compose']['link_all_attachments'] = false;
$conf['compose']['link_attachments_notify'] = true;
$conf['compose']['link_attachments'] = true;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
$conf['compose']['reply_limit'] = 200000;
$conf['hooks']['vinfo'] = false;
$conf['hooks']['postlogin'] = false;
$conf['hooks']['postsent'] = false;
$conf['hooks']['signature'] = false;
$conf['hooks']['trailer'] = false;
$conf['hooks']['fetchmail_filter'] = false;
$conf['hooks']['mbox_redirect'] = false;
$conf['hooks']['mbox_icon'] = false;
$conf['hooks']['spam_bounce'] = false;
$conf['hooks']['msglist_format'] = false;
$conf['maillog']['use_maillog'] = true;
$conf['sentmail']['driver'] = 'none';
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Edit /etc/horde/imp/config/servers.php

$servers['imap'] = array(
'name' => "IMAP Server",
'server' => 'localhost',
'protocol' => 'imap/notls',
'port' => 143,
'folders' => 'mail/',
'namespace' => '',
'port' => 143,
'maildomain' => 'localhost',
'smtphost' => 'localhost',
'smtpport' => 25,
'realm' => '',
'preferred' => 'true'
);


Now you can access the webbased admin consol for remaining config.
http://www.example.com/horde

The following links helped me for reference.
http://www.harkness.co.uk/other/imp_webmail_install.html
http://tweenpath.net/2008/12/install-configuration-of-popopasswd-server-on-centos-52/
http://wiki.horde.org/FAQ/Admin?referrer=FAQ#

You might required to install poppasswd also.
download and install poppasswd.
wget http://rpm.razorsedge.org/centos-5/RE/poppassd-1.8.5-3.el5.re.i386.rpm