|
@@ -192,6 +192,26 @@ function start_filters() {
|
|
sqgetGlobalVar('username', $username, SQ_SESSION);
|
|
sqgetGlobalVar('username', $username, SQ_SESSION);
|
|
sqgetGlobalVar('key', $key, SQ_COOKIE);
|
|
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 $key=>$value) {
|
|
|
|
+ if ($value['enabled'] == 'yes') {
|
|
|
|
+ $AllowSpamFilters = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!$AllowSpamFilters && empty($filters)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
// Detect if we have already connected to IMAP or not.
|
|
// Detect if we have already connected to IMAP or not.
|
|
// Also check if we are forced to use a separate IMAP connection
|
|
// Also check if we are forced to use a separate IMAP connection
|
|
if ((!isset($imap_stream) && !isset($imapConnection)) ||
|
|
if ((!isset($imap_stream) && !isset($imapConnection)) ||
|
|
@@ -883,4 +903,4 @@ function do_error($string) {
|
|
echo "</font></p>\n";
|
|
echo "</font></p>\n";
|
|
}
|
|
}
|
|
|
|
|
|
-?>
|
|
|
|
|
|
+?>
|