Horde3 and Imp4 HOWTO under Ubuntu/Debian

This post is a simple set of guidelines (a mini-HOWTO) on How to setup Horde3 and Imp4 Webmail. In fact, the official documentation lacks a few important things, so here are a few tricks.

First of all, install the horde3 and Imp4 packages (Ubuntu/Debian)

apt-get install horde3 imp4

It is then necessary to setup an Alias for Apache. If you’re using Apache2, add a file /etc/apache2/conf.d/horde3.conf containing

Alias /horde3 /usr/share/horde3

Also, allow Apache to write horde configuration files :

chown -R www-data:www-data /etc/horde

Or, if you prefer to use ACLs

setfacl -m “g:www-data:rwx” /etc/horde

setfacl -d -m “g:www-data:rwx” /etc/horde

setfacl -m “g:www-data:rwx” /etc/horde/*

setfacl -d -m “g:www-data:rwx” /etc/horde/*

setfacl -m “g:www-data:rw-” /etc/horde/*/*

and restart apache

/etc/init.d/apache2 restart

You can then browse http://server/horde3

Important parameters to change are (in Horde setup) :

  • Horde URL (change it to /horde3)
  • Enable Database Access. Do Not use MySQL Improved (4+), my attempts at using it failed. MySQL Standard runs fine however
  • Enable Authentication. I recommend IMAP authentication (something like {localhost:143/imap/notls}. Do not forget the /notls, not specifying failed on my setup). Also make sure to add your username to the list of Administrators, otherwise, you won’t have access to horde/imp4 parameters. Using anything else than IMAP seeemed to fail on my setup
  • Generate the configuration

Horde should now be setup. You now have to configure imp4

  • generate a configuration using the horde administration panel
  • modify the /etc/horde/imp4/servers.php file. Instruction are given inside the file concerning the syntax. If you run Courier-IMAP, and want Imp to automatically authenticate using horde credentials :

$servers['imap'] = array(
‘name’ => ‘IMAP Server’,
’server’ => ‘localhost’,
‘hordeauth’ => true,
‘protocol’ => ‘imap/notls’,
‘port’ => 143,
‘folders’ => ‘INBOX.’,
‘namespace’ => ”,
‘maildomain’ => ‘domain.com’,
’smtphost’ => ‘localhost’,
’smtpport’ => 25,
‘realm’ => ”,
‘preferred’ => ”,
‘dotfiles’ => false,
‘hierarchies’ => array()
);

You should now have a working setup.. Good luck !

32 Responses to “Horde3 and Imp4 HOWTO under Ubuntu/Debian”

  1. Jan Hagemejer says:

    I have installed horde on ubuntu breezy. It works but i get these everywhere:

    Notice: Only variable references should be returned by reference in /usr/share/horde3/lib/Horde/Notification.php on line 98

  2. Yves says:

    @Jan Hagemejer
    You have to change the debug_level in Horde Setup from E_ALL to E_ERROR.

  3. Darren Holt says:

    Thanks heaps Sami, I struggled with the debian setup for a couple of days before I read this. The imap/notls fixed my woes, cheers!

    One more thing to include, removing the exit(0) from /etc/horde/horde3/conf.php although this is already mentioned in the README.Debian.

  4. Coko Tracy says:

    On my Ubuntu Edgy, after installing apache2, Horde3 and IMP4, Im’not able to start horde after configuring apache2.conf

    Here is the error I get:

    Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system. Read /usr/share/doc/horde3/README.Debian.gz on how to allow access.

  5. Maski says:

    Coko: have you actually “Read /usr/share/doc/horde3/README.Debian.gz on how to allow access.”

    Sami: I installed and configured horde3 but after generating the conf i cannot log into the horde system. I check the logs for the imap conection;

    Nov 20 21:28:42 mail imapd: Connection, ip=[::ffff:127.0.0.1]
    Nov 20 21:28:42 mail imapd: LOGIN, user=Maski, ip=[::ffff:127.0.0.1], protocol=IMAP
    Nov 20 21:28:42 mail imapd: LOGOUT, user=Maski, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=38, sent=250, time=0

    So its ok.. but i cant get into horde at http://localhost/horde3

    Any ideas.. thanks

  6. skoobi says:

    Maski : are you sure that you
    - Used the /notls option for the IMAP server
    - do NOT use MySQL 4+ support, but plain MySQL ?

    Is there anything in your horde logs ? Can you activate them ?

  7. Maski says:

    Skoobi:

    Yes the /notls option is the one i have selected

    But about MySQL are you saying I can only have MySQL 4 but i cant use MySQL 5 as the backend?

    thanks

  8. skoobi says:

    Yes, you can use MySQL 5 as the backend. However, for some reason, the application seems to screw up if MySQL 4+ is selected. So, you can try selecting “MySQL” as the backend …

  9. Maski says:

    Skoobi:

    Ok let me see, in the setup area, on the dabase tab you can select MySQL or MySQLi,.. i selected MySQL,.. but still the same, im gettin desperate!! ;-)
    .

    Do you by any chance have a conf.php I can have a look at? cause im really lost here… when i try to log in localhost/horde3, it keeps showing me the logging page again, its like a loop or something,.. the imap seem to be working fine,

    Thanks

  10. Maski says:

    Finally got it working!!! i think its a bug on the setup

    Thanks! by the way, what authentication backend should i use if i want to add users into horde??

  11. skoobi says:

    Hi Maski,

    I’m glad you actually got it to work :-)

    If you want to add users into horde, you can use the SQL authentication backend…. It’s available in the setup list..

    Good luck,
    Sami

  12. Justin says:

    Hello all,

    I’ve followed everthing to a “T”, and I get:
    “Failed to import Horde configuration: Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system. Read /usr/share/doc/horde3/README.Debian.gz on how to allow access.” Can someone help? Thanks

  13. skoobi says:

    Hi justin.. This HOWTO was working for Ubuntu Hoary, so something must have changed in the meanwhile.. I suspect specific changes on the debian packages to completly disable the wizzard… What does README.Debian.gz actually say on that subject ?

  14. cyberdoo says:

    ‘To configure horde3 use the web configuration wizard. It is disabled
    by default for security reasons. To enable it remove the exit (0) directive
    in /etc/horde/horde3/conf.php file. To let the configuration wizard
    write to the configuration files you have to change the owner
    of the /etc/horde/horde3 dir and config files to be owned by www-data.’

    However I was finally able to get it work after deleting all the lines after the

  15. Erik-Widar says:

    Hello,
    It appeared to be a bit tricky the horde, but nice… I must have fkd up while configuring so the program lost track of some essentials. I’d like to get started from the beginning again. Apt-get remove doesn’t do the trick. The evil .config lives on into the next apt-get install. Is there a spell to use that purges the horde for a fresh start?

  16. skoobi says:

    sudo dpkg –purge horde3 && sudo dpkg –purge imp4 && rm -rf /etc/horde3 ?

  17. wcteskey says:

    Deleting lines after the ….
    I would sure like to know what cyberdoo did to fix this

  18. sillyagent says:

    Hi Maski,

    After installing and generating the horde3 conf i cannot log into the horde system, same as you reported.
    You claimed to have solved the problem but didn’t mention how you did so.
    Could you please share your solution?
    Thanks in advance

  19. JLI says:

    Hi,

    Can anyone know how to deal with this error? I’ve already followed whole instructions above but it returns error message below.

    “Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system.”

    Please help….

  20. skoobi says:

    Hi,

    what are the permissiosn of /etc/horde ?

  21. JLI says:

    I’ve already executed “chown -R www-data:www-data /etc/horde” so the permission set on that way.

  22. skoobi says:

    yeah, but maybe you should tweak chmod, to make sure the directory is NOT readable and writable by “others”.

    Are you using pure permissions or ACL permissions ?

  23. Coko Tracy says:

    Hello Maski,

    Thanx a lot, I just edited /etc/horde/horde3/conf.php and the horde works perfectly!!

    Cheers!

  24. khayjake says:

    Hey guys,

    This is for the people having the error:

    “Failed to import Horde configuration: Horde3 configuration disabled by default because the administration/install wizard gives the whole world too much access to the system. Read /usr/share/doc/horde3/README.Debian.gz on how to allow access.”

    You need to not only remove exit(0); but comment out the text above that. So just put a // before the echo statement at the top of the config.php

    Example:

    // echo “blahblahblah read the README.debian.gz that doesn’t tell you jack”

    hehe…man, debian developers are great…but their documentation lacking in content to say the least. I’m all for the little guys trying to port themselves away from the Microsoft giant (booo to ms! unless ur finding new ways to screw with their kernel haha)

    Khayjake

    Debian Sid
    Slackware 11.0
    Fedora Core 6
    HP-UX
    AIX

  25. martin says:

    can you please post a fix to be able to login to horde as admin. (maski)
    seem’s you have solved that, i’ve got the same problem (debian etch)

  26. martin says:

    already solved;

    the path in /etc/horde/horde3/conf.php must be changed to value ‘/horde3′ (was ‘/horde’)

    :)

    cheers,

    martin

  27. david says:

    Hi, i have configured it so qmail handles logins, everything should be ok,in configureation — BUT — firstly the left from just dosen’t show anything – it used to show AUTH_IMP NOT INSTALLED, but now nothing, and also noone gets anything under the the top frame – just options, no mailbox no nothing – im stumped…

    thanks

  28. ben says:

    Thanks for all your howto and comments. It’s richfull of information.

  29. Good tutorial!!! I can setup horde3 now.

    Thanks!!!!

    ;)

  30. bastion says:

    A note to others under debian.

    uw-imapd doesn’t seem to work well with horde3/imp4. (or so the pkg. main. say)

    A quick change over to dovecot fixed the problem with authentication for mail and everything works perfect now!

  31. wagzy says:

    Having same problem as maski:
    imap authentication works fine
    but login page just keep showing
    i used mysql, imap port 143 notls
    mail.log shows successful login but shows logout immediately after login

    so please maski, how did you get about the bug????

  32. wagzy says:

    my $conf['cookie']['path'] = ‘/horde3′;
    this is the content of /etc/horde/horde3/conf.php:

Leave a Reply