squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

setup.php
Go to the documentation of this file.
1 <?php
29 require_once(SM_PATH . 'plugins/filters/filters.php');
30 
41 
50 $AllowSpamFilters = true;
51 
71 
83 
95 
106 
118 
126 $SpamFilters_CacheTTL = 7200;
127 
134 
135  if (sqgetGlobalVar('mailbox',$mailbox,SQ_FORM)) {
136  sqgetGlobalVar('mailbox',$mailbox,SQ_FORM);
137  } else {
138  $mailbox = 'INBOX';
139  }
140 
141  $squirrelmail_plugin_hooks['left_main_before']['filters'] = 'start_filters';
142  if (isset($mailbox) && $mailbox == 'INBOX') {
143  $squirrelmail_plugin_hooks['right_main_after_header']['filters'] = 'start_filters';
144  }
145  $squirrelmail_plugin_hooks['optpage_register_block']['filters'] = 'filters_optpage_register_block';
146  $squirrelmail_plugin_hooks['special_mailbox']['filters'] = 'filters_special_mailbox';
147  $squirrelmail_plugin_hooks['rename_or_delete_folder']['filters'] = 'update_for_folder';
148  $squirrelmail_plugin_hooks['webmail_bottom']['filters'] = 'start_filters';
149 }
150 
157 function filters_special_mailbox( $mb ) {
158  global $data_dir, $username;
159 
160  return( $mb == getPref($data_dir, $username, 'filters_spam_folder', 'na' ) );
161 
162 }
163 
169  global $optpage_blocks;
170  global $AllowSpamFilters;
171 
172  $optpage_blocks[] = array(
173  'name' => _("Message Filters"),
174  'url' => '../plugins/filters/options.php',
175  'desc' => _("Filtering enables messages with different criteria to be automatically filtered into different folders for easier organization."),
176  'js' => false
177  );
178 
179  if ($AllowSpamFilters) {
180  $optpage_blocks[] = array(
181  'name' => _("SPAM Filters"),
182  'url' => '../plugins/filters/spamoptions.php',
183  'desc' => _("SPAM filters allow you to select from various DNS based blacklists to detect junk email in your INBOX and move it to another folder (like Trash)."),
184  'js' => false
185  );
186  }
187 }
188 ?>
$SpamFilters_ShowCommercial
global $SpamFilters_ShowCommercial
Definition: setup.php:81
sqgetGlobalVar
sqgetGlobalVar($name, &$value, $search=SQ_INORDER)
Definition: global.php:344
getPref
getPref($data_dir, $username, $string, $default='')
Definition: db_prefs.php:316
$SpamFilters_YourHop
global $SpamFilters_YourHop
Definition: setup.php:69
$data_dir
$data_dir
Definition: config_default.php:499
$mailbox
$mailbox
Definition: options.php:28
$AllowSpamFilters
global $AllowSpamFilters
Definition: setup.php:49
$username
global $username
Definition: validate.php:55
$SpamFilters_BulkQuery
global $SpamFilters_BulkQuery
Definition: setup.php:104
$squirrelmail_plugin_hooks
global $squirrelmail_plugin_hooks
Definition: plugin.php:17
filters_optpage_register_block
filters_optpage_register_block()
Definition: setup.php:168
filters_special_mailbox
filters_special_mailbox( $mb)
Definition: setup.php:157
$SpamFilters_SharedCache
global $SpamFilters_SharedCache
Definition: setup.php:116
squirrelmail_plugin_init_filters
squirrelmail_plugin_init_filters()
Definition: setup.php:132
$UseSeparateImapConnection
global $UseSeparateImapConnection
Definition: setup.php:29
SM_PATH
const SM_PATH
Definition: decrypt_headers.php:16
_
_($str)
Definition: gettext.php:160
SQ_FORM
const SQ_FORM
Definition: global.php:21
$SpamFilters_DNScache
global $SpamFilters_DNScache
Definition: setup.php:94
$SpamFilters_CacheTTL
global $SpamFilters_CacheTTL
Definition: setup.php:125