[mew-dist 26570] Re: 漏洩防止機能

Ryota Hirose hirose at example.com
2005年 9月 2日 (金) 08:22:06 JST


ヤマハの広瀬です。

>From: Kazu Yamamoto (山本和彦) <kazu at example.com>
>Date: Mon, 22 Aug 2005 16:57:22 +0900 (JST)

> 社内宛のメールを間違って外に出してしまうと、バッシングされる世の中とな
> りました。そこで、社内宛のメールか、社外宛のメールか、簡単に分かるよう
> にしました。

社内のドメインを使って社外の人も含むMLを運用していると、単純にドメイン
だけでは警告すべきかどうか決められないので、mew-warn-addressesを新設し
て警告したいアドレスを指定できるようにしてみました。

(setq mew-my-domains '("comm.yamaha.co.jp"))
(setq mew-warn-addresses '("partner at example.com"))

これで、hirose at example.comは警告されないけど
partner at example.comは警告色になります。

-------------- next part --------------
Index: mew-config.el
===================================================================
RCS file: /cvsmew/mew/mew-config.el,v
retrieving revision 1.88
diff -u -r1.88 mew-config.el
--- mew-config.el	26 Aug 2005 06:05:34 -0000	1.88
+++ mew-config.el	1 Sep 2005 23:19:37 -0000
@@ -373,6 +373,9 @@
 (defun mew-my-domains (&optional case)
   (mew-cfent-value case "my-domains" mew-my-domains))
 
+(defun mew-warn-addresses (&optional case)
+  (mew-cfent-value case "warn-addresses" mew-warn-addresses))
+
 (defun mew-warn-my-address (&optional case)
   (mew-cfent-value case "warn-my-address" mew-warn-my-address))
 
Index: mew-highlight.el
===================================================================
RCS file: /cvsmew/mew/mew-highlight.el,v
retrieving revision 1.36
diff -u -r1.36 mew-highlight.el
--- mew-highlight.el	26 Aug 2005 06:05:34 -0000	1.36
+++ mew-highlight.el	1 Sep 2005 23:19:37 -0000
@@ -111,6 +111,7 @@
 
 (defun mew-highlight-header-address-region (beg end)
   (let ((domains (mew-my-domains (mew-tinfo-get-case)))
+	(warnaddrs (mew-warn-addresses (mew-tinfo-get-case)))
 	addr domain overlay begovl endovl)
     (when domains
       (save-excursion
@@ -120,7 +121,8 @@
 	  (setq domain (downcase (mew-match-string 1)))
 	  (setq begovl (match-beginning 0))
 	  (setq endovl (match-end 0))
-	  (unless (or (member domain (mew-my-domains (mew-tinfo-get-case)))
+	  (unless (or (and (not (member addr warnaddrs))
+			   (member domain domains))
 		      (and (not (mew-warn-my-address (mew-tinfo-get-case)))
 			   (mew-is-my-address mew-regex-my-address-list addr)))
 	    (setq overlay (mew-overlay-make begovl endovl))
Index: mew-vars.el
===================================================================
RCS file: /cvsmew/mew/mew-vars.el,v
retrieving revision 1.276
diff -u -r1.276 mew-vars.el
--- mew-vars.el	31 Aug 2005 03:15:02 -0000	1.276
+++ mew-vars.el	1 Sep 2005 23:19:37 -0000
@@ -459,6 +459,15 @@
   :group 'mew-draft
   :type '(choice (const nil) (repeat string)))
 
+(defcustom mew-warn-addresses nil
+  "*A list of warning addresses even if it has my domains.
+If addresses on 'mew-draft-address-warning-fields' in a draft
+are matched to this address lists, they
+turns the warning color.
+Addresses should be downcased."
+  :group 'mew-draft
+  :type '(choice (const nil) (repeat string)))
+
 (defcustom mew-warn-my-address t
   "*If nil, my address in a draft does not
 turn the warning color even if its domain


Mew-dist メーリングリストの案内