Posts Tagged ‘horde’

How to migrate Horde (Plesk) address, calendar and perferences.

June 18th, 2009

Sadly, migrating settings that are saved in Horde is not supported by Plesk 8 as of 8.6, and likely not in Plesk 9. However there is a way to migrate the data, however it will need to be done manually. To do so, you will need to goto the server where the information that you need to migrate is. Once there, you need to login via shell / SSH. Once logged in, we need to backup 3 things;

kronolith_events

kronolith_storage

Horde Mysql database

To do this, we need to backup the tables as such;

~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde --tables kronolith_events > kronolith_events.dump
~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde --tables kronolith_storage > kronolith_storage.dump

Then we need to backup the Horde database;

~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde > horde.old.dump
Now that we have the files, you will need to move them to the new server, either by ftp, wget, scp or however you move your files between your servers.
Now on the new server, make sure you make a backup of these files incase this fails;
~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde > horde.new.dump
~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde --tables kronolith_events > kronolith_events.dump
~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` horde --tables kronolith_storage > kronolith_storage.dump
Put these files in a different directory to make sure you do not get confused.
Now we can start to restore the old data by doing the following;
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` horde < kronolith_events.dump
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` horde < kronolith_storage.dump
Before you restore the Horde database, you will want to remove the existing one first and then recreate it;
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e"drop database horde"
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e"create database horde"
Then restore the original Horde database;
~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` horde < horde.old.dump
Once you do this and restart Horde/Exim, you will have all of your contacts and settings migrated and ready to use on the new server.
*MAKE SURE YOU MAKE BACKUPS BEFORE YOU DO THIS*

Cannot login to Horde Webmail (Plesk): Login Failed

March 18th, 2009

PROBLEM:
While Login into Webmail it returns the error: “Login failed”

SOLUTION:
Make sure that it is possible to connect to localhost:143 from the command line using telnet. If you get the error as below:
-=-=-
# telnet localhost 143
localhost/143: Name or service not known

-=-=-

then check /etc/hosts file. It must have permissions -rw-r–r– and contain the record for localhost in the following format:
-=-=-
127.0.0.1       localhost localhost.localdomain
-=-=-
Above is from From Parallels Knowledgebase

If /var/log/psa-horde/psa-horde.log shows something like:

FAILED LOGIN xx.xx.xx.xx to localhost:143[imap/notls] as me@mydomain.co.uk
FAILED LOGIN xx.xx.xx.xx to localhost:143[imap/notls] as me@mydomain.co.uk

I have searched regarding this but unable to find any fix so, I just re-installed the IMAP Service on the server. Following are the steps using which I have re-installed IMAP Server:
-=-=-
1) You can find the RPMS used by Plesk in /root/psa/PSA_version directory OR you can download the Tar (Not Autoinstaller) containing RPMS from Parallels website http://www.parallels.com/en/download/ (need registration it’s free)

2) go to the RPM directory which contains courier Imap RPM’s
#cd [path to the PSA RPM Directory]/dist-rpm-CentOS-4.2-i386/base/

3) Re-install courier-imap-3.0.8-cos4.build81070322.16.i586.rpm and psa-courier-imap-add-8.1.1-cos4.build81070322.16.i586.rpm which will automatically restart the services too
-=-=-
[root@vps base]# pwd
/root/plesk/dist-rpm-CentOS-4.2-i386/base
[root@vps base]# rpm -Uvh courier-imap-3.0.8-cos4.build81070322.16.i586.rpm psa-courier-imap-add-8.1.1-cos4.build81070322.16.i586.rpm –force
Preparing… ########################################### [100%]
Reloading configuration: [ OK ]
1:courier-imap ########################################### [ 50%]
Stopping Courier-IMAP server:
Stopping imap [ OK ]
Stopping imap-ssl [ OK ]
Stopping pop3 [ OK ]
Stopping pop3-ssl [ OK ]

Starting Courier-IMAP server:
Starting imapd [ OK ]
Starting imap-ssl [ OK ]
Starting pop3 [ OK ]
Starting pop3-ssl [ OK ]

2:psa-courier-imap-add ########################################### [100%]
Stopping Courier-IMAP server:
Stopping imap [ OK ]
Stopping imap-ssl [ OK ]
Stopping pop3 [ OK ]
Stopping pop3-ssl [ OK ]

Starting Courier-IMAP server:
Starting imapd [ OK ]
Starting imap-ssl [ OK ]
Starting pop3 [ OK ]
Starting pop3-ssl [ OK ]

[root@vps base]# netstat -nap | grep :143
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 1657/couriertcpd
[root@vps base]# telnet localhost 143
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
-=-=-

Unable to add a recipient when trying to send an email with webmail.

February 4th, 2009

If I compose and send a message with webmail the following error appears:

There was an error sending your message: unable to add recipient
[name@domain.com]: Invalid response code received from server.

Please add the following record to Server > Mail > White list in Plesk CP:

127.0.0.1 /8

If you are not able to add that record, you can also try 127.0.0.1/255.255.0.0 or 127.0.0.1/255.0.0.0

If the record is already there, you may want to remove it and then add it again. This normall is the case if you have reinstalled any of the courier/imap components on the server (This would affect the whitelist). Ultimately, if you nothing else works, you can also add the actual ip/ip’s of the server as well.

Address book not showing up in Horde after plesk upgrade (fedora core 2)

March 14th, 2008

If you recently had Plesk upgrade and you notice that the address book in horde is no longer showing, chances are the PSA-Turba file is missing or was never updated. You can take your chances with the plesk updater or you can attempt the following;

1) First of all, make sure that 'psa-turba' RPM is installed:

rpm -q psa-turba
If it is not, you can install it with autoupdater or manually from the opt/horde/ directory in Plesk distributive tree.

/root/psa/PSA_8.0.1/dist-rpm-FedoraCore-2-i386/opt/horde
 If the file is not there, you can get it from http://autoinstall.plesk.com/PSA_8.0.1/dist-rpm-FedoraCore-2-i386/opt/horde/psa-turba-2.1.1-fc2.build80060613.20.noarch.rpm
Type wget http://autoinstall.plesk.com/PSA_8.0.1/dist-rpm-FedoraCore-2-i386/opt/horde/psa-turba-2.1.1-fc2.build80060613.20.noarch.rpm to grab it
rpm -ivh  psa-turba-2.1.1-fc2.build80060613.20.noarch.rpm to install it.
 2) Records in 'My AddressBook' are not shown.

# cat /usr/share/psa-horde/turba/scripts/upgrades/1.2_to_2.0.mysql.sql | mysql -uadmin -p`cat /etc/psa/.psa.shadow` horde

3) Records in 'Private' or additional AddressBooks are not shown.

To fix it, please, download the attached sources.php.gz file, gunzip it and replace the file

/etc/psa-horde/turba/sources.php

with the new copy.

attached files: sources.php.gz