Author Topic: Default search settings in config.inc.php  (Read 4529 times)

Offline schnappi

  • Newbie
  • *
  • Posts: 4
Default search settings in config.inc.php
« on: March 21, 2017, 02:46:23 PM »
Hi there,

Is there an option in the config.inc.php file to change the default search settings (to search entire message body, ect.). Could not find such as option and only way that have been able to change this so far has been in GUI.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Default search settings in config.inc.php
« Reply #1 on: March 22, 2017, 03:10:05 AM »
Code: [Select]
// Defaults of the search field configuration.
// The array can contain a per-folder list of header fields which should be considered when searching
// The entry with key '*' stands for all folders which do not have a specific list set.
// Please note that folder names should to be in sync with $config['*_mbox'] options
$config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));

// Defaults of the addressbook search field configuration.
$config['addressbook_search_mods'] = null;  // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);

Offline schnappi

  • Newbie
  • *
  • Posts: 4
Re: Default search settings in config.inc.php
« Reply #2 on: December 08, 2017, 05:26:44 PM »
Sorry never got an email saying that there was a reply. Thanks for that quick reply. Am rebuilding mail server finally and reinstalling Roundcube so want to get this right instead of having to set for all accounts. In the Roundcube search there is an option for "Entire message." If do the below it is still not the same as setting "Entire message." Does anyone know how to set the below to the "Entire message?"

$config['search_mods'] = array('*' => array('subject'=>1, 'from'=>1, 'to'=>1, 'cc'=>1, 'bcc'=>1, 'body'=>1));

maybe this?:

$config['search_mods'] = array('*' => array('entire message'=>1));

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Default search settings in config.inc.php
« Reply #3 on: December 09, 2017, 02:32:45 AM »
Try $config['search_mods'] = array('*' => array('*'=>1));

Offline schnappi

  • Newbie
  • *
  • Posts: 4
Re: Default search settings in config.inc.php
« Reply #4 on: December 09, 2017, 01:47:13 PM »
Actually tried that yesterday before your post.

Try $config['search_mods'] = array('*' => array('*'=>1));

Results in nothing being checked for searches by default.

Below also not supringingly doesn't work.

$config['search_mods'] = array('*' => array('entire message'=>1));

Decided to just go with the below:

$config['search_mods'] = array('*' => array('subject'=>1, 'from'=>1, 'to'=>1, 'cc'=>1, 'bcc'=>1, 'body'=>1));

This does not set it to entire message but is basically the same thing. Of course if anyone knows how to set search to "Entire message" let us know as am sure it will help someone in the future.
« Last Edit: December 09, 2017, 02:19:19 PM by schnappi »