[mew-dist 23350] Re: spamassassin
Hideyuki SHIRAI ( 白井秀行 )
shirai at example.com
2003年 3月 20日 (木) 14:26:10 JST
From: Hideyuki SHIRAI (白井秀行) <shirai at example.com> 曰く
Subject: [mew-dist 23347] Re: spamassassin
Message-ID: <20030320.122750.52157979.shirai at example.com>
Date: Thu, 20 Mar 2003 12:27:50 +0900 (JST)
> これで spamassassin の使い方あっていますか?
> auto-whitelist には入っているようです。また、smapassassin 自体は、
> procmail から
最後に、--add-whitelist 付け加えたときに間違っていました。(_ _)
(defun mew-add-spamassasin-blacklist (&optional white)
"From: を black list にいれる。C-u で white list にいれる。"
(interactive "P")
(let ((spamassassin (mew-which-exec "spamassassin")))
(if (null spamassassin)
(message "Install Spamassassin!!")
(mew-summary-not-in-queue
(mew-summary-not-in-draft
(mew-sinfo-set-disp-msg t)
(mew-summary-display)
(let* ((fld (mew-current-get-fld (mew-frame-id)))
(msg (mew-current-get-msg (mew-frame-id)))
(cache (mew-cache-hit fld msg 'must-hit))
froms from)
(save-excursion
(set-buffer cache)
(save-excursion
(goto-char (point-min))
(setq froms (mew-header-get-value "From:"))))
(if (null froms)
(message "No From:")
(setq froms (mew-addrstr-parse-address-list froms))
(while (setq from (car froms))
(setq from (downcase from))
(when (y-or-n-p (format "Add `%s' to %s? " from
(if white "*WHITE* list" "*BLACK* list")))
(message "Add `%s' to %s..." from
(if white "WHITE list" "BLACK list"))
(apply 'call-process spamassassin nil nil nil
(list "--auto-whitelist"
(format "--add-addr-to-%s=%s"
(if white "whitelist" "blacklist") from)))
(message "Add `%s' to %s...done" from
(if white "WHITE list" "BLACK list")))
(setq froms (cdr froms))))))))))
## なさけなぁ〜〜〜。
--
白井秀行 (mailto:shirai at example.com)
Mew-dist メーリングリストの案内