[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
spam.el recipie
From: |
Michael Slass |
Subject: |
spam.el recipie |
Date: |
Mon, 24 May 2004 18:11:15 GMT |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Hi:
Could anyone post/point me to a .gnus that's using spam.el? I'm ready
to migrate away from my home-rolled version.
BTW:
I've recently written this to look for .exe or .scr attachments which
are usually some Win32 virus. It seems to work OK, and a brief look
at spam.el doesn't show similar functionality. Did I miss it, or
would this still be useful?
Thanks.
(defun mail-contains-scr-or-exe-attachment-p (content-alist)
"return t if any part of `mm-content-id-alist' matches .src or .exe"
(cond
((not content-alist) nil)
((listp content-alist)
(or (mail-contains-scr-or-exe-attachment-p (car content-alist))
(mail-contains-scr-or-exe-attachment-p (cdr content-alist))))
((stringp content-alist) (string-match "\\.\\(?:scr\\|\\exe\\)$"
content-alist))
(t nil)))
(defun fancy-split-contains-exe-attach ()
(save-excursion
(let ((mbuf (or (get-buffer " *nnmail incoming*")
(get-buffer " *nnml move*")
(get-buffer " *Original Article*"))))
(when mbuf
(set-buffer mbuf)
(if (and (boundp 'mm-content-id-alist)
mm-content-id-alist
(mail-contains-scr-or-exe-attachment-p mm-content-id-alist))
"microsoft-virus")))))
--
Mike Slass
- spam.el recipie,
Michael Slass <=