How-To: Install Horde Webmail

james99

Verified User
Joined
Jul 24, 2004
Messages
21
I could not fall asleep tonight (way too many iced coffee drinks!), so I decided to try installing Horde on my server. I was expecting it to be extremely difficult, but the documentation really guided me through it.

Here's a how-to for installing it on a DA server:

Go to http://www.directadmin.com/forum/showthread.php?s=&postid=9992#post9992 for instructions on how to compile imap into php

Follow his instructions for steps 1-6.

7) Change the configure.php in /usr/local/directadmin/customapache. Add these lines:
--with-imap=/usr/local/imap-2000e \
--with-gettext
at the end of the configure statement. Remember to add a "\" to the previous line. The configure statement should look like this:

Code:
./configure 

        --with-apxs 

        --with-curl 

        --with-curl-dir=/usr/local/lib 

        --with-gd 

        --with-gd-dir=/usr/local/lib 

        --with-gettext 

        --with-jpeg-dir=/usr/local/lib 

        --with-kerberos 

        --with-mcrypt 

        --with-mysql 

        --with-pear 

        --with-png-dir=/usr/local/lib 

        --with-xml 

        --with-zlib 

        --with-zlib-dir=/usr/local/lib 

        --enable-bcmath 

        --enable-calendar 

        --enable-ftp 

        --enable-magic-quotes 

        --enable-sockets 

        --enable-track-vars 

	--with-imap=/usr/local/imap-2000e \

        --with-gettext

Finish with steps 8 and 9.

Now, do the following via ssh:

Code:
pear install Log
pear install Mail_Mime
cd /var/www/html
wget [url]http://ftp.horde.org/pub/horde/horde-latest.tar.gz[/url]
tar xzpf horde-latest.tar.gz
rm -f horde-latest.tar.gz
dir
See what directory is created, for me it's horde-2.2.5. Then edit

/etc/httpd/conf/httpd.conf to add:

Code:
Alias /horde /var/www/html/horde-2.2.5/

If your folder's version # is different, change it to reflect that. Save and then restart apache (/usr/local/etc/rc.d/httpd restart for BSD, service httpd restart for Linux). Back to the shell:

Code:
cd /var/www/html/horde-2.2.5/scripts/db/

edit mysql_drop.sql to the password of your choice, just for security reasons. then do:

Code:
cat /usr/local/directadmin/scripts/setup.txt

Make a note of what adminpass equals. Replace adminpass below with it.

Code:
mysql -u da_admin -padminpass < mysql_create.sql
cd ../../config
for foo in *.dist; do cp $foo `basename $foo .dist`; done

It's time to test it out. Go to http://yourdomain.com/horde/test.php

You should get:

Horde Versions

* Horde: 2.2.5

PHP Version

* View phpinfo() screen
* PHP Version: 4.3.8
* PHP Major Version: 4.3
* PHP Minor Version: 8
* PHP Version Classification: release
* You are running a supported version of PHP.

PHP Module Capabilities

* DOM XML Support: No
* FTP Support: Yes
* Gettext Support: Yes
* IMAP Support: Yes
* LDAP Support: No
* MCAL Support: No
* Mcrypt Support: Yes
* MySQL Support: Yes
* PostgreSQL Support: No
* XML Support: Yes

Miscellaneous PHP Settings

* magic_quotes_runtime disabled: Yes
* file_uploads enabled: Yes
* safe_mode disabled: Yes
* trans_sid disabled: Yes

PHP Sessions

* Session counter: 6
* To unregister the session: click here

PEAR

* PEAR - Yes
* Recent PEAR - Yes
* Mail - Yes
* Log - Yes
* DB - Yes
* Net_Socket - Yes
* Date - Yes
* HTML_Common/HTML_Select - No
* Horde requires the HTML_Common and HTML_Select classes only for Kronolith 1.0 to

display forms correctly.

Everything that's displaying "No" on my page above won't hinder performance. If you want

all "Yes"/green, I'm sure you can find tutorials elsewhere to get them working.

So, you've installed Horde. Now, that's nice and all, but it's not useful at all right now.

Everything (even mail checking) are external projects you need to add. I'll only get into installing IMP for now, which is their email client.

Code:
cd /var/www/html/horde-2.2.5
wget [url]http://ftp.horde.org/pub/imp/imp-latest.tar.gz[/url]
tar xzpf imp-latest.tar.gz
rm -f imp-latest.tar.gz
mv imp-3.2.5 imp

Edit /var/www/html/horde-2.2.5/config/registry.php and change:
Code:
/* auth: Handler for user authentication.
 *   Uncomment the auth/login/logout lines if you want to let
 *   IMP handle the authentication for Horde. This avoids the
 *   "double login" while accessing IMP.
 */
// $this->registry['auth']['login'] = 'imp';
// $this->registry['auth']['logout'] = 'imp';

to:
Code:
/* auth: Handler for user authentication.
 *   Uncomment the auth/login/logout lines if you want to let
 *   IMP handle the authentication for Horde. This avoids the
 *   "double login" while accessing IMP.
 */
$this->registry['auth']['login'] = 'imp';
$this->registry['auth']['logout'] = 'imp';

and further down in the file, make sure the status for horde is set to active:

$this->applications['horde'] = array(
'fileroot' => dirname(__FILE__) . '/..',
'webroot' => '/horde',
'initial_page' => 'login.php',
'icon' => '/horde/graphics/home.gif',
'name' => _("Horde"),
'allow_guests' => true,
'status' => 'active',
'templates' => dirname(__FILE__) . '/../templates',
'cookie_domain' => $_SERVER['SERVER_NAME'],
// ** If IE will be used to access Horde modules, you should read
// this discussion about the cookie_path setting (discussing issues
// with IE's Content Advisor):
// http://lists.horde.org/archives/imp/Week-of-Mon-20030113/029149.html
'cookie_path' => '/horde',
'server_name' => $_SERVER['SERVER_NAME'],
'server_port' => $_SERVER['SERVER_PORT']
);

then in the shell:
Code:
cd /var/www/html/horde-2.2.5/imp/config
for foo in *.dist; do cp $foo `basename $foo .dist`; done

The documentation says to do some more configuring, but I didn't and it worked immediately.

Try going to http://yourdomain.com/horde/ and logging in using a full email address and password. It works great for me.

Now, this just installs Horde and IMP. It's very barebones, there's no address book or calendar which those of you who used cPanel's Horde earlier are probably used to. But it works!

I'll probably try installing Kronolith (calendar) and Turba (Address Book) and post how-to's for those as well.

Please let me know how it goes for you! :)
 
For PHP :
--with-dom
would be nice to have, Horde 3 will need that and it's going to be released this Fall.


A couple of errors on FreeBSD so far :

-When you say :"edit mysql_drop.sql to the password of your choice, just for security reasons" I guess you were talking about mysql_create.sql?

-I wasn't able to do : mysql -u da_admin -padminpass < mysql_create.sql
my password was always rejected. It could be that the tech support team messed everything up...Using root worked though.

-I had to call bash for this to run:
# for foo in *.dist; do cp $foo `basename $foo .dist`; done
for: Command not found.
foo: Undefined variable.

Otherwise it worked!

Lots of PHP notices on the login screen. For that to disappear, you have to do a :
#edit /var/www/html/horde/config/horde.php

and change this :
$conf['debug_level'] = E_WARNING;
 
Last edited:
Got:

configure: error: Cannot find rfc822.h. Please check your IMAP installation.

When trying to compile PHP with IMAP. Install of Horde/IMP went fine but not PHP/IMAP.

Got an idea?
 
I found that there is some file need modify after the steps:

vi /var/www/html/hordeconfig/registry.php

Code:
$this->applications['imp'] = array(
    'fileroot' => dirname(__FILE__) . '/../imp',
    'webroot' => $this->applications['horde']['webroot'] . '/imp',
    'icon' => $this->applications['horde']['webroot'] . '/imp/graphics/imp.gif',
    'name' => _("Mail"),
    'allow_guests' => false,
[b]    'status' => 'active'[/b]
);

vi /var/www/html/horde/imp/config/servers.php
Code:
$servers['imap'] = array(
    'name' => 'IMAP Server',
    'server' => 'imap.example.com',
    'protocol' => 'imap/notls',
    'port' => 143,
    'folders' => 'mail/',
    'namespace' => '',
    'maildomain' => 'example.com',
    'smtphost' => 'smtp.example.com',
    'realm' => 'example.com',
    'preferred' => ''
);

change to:

Code:
$servers['imap'] = array(
    'name' => 'IMAP Server',
    'server' => 'localhost',
    'protocol' => 'imap',
    'port' => 143,
    'folders' => '',
    'namespace' => '',
    'maildomain' => '',
    'smtphost' => '',
    'realm' => '',
    'preferred' => ''
);
 
Hello,

After all I realized that I got error while trying to "make bsf" of the client and here is what I got:

------------------
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make bsf SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:137: x509.h: No such file or directory
osdep.c:138: ssl.h: No such file or directory
osdep.c:140: pem.h: No such file or directory
osdep.c:141: buffer.h: No such file or directory
osdep.c:142: bio.h: No such file or directory
osdep.c:143: crypto.h: No such file or directory
osdep.c:144: rand.h: No such file or directory
osdep.c:155: syntax error before `SSL_CTX'
osdep.c:168: syntax error before `X509_STORE_CTX'
osdep.c:172: syntax error before `*'
osdep.c:172: syntax error before `*'
osdep.c:172: warning: data definition has no type or storage class
osdep.c: In function `ssl_start_work':
osdep.c:318: `BIO' undeclared (first use in this function)
osdep.c:318: (Each undeclared identifier is reported only once
osdep.c:318: for each function it appears in.)
osdep.c:318: `bio' undeclared (first use in this function)
osdep.c:319: `X509' undeclared (first use in this function)
osdep.c:319: `cert' undeclared (first use in this function)
osdep.c:320: syntax error before `char'
osdep.c:325: structure has no member named `context'
osdep.c:329: structure has no member named `context'
osdep.c:332: structure has no member named `context'
osdep.c:332: `SSL_VERIFY_NONE' undeclared (first use in this function)
osdep.c:333: structure has no member named `context'
osdep.c:333: `SSL_VERIFY_PEER' undeclared (first use in this function)
osdep.c:335: structure has no member named `context'
osdep.c:337: structure has no member named `con'
osdep.c:337: `SSL' undeclared (first use in this function)
osdep.c:337: syntax error before `)'
osdep.c:339: `BIO_NOCLOSE' undeclared (first use in this function)
osdep.c:340: structure has no member named `con'
osdep.c:341: structure has no member named `con'
osdep.c:342: structure has no member named `con'
osdep.c:342: structure has no member named `con'
osdep.c:344: structure has no member named `con'
osdep.c:349: structure has no member named `con'
osdep.c:350: invalid lvalue in assignment
osdep.c:352: `s' undeclared (first use in this function)
osdep.c:353: invalid lvalue in assignment
osdep.c:356: invalid lvalue in assignment
osdep.c:359: `scq' undeclared (first use in this function)
osdep.c:361: `tmp' undeclared (first use in this function)
osdep.c: At top level:
osdep.c:374: syntax error before `X509_STORE_CTX'
osdep.c: In function `ssl_open_verify':
osdep.c:379: `ok' undeclared (first use in this function)
osdep.c:381: `ctx' undeclared (first use in this function)
osdep.c: In function `ssl_getdata':
osdep.c:516: structure has no member named `con'
osdep.c:516: structure has no member named `con'
osdep.c:519: structure has no member named `con'
osdep.c:541: structure has no member named `con'
osdep.c:543: structure has no member named `con'
osdep.c:543: `SSL_ERROR_WANT_READ' undeclared (first use in this function)
osdep.c: In function `ssl_sout':
osdep.c:575: structure has no member named `con'
osdep.c:580: structure has no member named `con'
osdep.c: In function `ssl_abort':
osdep.c:605: structure has no member named `con'
osdep.c:606: structure has no member named `con'
osdep.c:607: structure has no member named `con'
osdep.c:608: structure has no member named `con'
osdep.c:610: structure has no member named `context'
osdep.c:611: structure has no member named `context'
osdep.c:612: structure has no member named `context'
osdep.c: In function `ssl_server_init':
osdep.c:712: structure has no member named `context'
osdep.c:718: structure has no member named `context'
osdep.c:718: `SSL_OP_ALL' undeclared (first use in this function)
osdep.c:720: structure has no member named `context'
osdep.c:724: structure has no member named `context'
osdep.c:728: structure has no member named `context'
osdep.c:729: `SSL_FILETYPE_PEM' undeclared (first use in this function)
osdep.c:734: structure has no member named `context'
osdep.c:735: structure has no member named `context'
osdep.c:737: structure has no member named `con'
osdep.c:737: structure has no member named `context'
osdep.c:741: structure has no member named `con'
osdep.c:743: structure has no member named `con'
osdep.c: At top level:
osdep.c:776: syntax error before `*'
osdep.c:776: syntax error before `*'
osdep.c: In function `ssl_genkey':
osdep.c:779: syntax error before `*'
osdep.c:780: `key' undeclared (first use in this function)
osdep.c:782: `export' undeclared (first use in this function)
osdep.c:782: `keylength' undeclared (first use in this function)
osdep.c:782: `RSA_F4' undeclared (first use in this function)
osdep.c: In function `ssl_server_input_wait':
osdep.c:807: structure has no member named `con'
osdep.c:807: structure has no member named `con'
osdep.c:809: structure has no member named `con'
osdep.c:810: structure has no member named `con'
*** Error code 1

Stop in /kamil/imap-2004a/c-client.
*** Error code 1

Stop in /kamil/imap-2004a/c-client.
*** Error code 1

Stop in /kamil/imap-2004a.
*** Error code 1

Stop in /kamil/imap-2004a.

If I use make bsf SSLTYPE=none the error in php compilation will appear and will say that I need ssl libs - so that doesn't work.

I have openssl installed, so I do not know why do I get above error. Look:

server# openssl version
OpenSSL 0.9.7d 17 Mar 2004
server# openssl




WEIRD,

Any ideas how to fix it? Thanks./


kamil
 
stucked creating horde's database

Hi! I am stucked here

mysql -u da_admin -p **adminpass** < mysql_create.sql

such command:

does not proceed, when is run from the path
/var/www/html/horde-2.2.6/scripts/db

due to a password error, so I guess that the root/admin password I am using is not correct. Although is the same that is mentioned here
/usr/local/directadmin/scripts/setup.txt

I guess that it may be encrypted.

Would it be safe to reset the MySQL "root" password?
 
setup.txt contains the password when the system was set up.

The current password is in:

/usr/local/directadmin/conf/mysql.conf

If they're both the same, then somehow the mysql password has gotten out of sync and you should probably reset the mysql password (explained elsewhere in these forums) to the password in the /usr/local/directadmin/conf/mysql.conf file.

Jeff
 
Installed Turba

Just wanted to share with you that I have installed Turba without problems.

If you want to do so, just make sure that you use the last version availabe from Horde website.

Other than that, I am not impressed with the Turba features.
 
And Horde 2?
I tried to install Turba2, but saw a lot of error messages that scared me bit :)
 
Turba 2 only works with Horde 3, the problem is that it's a bit behind. Horde3 is almost ready, but Turba is still considered alpha. The one big drawback is that it doesnt sync OTA just yet, but it will get there.
 
You meant, Horde4, the one that is currently in alfa? ... I am curious to see, how is it like.
Do you know where to find an online demo?
 
Horde 3 "Beta" Installation

Hi!
I am trying to add the --with-dom line
to configure.php
but if I do so, I get an error
after recompiling PHP.
It seems that some extensions required by that lib are not included in the default installation.

interfasys said:
For PHP :
--with-dom
would be nice to have, Horde 3 will need that and it's going to be released this Fall.
 
Last edited:
anyone have horde3 setup with all of the goodies? I would like to test drive it if possible. Looks as if Horder is hitting the next level.

Question is it any faster than the previous version?
 
I have installed horde in my DA.

And it works fine with all the email addresses that i have created.

But if i login with my username, i can't send out email from horde.

For eg.
my domain: kacang.com
my username: kacang

if i login horde with my username "kacang", then i can't send out any email.

It works fine with squirrelmail.
 
I've found out in horde that if you use the username of your account, you cannot send emails, you need to log in with your email address.
 
but for default account, i can't login with the email address, i have to use only the username to login.

correct me if i am wrong
 
*chuckle*

This was the biggest pain in the.....

For some reason, it shut down MySQL. Don't know why but my websites have been down for about 6 hours now. Lots of fun.

Try again in the morning.

-drmike
 
Hey,

Howto include the extention in dir: /usr/local/directadmin/customapache/php-4.3.11/ext/domxml

This is because the newest version of Horde needs the domxml extention in PHP for using the administration site.
When I change /usr/local/directadmin/customapache/configure.php to

--with-domxml AND/OR --enable-domxml it just doesn't work (when i look to /horde/test.php, it's still DOM XML Support: No)

Hopefully someone can help me?!
Using CentOS 3.4 with uptodate DirectAdmin
 
Back
Top