(defun tfheen-mark-as-spam ()
(interactive)
+ (let ((buf (get-buffer-create "*Spam mark*"))
+ (cacheid (tfheen-fetch-cacheid)))
+ (and cacheid
+ (start-process "spammark" buf "ssh" "vawad" "spam" cacheid)))
(gnus-summary-move-article nil (format-time-string "spam.%Y-%m") nil 'move)
(gnus-summary-next-subject 1))
-(defun tfheen-kill-ring-cacheid ()
+(defun tfheen-mark-as-ham ()
(interactive)
+ (let ((buf (get-buffer-create "*Ham mark*")))
+ (start-process "spammark" buf "ssh" "vawad" "ham" (tfheen-fetch-cacheid))))
+
+(defun tfheen-fetch-cacheid ()
(save-excursion
(set-buffer gnus-article-buffer)
- (message-narrow-to-headers-or-head)
- (kill-new (message-fetch-field "x-crm114-cacheid"))
- (widen)))
+ (message-fetch-field "x-crm114-cacheid")))
+
+(defun tfheen-kill-ring-cacheid ()
+ (interactive)
+ (kill-new (tfheen-fetch-cacheid))
+ (widen))
(cw/for-host "yiwaz\\|thosu\\|golem\\|xoog"
(define-key gnus-summary-backend-map "s" 'tfheen-mark-as-spam)
(add-to-list 'gnus-extra-headers 'X-CRM114-Score)
(add-to-list 'nnmail-extra-headers 'X-CRM114-Score)
+