Innovate | Connect | Transform
ContactService statusUSD $

GICT knowledge base

How to upgrade the Horde Database in Plesk?

Published

In this tutorial, we can check how to upgrade the Horde Database in Plesk

Horde is free web-based groupware which rests on a PHP-based framework. This framework provides all the elements required for developing a rapid web application. Horde offers different applications like Horde IMP email client, calendar, notes, tasks, file manager, wiki, and also time and task tracking software.

After upgrading Plesk, if the database is not updated correctly with the Horde webmail data, you can follow any of these three ways to upgrade the Horde database in Plesk.

  1. Repair the existing database
  2. Create a new database
  3. Restore the database from the Pre-upgrade backup file.

Let’s get started with the first method.

Repairing the Existing Horde Database

You can try to repair the existing Horde database and preserve the data in the database using these steps:

1) Repair the configuration of the existing Horde database using the following command.

# /usr/local/psa/bootstrapper/pp$REL_ID-bootstrapper/bootstrapper.sh repair

2) If the above command didn’t work, then try to run the following commands:

# /usr/local/psa/admin/sbin/autoinstaller --remove-component horde

# /usr/local/psa/admin/sbin/autoinstaller --select-release-current - -install-component horde

This should fix the upgrade issue in the Horde database, if it does not fix then you can re-install the database using the following method.

Clean Installation of the Horde Database

If you are following these steps to install the new Horde database, you will lose all the current data. If you don’t want to lose the existing data, then you can restore the database using the pre-upgrade backup.

1) First, you need to remove the Horde components by using the following command.

# plesk installer --remove-component horde

2)  Then you need to drop the Horde database from Plesk.

# plesk db “drop database horde”

3) Now install the clean Horde database to Plesk.

# plesk installer --select-release-current --install-component horde

 

Restoring the Database from the Pre-Upgrade Backup

If you want to restore the old data into the new Horde database, then you need to restore the data from the backup file that was created automatically before the upgrade.

1) First, you need to remove the Horde components by using the following command.

# plesk installer --remove-component horde

2) After that, you need to drop the Horde database from Plesk.

# plesk db “drop database horde”

3) Remove all the files from the ‘/etc/psa-webmail/horde’ directory.

# rm -rf /etc/psa-webmail/horde/

4) Restore the Horde database from the backup file created before the upgrade from ‘/var/lib/psa/dumps’ directory. If you couldn’t find the backup file under the /var/lib/psa/dumps directory, then you can check the backup location in the ‘DUMP_D’ parameter under the ‘psa.conf’ configuration file.

5) Now install the upgraded Horde database.

# plesk installer --select-release-current --install-component horde

So, this is how you can restore a database from a pre-upgrade backup. There are some issues that you might face while performing these actions. One of the most common issues is Error connecting to Mailserver in Horde. Here is how you can troubleshoot this error.

Troubleshooting ‘Error Connecting to Mailserver’ Issue in Horde

Horde is one of the commonly used Mailserver agents, and users use this interface to send and view emails. Sometimes, the Horde webmail client throws an error saying ‘error connecting to Mailserver’ when they are not able to communicate with the server.

The primary investigation starts by checking the Horde logs to determine the source of the problem. In Plesk, the Horde log location is ‘/usr/local/psa-horde/psa-horde.log’ file. The complete error message in the log looks similar to the one shown below:

ERR: HORDE [horde] FAILED LOGIN for sample@domain.com (sample@domain.it)[201.0.112.25 to Horde [pid 154628 on line 211 of “usr/share/psa-horde/login.php”]154628

Some of the common reasons and fix for the above error in Horde are:

1) Firewall Restrictions

Some IPs and IP ranges get blocked based on their abnormal behavior or activity by some of the software firewalls such as iptables, CSF, and intrusion prevention software. Similarly, these software or server firewall can block connections to the mail ports. If these ports are blocked, then the users see ‘error connecting to mail server’ in Horde.

If this error occurs, we need first to check if the user’s IP is blocked in the server firewall. If it is blocked, then we need to remove the block and restore the webmail access immediately. After removing the block, we need to identify the reason for the block.

In addition to that, we can check if all email ports are opened on the server using the ‘telnet’ command. If we find any connection issue, then usually we check if the email ports such as 25,587, 110, 143, 993 are open on the server using the telnet command. For example, the below command checks if port 25 is open or not for the domain.

# telnet domain.com 25

2) Downtime in the Server

If the user is trying to access the Horde webmail using IMAP connection, they get errors like users to get locked out even after giving the correct credentials.

This error may be because the IMAP service is not active or running in the server, so it cannot process the requests from the webmail. This issue also throws the same error saying ‘error connecting to mail server.’

To fix this first, we need to check if the IMAP service is enabled and active on the server. For example, you can run the below command to verify if the IMAP server is enabled.

# netstat -tulpn | grep :143

If the IMAP service is disabled, then we need to restart the service and restore all the Horde access immediately. In Plesk, you can start the IMAP service from the “Service Management” option under the “Tools&Settings” option.

If MailEnable does not support the IMAP, then we need to install a MailEnable version that supports IMAP.

3) DNS Errors

If the mail server does not resolve the DNS records, then also it can throw the mail server connection error.

In this case, we need to ensure that the DNS records that exist for the mail server are proper. As a workaround, we can add the mail server details in the ‘/etc/hosts’ file.

So, this is how you can upgrade the Horde Database in Plesk. If you need further help, please use the comment section given below or contact our support department if you are an InterServer customer.

Account services are unavailable until the production backend is configured.