Plesk

How to Change Default Horde Settings (Webmail)

Horde Webmail Settings

Horde is a free web-based groupware. All components of this groupware are based on the Horde framework, which is programmed in PHP. Plesk uses the Horde-Webmailer to receive, organize, and send email in a web-based interface instead of a mail client. So it may be useful to learn how to change default Horde Webmail settings.

There is an extensive repertoire of applications available to use with Horde, including Address Book, Calendar, Task Scheduler, and Virtual Sticky Notes. In this guide, we’re going to take a brief look at the Horde webmail application and explore some of the customizations you can make with it.

Why Can it Be Useful to Change Default Horde Webmail Settings?

Unlike some Webmail applications, the Horde project has set itself the task of providing the widest possible support for backends. This wide support makes Horde an optimal email product in the web hosting area. It also means you can use the program code to tailor pretty much everything to your needs.

For example, you can adjust the appearance of the Horde interface (logo, colors, etc.) to the corresponding user/customer. You can also use its open code to make certain functions available to users or to conceal certain applications/functions by default. Of course, thanks to features such as filter rules for marking mail as spam or virus, Horde Webmail ensures the safety of users from the beginning.

How to Change/Edit Default Values for Horde Webmail

The first thing to note is whether you want to change settings for existing or future accounts. Accordingly, one or two filters or both must be edited. For new Mailboxes, create the following file:

/usr/share/psa-horde/config/prefs.local.php

To edit the Mailbox and configure the following preferences, paste the code into the new file you created. The file starts with:

 <?php

All existing Mailboxes can be modified by editing the Horde configuration file:

/etc/psa-webmail/horde/imp/prefs.local.php

Below are the instructions for changing several parameters along with what effect they have. To setup the default language, for example German:

$_prefs[‘language']['value'] = ‘de_DE';

To change the time zone, for example to US/Central. You can find a list of other time zones here.

$_prefs[‘timezone’][‘value’] = ‘US/Central’;

To lock a preference. Preferences (or ‘Prefs’ for short) is Horde’s name for user settings, therefore, any settings that can be changed by users individually. They are organized into preference groups that are again divided into columns in the preference interface. All preferences, their descriptions, default values, groups, and columns are defined in the applications config/prefs.php file. The file contains two sections:

$_prefs['prefname']['value'] = ‘somedefault';

$_prefs['prefname']['locked'] = true;

As an administrator, you may want to manage all SPAM controls at the server level so as not to confuse or frustrate users. To do so, remove the following menu items:

$_prefs['whitelist']['locked'] = true;

 $_prefs['spam']['locked'] = true;

If you want mail as one of your default applications after logging into Horde, use this:

$_prefs['initial_application']['value'] = 'imp';

To move deleted messages directly to Trash:

 $_prefs['use_trash']['value'] = 1;

 $_prefs['trash_folder']['value'] = 'Trash';

To enable the option to display the “Empty Trash” link in the menu bar:

$_prefs[‘empty_trash_menu']['value'] = 1;[/CODE]

To redirect mail that is tagged as SPAM or virus (virus removed naturally) into their respective folders, add the following default rules:

// filter rules

 $_prefs['rules'] = array(

 'value' => ‘a:6:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:8;s:7:"disable";b:1;}i:2;a:2:

 {s:4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:10;}i:4;a:7:{s:4:"name";s:9:"SPAM Flag”;s:7:"combine";s:1:"1";s:10:"conditions";a:1:{i:0;a:4:{s:5:"field";s:11:"X-Spam-

 FLAG”;s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:3:"YES";}}s:12:"action-

 value”;s:13:"INBOX.SPAMBOX";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}i:5;a:7:{s:4:"name";s:10:"VIRUS

 Flag”;s:7:"combine";s:1:"1";s:10:"conditions";a:1:{i:0;a:4:{s:5:"field";s:12:"X-Virus-

 FLAG”;s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:3:"YES";}}s:12:"action-

 value";s:14:"INBOX.VIRUSBOX";s:6:"action";s:1:"2";s:4:"stop";s:1:"1";s:5:"flags";i:0;}}', 'locked' => false,

 'shared' => false, 'type'

 => ‘implicit'

 );

Horde is one of the leading Webmail applications because you can adjust everything in it using simple config settings. That being said, it’s important to know the right preferences and to edit them correctly. Use our Horde guide to get more from the powerful browser-based Webmail application and you’ll soon realise just why it’s so popular.