sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('key', $key, SQ_COOKIE);
+ $filters = load_filters();
+
+ // No point running spam filters if there aren't any to run //
+ if ($AllowSpamFilters) {
+ $spamfilters = load_spam_filters();
+
+ $AllowSpamFilters = false;
+ foreach($spamfilters as $filterskey=>$value) {
+ if ($value['enabled'] == 'yes') {
+ $AllowSpamFilters = true;
+ break;
+ }
+ }
+ }
+
+ if (!$AllowSpamFilters && empty($filters)) {
+ return;
+ }
+
+
// Detect if we have already connected to IMAP or not.
// Also check if we are forced to use a separate IMAP connection
if ((!isset($imap_stream) && !isset($imapConnection)) ||
$search_str .= ' ' . $where . ' ' . $what;
} else {
$search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n"
- . $what . "\r\n";
+ . $what;
}
/* read data back from IMAP */
echo "</font></p>\n";
}
-?>
\ No newline at end of file
+?>