-2003-10-31 Teodor Zlatanov <tzz@beld.net>
+2003-10-31 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el
+ (spam-log-processing-to-registry): improved message and comments
+ (spam-log-unregistration-needed-p): new function
+ (spam-ifile-register-spam-routine)
+ (spam-ifile-register-ham-routine, spam-stat-register-spam-routine)
+ (spam-stat-register-ham-routine)
+ (spam-blacklist-register-routine)
+ (spam-whitelist-register-routine)
+ (spam-bogofilter-register-spam-routine)
+ (spam-bogofilter-register-ham-routine)
+ (spam-spamoracle-learn-ham, spam-spamoracle-learn-spam): change
+ spam-log-processing-to-registry invocations appropriately
+
+2003-10-31 Simon Josefsson <jas@extundo.com>
+
+ * imap.el (imap-kerberos4-open): Ignore output from ATHENA imtest.
+ Tiny patch from Derek Atkins <warlord@MIT.EDU>.
+ (imap-process-connection-type): Improve docstring. Suggested by
+ Derek Atkins <warlord@MIT.EDU>.
+
+2003-10-31 Teodor Zlatanov <tzz@lifelogs.com>
* spam.el (autoload): autoload the gnus-registry functions we'll
need
:type '(repeat string))
(defcustom imap-process-connection-type nil
- "*Value for `process-connection-type' to use for Kerberos4 and GSSAPI."
+ "*Value for `process-connection-type' to use for Kerberos4, GSSAPI and SSL.
+The `process-connection-type' variable control type of device
+used to communicate with subprocesses. Values are nil to use a
+pipe, or t or `pty' to use a pty. The value has no effect if the
+system has no ptys or if all ptys are busy: then a pipe is used
+in any case. The value takes effect when a IMAP server is
+opened, changing it after that has no effect.."
:group 'imap
:type 'boolean)
(while (and (memq (process-status process) '(open run))
(set-buffer buffer) ;; XXX "blue moon" nntp.el bug
(goto-char (point-min))
+ ;; Athena IMTEST can output SSL verify errors
+ (or (while (looking-at "^verify error:num=")
+ (forward-line))
+ t)
+ (or (while (looking-at "^TLS connection established")
+ (forward-line))
+ t)
;; cyrus 1.6.x (13? < x <= 22) queries capabilities
(or (while (looking-at "^C:")
(forward-line))
nil
decision)))))))
-;;; log a spam-processor invocation to the registry
+;;; log a ham- or spam-processor invocation to the registry
(defun spam-log-processing-to-registry (id type classification check group)
(when spam-log-to-registry
(if (and (stringp id)
type
cell-list))
- (gnus-message 5 "spam-log-processing-to-registry called with bad ID, type, check, or group"))))
+ (gnus-message 5 (format "%s called with bad ID, type, check, or group"
+ "spam-log-processing-to-registry")))))
+
+;;; check if a ham- or spam-processor registration needs to be undone
+(defun spam-log-unregistration-needed-p (id type classification check)
+ (when spam-log-to-registry
+ (if (and (stringp id)
+ (or (eq type 'incoming)
+ (eq type 'process))
+ (or (eq classification 'spam)
+ (eq classification 'ham))
+ (assoc check spam-list-of-checks))
+ (let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type)))
+ found)
+ (dolist (cell cell-list)
+ (unless found
+ (when (and (eq classification (nth 0 cell))
+ (eq check (nth 1 cell)))
+ (setq found t))))
+ found)
+ (progn
+ (gnus-message 5 (format "%s called with bad ID, type, check, or group"
+ "spam-log-unregistration-needed-p"))
+ nil))))
;;; set up IMAP widening if it's necessary
(defun spam-setup-widening ()
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-BBDB
+ 'spam-use-BBDB
gnus-newsgroup-name)
(spam-enter-ham-BBDB (spam-fetch-field-from-fast article)))))
(spam-fetch-field-message-id-fast article)
'process
'spam
- 'spam-processing-use-ifile-spam
+ 'spam-use-ifile
gnus-newsgroup-name)
(spam-ifile-register-with-ifile
(spam-get-article-as-string article) spam-ifile-spam-category))
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-ifile-ham
+ 'spam-use-ifile
gnus-newsgroup-name)
(spam-ifile-register-with-ifile
(spam-get-article-as-string article) spam-ifile-ham-category))))
(spam-fetch-field-message-id-fast article)
'process
'spam
- 'spam-processing-use-stat-spam
+ 'spam-use-stat
gnus-newsgroup-name)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-stat-ham
+ 'spam-use-stat
gnus-newsgroup-name)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(spam-fetch-field-message-id-fast article)
'process
'spam
- 'spam-processing-use-blacklist
+ 'spam-use-blacklist
gnus-newsgroup-name)
(let ((from (spam-fetch-field-from-fast article)))
(when (stringp from)
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-whitelist
+ 'spam-use-whitelist
gnus-newsgroup-name)
(let ((from (spam-fetch-field-from-fast article)))
(when (stringp from)
(spam-fetch-field-message-id-fast article)
'process
'spam
- 'spam-processing-use-bogofilter-spam
+ 'spam-use-bogofilter
gnus-newsgroup-name)
(spam-bogofilter-register-with-bogofilter
(spam-get-article-as-string article) t))
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-bogofilter-ham
+ 'spam-use-bogofilter
gnus-newsgroup-name)
(spam-bogofilter-register-with-bogofilter
(spam-get-article-as-string article) nil))))
(spam-fetch-field-message-id-fast article)
'process
'ham
- 'spam-processing-use-spamoracle-ham
+ 'spam-use-spamoracle
gnus-newsgroup-name)
(spam-spamoracle-learn article nil))))
(spam-fetch-field-message-id-fast article)
'process
'spam
- 'spam-processing-use-spamoracle-spam
+ 'spam-use-spamoracle
gnus-newsgroup-name)
(spam-spamoracle-learn article t))
nil))