changeset 58182:875255640d7a

(rmail-spam-filter): Only check white list if `message-sender' is non-nil.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 12 Nov 2004 17:02:29 +0000
parents 6f6fadd54910
children a0c179fd4bc8
files lisp/mail/rmail-spam-filter.el
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail-spam-filter.el	Fri Nov 12 16:56:09 2004 +0000
+++ b/lisp/mail/rmail-spam-filter.el	Fri Nov 12 17:02:29 2004 +0000
@@ -302,13 +302,14 @@
 
         ;; Check white list, and likewise cause while loop
         ;;  bypass.
-        (if (let ((white-list rsf-white-list)
-                  (found nil))
-              (while (and (not found) white-list)
-                (if (string-match (car white-list) message-sender)
-                    (setq found t)
-                  (setq white-list (cdr white-list))))
-              found)
+        (if (and message-sender
+                 (let ((white-list rsf-white-list)
+                       (found nil))
+                   (while (and (not found) white-list)
+                     (if (string-match (car white-list) message-sender)
+                         (setq found t)
+                       (setq white-list (cdr white-list))))
+                   found))
             (setq exit-while-loop t
                   maybe-spam nil
                   this-is-a-spam-email nil))