From: yamaoka Date: Thu, 30 Sep 2004 22:20:22 +0000 (+0000) Subject: Synch to No Gnus 200409302052. X-Git-Tag: t-gnus-6_17_4-quimby-~735 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc7b5c59c37427ec7863e103c155609d29d92cd9;p=elisp%2Fgnus.git- Synch to No Gnus 200409302052. --- diff --git a/ChangeLog b/ChangeLog index 202a537..f22ec7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-30 Simon Josefsson + + * Makefile.in (GNUS-NEWS): Depend on texi/gnus-news.texi. + + * GNUS-NEWS: Generated. + 2004-09-30 Katsumi Yamaoka * lisp/gnus-encrypt.el: Bind password-cache-expiry when compiling. diff --git a/GNUS-NEWS b/GNUS-NEWS index 9b04b3c..6db5c54 100644 --- a/GNUS-NEWS +++ b/GNUS-NEWS @@ -81,7 +81,8 @@ header. This changes the default of `gnus-article-loose-mime'. ** Gnus now view DNS master files sent as text/dns using dns-mode. ** Gnus now support the "hashcash" client puzzle anti-spam idea. See -the Gnus manual, section Hashcash, for more information. +the Gnus manual, section Hashcash, for more information. Use (setq +message-generate-hashcash t) to enable. * For older news, see Gnus info node "New Features". diff --git a/Makefile.in b/Makefile.in index 44a8a05..3c27759 100644 --- a/Makefile.in +++ b/Makefile.in @@ -163,7 +163,7 @@ uninstall: cd texi && $(MAKE) uninstall cd etc && $(MAKE) uninstall -GNUS-NEWS: +GNUS-NEWS: texi/gnus-news.texi cd texi && $(MAKE) GNUS-NEWS # Rule for Lars and nobody else. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa81e18..0bab734 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-09-30 Simon Josefsson + + * message.el (message-generate-hashcash): Add. + (message-send-mail): Use it, call mail-add-payment. + 2004-09-29 Teodor Zlatanov * spam.el (spam-verify-bogofilter): -V, not -sV option diff --git a/lisp/message.el b/lisp/message.el index e6efd24..438e637 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -40,7 +40,8 @@ (require 'cl) (require 'smtp) (defvar gnus-message-group-art) - (defvar gnus-list-identifiers)) ; gnus-sum is required where necessary + (defvar gnus-list-identifiers) ; gnus-sum is required where necessary + (require 'hashcash)) (require 'canlock) (require 'mailheader) (require 'nnheader) @@ -1636,6 +1637,12 @@ no, only reply back to the author." (const :tag "Never" nil) (const :tag "Always" t))) +(defcustom message-generate-hashcash nil + "*Whether to generate X-Hashcash: headers." + :group 'message-headers + :link '(custom-manual "(message)Mail Headers") + :type 'boolean) + ;;; Internal variables. (defvar message-sending-message "Sending...") @@ -4212,6 +4219,13 @@ This sub function is for exclusive use of `message-send-mail'." (message-this-is-mail t) (headers message-required-mail-headers) failure) + (when message-generate-hashcash + (save-restriction + (message-narrow-to-headers) + (message-remove-header "X-Hashcash")) + (message "Generating hashcash...") + (mail-add-payment) + (message "Generating hashcash...done")) (save-restriction (message-narrow-to-headers) ;; Generate the Mail-Followup-To header if the header is not there... diff --git a/texi/ChangeLog b/texi/ChangeLog index bd21ab4..29d889e 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,11 @@ +2004-09-30 Simon Josefsson + + * gnus-news.texi: Add. + + * message.texi (Mail Headers): Add. + + * gnus.texi (Hashcash): Fix. + 2004-09-29 Simon Josefsson * gnus-news.texi: Add. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index e3f0ae8..2b3f4de 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -21620,25 +21620,22 @@ Spam と戦うための新しい技法は、いくばくかの負担にはなるが明らかに独特な は @uref{http://www.cypherspace.org/~adam/hashcash/} を参照して下さい。 さらなる情報が @uref{http://www.camram.org/} で見つかるでしょう。 -送信するメッセージのそれぞれについて hashcash を呼ぼうと思うなら、こんな -ふうにして下さい: +送信するメッセージのそれぞれについて hashcash を生成させようと思うなら、 +以下のように @code{message-generate-hashcash} (@pxref{Mail Headers,,Mail +Headers,message-ja, The Message Manual}) をカスタマイズして下さい: @lisp -(add-hook 'message-send-hook 'mail-add-payment) +(setq message-generate-hashcash t) @end lisp -@file{hashcash.el} ライブラリは Gnus の中で、また -は @uref{http://users.actrix.gen.nz/mycroft/hashcash.el} として見つける -ことができます。 - いくつかの追加の変数の設定もしなければなりません: @table @code @item hashcash-default-payment @vindex hashcash-default-payment この変数はハッシュの衝突を成すディフォルトのビット数を示します。規定値 -は 0 で、何も行なわれないことを意味します。提案されている有効な値 -は 17 から 29 までの数です。 +は 10 で、それはいささか低い値です。提唱されている有効な値は 17 か +ら 29 までの数です。 @item hashcash-payment-alist @vindex hashcash-payment-alist diff --git a/texi/gnus-news.texi b/texi/gnus-news.texi index a031a9f..d2491e7 100644 --- a/texi/gnus-news.texi +++ b/texi/gnus-news.texi @@ -97,7 +97,8 @@ This changes the default of @code{gnus-article-loose-mime}. @item Gnus now view DNS master files sent as text/dns using dns-mode. @item Gnus now support the ``hashcash'' client puzzle anti-spam idea. -See the Gnus manual, section Hashcash, for more information. +See the Gnus manual, section Hashcash, for more information. Use +(setq message-generate-hashcash t) to enable. @end itemize diff --git a/texi/gnus.texi b/texi/gnus.texi index 31d8f95..03d3b6e 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -22522,16 +22522,14 @@ header. For more details, and for the external application @uref{http://www.cypherspace.org/~adam/hashcash/}. Even more information can be found at @uref{http://www.camram.org/}. -If you wish to call hashcash for each message you send, say something -like: +If you wish to generate hashcash for each message you send, you can +customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail +Headers,message, The Message Manual}), as in: @lisp -(add-hook 'message-send-hook 'mail-add-payment) +(setq message-generate-hashcash t) @end lisp -The @file{hashcash.el} library can be found in Gnus or at -@uref{http://users.actrix.gen.nz/mycroft/hashcash.el}. - You will need to set up some additional variables as well: @table @code @@ -22539,8 +22537,8 @@ You will need to set up some additional variables as well: @item hashcash-default-payment @vindex hashcash-default-payment This variable indicates the default number of bits the hash collision -should consist of. By default this is 0, meaning nothing will be -done. Suggested useful values include 17 to 29. +should consist of. By default this is 10, which is a rather low +value. Suggested useful values include 17 to 29. @item hashcash-payment-alist @vindex hashcash-payment-alist diff --git a/texi/message-ja.texi b/texi/message-ja.texi index 3076cbc..8426d44 100644 --- a/texi/message-ja.texi +++ b/texi/message-ja.texi @@ -1439,6 +1439,12 @@ Lines (optional . User-Agent))} です。 @vindex message-default-mail-headers この文字列はメールとして初期化された全てのメッセージバッファのヘッダーの 最後の挿入されます。 + +@item message-generate-hashcash +@vindex message-generate-hashcash +メッセージに @samp{X-Hashcash} ヘッダーを付加すべきかどうかを指示するブー +ル (値が @code{nil} か非-@code{nil} の) 変数です。@xref{Hashcash, +,Hashcash,gnus-ja,The Gnus Manual}. @end table @node Mail Variables diff --git a/texi/message.texi b/texi/message.texi index 6fb9900..5b4a232 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1446,6 +1446,12 @@ Regexp of headers to be removed before mailing. The default is This string is inserted at the end of the headers in all message buffers that are initialized as mail. +@item message-generate-hashcash +@vindex message-generate-hashcash +Boolean variable that indicate whether @samp{X-Hashcash} headers +should be computed for the message. @xref{Hashcash, ,Hashcash,gnus, +The Gnus Manual}. + @end table