the value of hashcash payment to be made to that user. STRING, if
present, is the string to be hashed; if not present ADDR will be used.")
-(defcustom hashcash "hashcash"
+(defcustom hashcash "/usr/local/bin/hashcash"
"*The path to the hashcash binary.")
+(defcustom hashcash-in-news nil
+ "*Specifies whether or not hashcash payments should be made to newsgroups."
+ :type 'boolean)
+
(require 'mail-utils)
(defun hashcash-strip-quoted-names (addr)
(narrow-to-region (point-min) (point))
(let ((to (hashcash-strip-quoted-names (mail-fetch-field "To" nil t)))
(cc (hashcash-strip-quoted-names (mail-fetch-field "Cc" nil t)))
- (ng (hashcash-strip-quoted-names
- (mail-fetch-field "Newsgroups" nil t))))
+ (ng (hashcash-strip-quoted-names (mail-fetch-field "Newsgroups"
+ nil t))))
(when to
(setq addrlist (split-string to ",[ \t\n]*")))
(when cc
(setq addrlist (nconc addrlist (split-string cc ",[ \t\n]*"))))
- (when ng
+ (when (and hashcash-in-news ng)
(setq addrlist (nconc addrlist (split-string ng ",[ \t\n]*")))))
(when addrlist
(mapc #'hashcash-insert-payment addrlist)))))