Howto: Install Horde 3.0.4/IMP on FreeBSD

perfect

Hi,

Worked with no issues, just simple copy and pasting and it was amazing. Perhaps a script can be made to automate the process? :)

How do I entigrate the skins? Is there an upload feature via DA's GUI or do i need to do these via SSH CLI?
 
Hi I thought I done with no issues except I get this when trying to send an email from horde.

There was an error sending your message: Validation failed for: [email protected].

only occurs on main account which has no @domain at end of username.
 
Last edited:
Right I know how to resolve this issue, but need to be able to do it so its set by default on mass for accounts, others must have hit this problem surely.

To repeat, if username is [email protected] horde functions correctly in all aspects.

If username is username, which is the case for main email accounts in DA then horde can read emails but when composing it gives a validation error, setting default host to localhost allows sending to local domains but not remote and it also says from username@localhost. The proper fix is this:

Login to horde as the user.
click on mail
click on options
click on Message Composition.
where it says 'Put this after @ when sending mail and default address expansion: ' enter the domain and save the settings.
Now the user can compose email.

The problem here is every user with the problem would have to follow this procedure, I would like a way perhaps using some variable so it adds the user's domain by default as that setting.
 
New updates to this howto:

- Updated from imap-2004f to imap-2004g
- Uploaded new modified skins for DA v1.25.1 (see the end of the firstpost for download link!)

Updating to imap-2004g is very simple:

# fetch ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
# tar -zxvf c-client.tar.Z
# cd imap-2004g/
# make bsf
# mkdir /usr/local/imap-2004g
# mkdir /usr/local/imap-2004g/include
# mkdir /usr/local/imap-2004g/lib
# cd c-client
# cp *.h /usr/local/imap-2004g/include/
# cp *.c /usr/local/imap-2004g/lib/
# cp c-client.a /usr/local/imap-2004g/lib/libc-client.a
# cd ../../
# rm -rf imap-2004g/ c-client.tar.Z
# cd /usr/local/directadmin/customapache
# ee configure.php

Search for:

--with-imap=/usr/local/imap-2004f

And replace with:

--with-imap=/usr/local/imap-2004g

Then save that file and exit.

# ./build php y
# /usr/local/etc/rc.d/httpd restart
# rm -rf /usr/local/imap-2004f

And that's all. In this example I used imap-2004f as old version. If you have another version, replace imap-2004f with your version (i.e. imap-2004e).

Installing or updating the modified skins is also very simple:

# cd /usr/local/directadmin/data/skins/
# fetch <url of modified skins.tar.gz>
# tar zxvf modified_skins_for_directadmin_v.1.25.1-01.tar.gz
# rm -rf modified_skins_for_directadmin_v.1.25.1-01.tar.gz default/ enhanced/ power_user/
# mkdir default enhanced power_user
# mv default.tar.gz default/
# mv enhanced.tar.gz enhanced/
# mv power_user.tar.gz power_user/
# cd default
# tar zxvf default.tar.gz
# rm default.tar.gz
# cd ../enhanced
# tar zxvf enhanced.tar.gz
# rm enhanced.tar.gz
# cd ../power_user
# tar zxvf power_user.tar.gz
# rm power_user.tar.gz
# cd ../../
# chown -R diradmin:diradmin skins/
 
Last edited:
wouter did you read the post I made concerning the main account problem, how do you get around this?

thanks
 
Another update, some user's were getting error's that the sendmail doesnt exist on the server which of course it does, yet it worked fine for me, so I googled the error and it does seem to be some sort of bug. So the fix I did was to stop using sendmail for email compose and just use smtp without auth, this should be ok as the user has to login to horde before he can send email's.
 
Chrysalis said:
wouter did you read the post I made concerning the main account problem, how do you get around this?

thanks

First of all: sorry for my very late reply.

I had the same problem with the main accounts. I don't have a solution, so I have modified this by hand for the main accounts i'm using in Horde :(.

Chrysalis said:
Another update, some user's were getting error's that the sendmail doesnt exist on the server which of course it does, yet it worked fine for me, so I googled the error and it does seem to be some sort of bug. So the fix I did was to stop using sendmail for email compose and just use smtp without auth, this should be ok as the user has to login to horde before he can send email's.

Also I had this problem some weeks ago. I fixed this the same way you did. I 'm sorry that I forgot to edit the firstpost. I did it now :)

Also new modified skins for DA 1.25.4 are uploaded to the first post of this topic!
 
Last edited:
thanks for your reply, what did you modify by hand? or do you mean when you make new accounts you login to horde make the change so the user has no issue?
 
Chrysalis said:
thanks for your reply, what did you modify by hand? or do you mean when you make new accounts you login to horde make the change so the user has no issue?

Yes, after makeing the account I login and edit the domain by hand :(
 
ok thanks, I am going to see if there is a way to have it set on default for new accounts.
 
Horde 3.0.9 and IMP H3-4.0.4 released!

Here is an howto for upgrading:

------------------------------------------------------

# cd /var/www/html/
# fetch http://ftp.horde.org/pub/horde/horde-latest.tar.gz
# tar xzpf horde-latest.tar.gz
# rm -f horde-latest.tar.gz
# cd horde-3.0.9/config/
# mv conf.php.dist conf.php
# cp conf.php conf.php.bak
# cp conf.php conf.php.orig
# mv hooks.php.dist hooks.php
# mv mime_drivers.php.dist mime_drivers.php
# mv motd.php.dist motd.php
# mv nls.php.dist nls.php
# mv prefs.php.dist prefs.php
# mv registry.php.dist registry.php
# chmod 777 *
# cd ../scripts/sql/

Open /var/www/html/horde/scripts/sql/create.mysql.sql and search for the password of your horde MySQL database!
Copy paste that password in the following file:

# ee create.mysql.sql

Then open your browser, and go to http://0.0.0.0/horde-3.0.9/test.php
(Where 0.0.0.0 is you should set your server IP!)

On that page everything (except PostgreSQL and MIME Magic Support (fileinfo)) should be on green (YES/SUPPORTED).
You may get an warning that your memory_limit is not disabled, I suggest you set this to 64MB in your php.ini.
If not all is green, then make sure it will be before you go to the next steps.

# cd ../../
# fetch http://ftp.horde.org/pub/imp/imp-latest.tar.gz
# tar xzpf imp-latest.tar.gz
# rm -f imp-latest.tar.gz
# mv imp-h3-4.0.4 imp
# cd imp/config/
# mv filter.txt.dist filter.txt
# mv header.txt.dist header.txt
# mv menu.php.dist menu.php
# mv mime_drivers.php.dist mime_drivers.php
# mv motd.php.dist motd.php
# mv prefs.php.dist prefs.php
# mv servers.php.dist servers.php
# mv trailer.txt.dist trailer.txt
# cp conf.xml conf.php
# cp conf.php conf.php.bak
# cp conf.php conf.php.orig
# chmod 777 *
# ee servers.php

Search for:

$servers['imap'] = array(
'name' => 'IMAP Server',
'server' => 'imap.example.com',
'hordeauth' => false,
'protocol' => 'imap/notls',
'port' => 143,
'folders' => 'mail/',
'namespace' => '',
'maildomain' => 'example.com',
'smtphost' => 'smtp.example.com',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
'dotfiles' => false,
'hierarchies' => array()
);

And replace with:

$servers['imap'] = array(
'name' => 'IMAP Server',
'server' => 'localhost',
'hordeauth' => 'full',
'protocol' => 'imap',
'port' => 143,
'folders' => '',
'namespace' => '',
'maildomain' => '',
'smtphost' => '',
'smtpport' => 25,
'realm' => '',
'preferred' => '',
'dotfiles' => false,
'hierarchies' => array()
);

Then visit http://0.0.0.0/horde-3.0.9/, choose “Management” and after that choose for “Settings”, then choose “E-mail (imp)” and choose “Generate e-mail configuration”. Then choose “Settings” again and select “Horde (horde)”. Then go to “Database” and make sure it will be the same as the following:

Database: MySQL (Do NOT select MySQL 4.1, even if you use this on your server!)

Database server: localhost

Username: horde

Password: The password you set in /var/www/html/horde-3.0.9/scripts/sql/create.mysql.sql.

Connect to database: UNIX Sockets

Location of UNIX socket: /tmp/mysql.sock (most of the time this is okay, if it’s not: check your server where mysql.sock is located.

Database name: horde


charset: iso-8859-1

Then click on “Generate Horde configuration” at the bottem of the page.

Then go to “Preference System” and at “What preferences driver should we use?” select “SQL Database”.

Name of the preference table: horde_prefs

Then click on “Generate Horde configuration” at the bottem of the page.

Go to “Mailer” and set:

What method should we use for sending mail?: Use SMTP server

The server to connect to [localhost]: localhost

The port to connect to [25]: 25

The local hostname / domain [localhost]: localhost

SMTP authentication: No authentication

You can leave "The username to use for SMTP auth" and "The password to use for SMTP auth" empty!

Then click on “Generate Horde configuration” at the bottem of the page.

Then go to “Problem Reporting” and change the e-mailadresse ([email protected]?).

Then click on “Generate Horde configuration” at the bottem of the page.
Then go to “Authentication” and make sure it’s the same as following:

Which users should be treated as administrators (root, super-user) by Horde?: admin

Should we always store and validate the IP address of the client (as seen by the web server) in the session? Doing so will help increase security by ensuring that an attacker from another host can not try to hijack the session: YES (selected)

What backend should we use for authenticating users to Horde?: Let a Horde application handle authentication.

The application which is providing authentication: imp

Then click on “Generate Horde configuration” at the bottem of the page.

Go back to your SSH session and type:

# cd ../../
# chown root:apache config/*
# chmod 0440 config/*
# cd imp
# chown root:apache config/*
# chmod 0440 config/*
# chmod 000 /var/www/html/horde-3.0.9/scripts/sql/create.mysql.sql
# cd ../../

Go to http://0.0.0.0/horde-3.0.9/ and test if all is working fine! If it is:

# rm -rf horde
# mv horde-3.0.9 horde

That’s all!

------------------------------------------------------

Enjoy...:)
 
Last edited:
i've an strange errore... it have always worked fine.. yesterday i've restored my server and today i've tryed to reinstall horde.. but now every time he say me login faild...

in a second machine that i've not have modified now doesnt work.. same error...

do u know that could be?

thanks
 
Chrysalis said:
can we have updated skins for 1.25.5 thanks.

I'm very sorry for this very late response, I was very busy last weeks. You can download the modified skins for DirectAdmin 1.25.5 at the bottom of the first post in this topic.

Also Horde 3.0.7 is released!
 
so to upgrade from 3.0.4 to 3.0.8 it's necessary to reinstall everything?
isn't there a "upgrade" script? ou some patch?

thanks
 
As far as I know there isn't.
But all your user still have there settings after a update, because this is saved in the SQL database. So only the settings of the administrator are gone.

@ALL:

Horde 3.0.9 is released!
 
to upgrade I did the following.

Download new horde.
Extract to a dir.
Cd into the config dir.
Copy all *.php from current horde config dir into new config dir.
Copy conf.xml from current horde config dir into new config dir.
Cd into scripts/mysql dir.
Copy create.mysql.sql from old horde scripts/mysql into new dir.
Chown all files in config dir to apache:apache.
Chmod if necessary to suit your security needs.

Download the latest imp (also updated since I first installed)
Extract as instructed in howto.
Cd into new imp config dir.
Copy all *.php and *.txt from current imp config dir into new dir.
Chown to apache:apache.
Chmod if neccessary.

Rename or remove old horde dir and rename new horde dir to horde as well as making sure the imp dir is renamed to imp.

It should just work, I hope I didnt miss anything out.

you dont need to reinstall all the dependencies or recompile php.
 
Chrysalis said:
to upgrade I did the following.

Download new horde.
Extract to a dir.
Cd into the config dir.
Copy all *.php from current horde config dir into new config dir.
Copy conf.xml from current horde config dir into new config dir.
Cd into scripts/mysql dir.
Copy create.mysql.sql from old horde scripts/mysql into new dir.
Chown all files in config dir to apache:apache.
Chmod if necessary to suit your security needs.

Download the latest imp (also updated since I first installed)
Extract as instructed in howto.
Cd into new imp config dir.
Copy all *.php and *.txt from current imp config dir into new dir.
Chown to apache:apache.
Chmod if neccessary.

Rename or remove old horde dir and rename new horde dir to horde as well as making sure the imp dir is renamed to imp.

It should just work, I hope I didnt miss anything out.

you dont need to reinstall all the dependencies or recompile php.

seems a good way
the only problem I can see is if the config files has changed
 
Back
Top