]> err.no Git - dotfiles/commitdiff
Be smarter wrt spam folder
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 10 Jun 2008 00:03:42 +0000 (00:03 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 10 Jun 2008 00:03:42 +0000 (00:03 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@1253 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

gnus

diff --git a/gnus b/gnus
index 102a060e92fb0f1d732ee0094f823b4306b67461..11a69c393a911f1de28e9fcce6f09ec0356c047e 100644 (file)
--- a/gnus
+++ b/gnus
@@ -659,15 +659,19 @@ on multiple mail-followup-to headers"
 
 (setq tfheen-spam-folder (format-time-string "spam.%Y-%m"))
 (cw/for-host "luxevop"
-  (setq tfheen-spam-folder (format-time-string "INBOX/spam.%Y")))
-
+  (setq tfheen-spam-folder (lambda () (if (string-match "nnimap\\+mail\\.err\\.no" gnus-newsgroup-name)
+                                         (format-time-string "nnimap+mail.err.no:spam.%Y-%m")
+                                       (format-time-string "INBOX/spam.%Y")))))
+  
 (defun tfheen-mark-as-spam ()
   (interactive)
 ;  (let ((buf (get-buffer-create "*Spam mark*"))
 ;      (cacheid (tfheen-fetch-cacheid)))
 ;    (and cacheid
 ;       (start-process "spammark" buf "ssh" "vuizook" "spam" cacheid)))
-  (gnus-summary-move-article nil tfheen-spam-folder nil 'move)
+  (gnus-summary-move-article nil (if (stringp tfheen-spam-folder)
+                                             tfheen-spam-folder
+                                    (apply tfheen-spam-folder nil)) nil 'move)
   (gnus-summary-next-subject 1))
 
 (defun tfheen-mark-as-ham ()