Make drafts send with in-reply-to headers (fix regression from long ago)
[squirrelmail.git] / plugins / filters / filters.php
index ed96ed8179ca7e56960209b808c31d0ca1944281..d80f26daf0b48d4b12ad2530781d2b08f2f0f3de 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Message and Spam Filter Plugin - Filtering Functions
  *
- * @copyright 1999-2014 The SquirrelMail Project Team
+ * @copyright 1999-2017 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
@@ -197,8 +197,19 @@ function start_filters($hook_args) {
 
     // if there were filtering errors previously during
     // this login session, we won't try again
+    //
+    // (errors that this plugin was able to catch or a "NO"
+    // response/failure from IMAP found in the current session,
+    // which could have resulted from an attempted filter copy
+    // (over quota), in which case execution halts before this
+    // plugin can catch the problem -- note, however, that any
+    // other IMAP "NO" failure (caused by unrelated actions) at
+    // any time during the current session will cause this plugin
+    // to effectively shut down)
+    //
     sqgetGlobalVar('filters_error', $filters_error, SQ_SESSION, FALSE);
-    if ($filters_error)
+    sqgetGlobalVar('IMAP_FATAL_ERROR_TYPE', $imap_fatal_error, SQ_SESSION, '');
+    if ($filters_error || $imap_fatal_error == 'NO')
         return;
 
     /**