unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* [Patch] [CVS] rmail-spam-filter error when missing "From:" field
@ 2004-11-09 23:30 Diane Murray
  0 siblings, 0 replies; only message in thread
From: Diane Murray @ 2004-11-09 23:30 UTC (permalink / raw)


When there is no "From:" field in a received message being checked by
the spam filter, a `(wrong-type-argument stringp nil)' error occurs.
The following patch corrects this.


	* mail/rmail-spam-filter.el (rmail-spam-filter): Only check white
	list if `message-sender' is non-nil.


*** rmail-spam-filter.el	16 Feb 2004 22:57:42 +0100	1.8
--- rmail-spam-filter.el	09 Nov 2004 22:38:46 +0100	
***************
*** 302,314 ****
  
          ;; 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)
              (setq exit-while-loop t
                    maybe-spam nil
                    this-is-a-spam-email nil))
--- 302,315 ----
  
          ;; Check white list, and likewise cause while loop
          ;;  bypass.
!         (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))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-09 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-09 23:30 [Patch] [CVS] rmail-spam-filter error when missing "From:" field Diane Murray

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).