[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0.99 deleted UNSEEN messages from my INBOX



INOUE Katsumi <kinoue@jp.oracle.com> writes:

> My split setting is like below, is this any peculiar?
> 
> (setq nnimap-split-inbox '("INBOX")
>       nnimap-split-rule '(("mag2" "^From:.*mag2.*tegami")
> 			  ("ml" "^From:.*devinfo@net")))

You don't have a empty regexp matching "everything else". This is
wrong according to the documentation, but in practice I think it has
worked previously and 0.99 changed that.

This patch makes sure we only delete articles that's been successfully
copied somewhere.

--- nnimap.el~	Sun May  9 18:56:19 1999
+++ nnimap.el	Fri May 14 13:07:38 1999
@@ -532,14 +532,15 @@
 	    (dolist (article (imap-search "UNSEEN UNDELETED"))
 	      (when (nnimap-request-head article)
 		;; copy article to right group(s)
-		(setq removeorig t)
+		(setq removeorig nil)
 		(dolist (to-group (nnimap-split-to-groups rule))
 		  (if (imap-message-copy article to-group nil nil t)
-		      (message "IMAP split moved %s:%s:%d to %s" server inbox
-			       article to-group)
+		      (progn
+			(message "IMAP split moved %s:%s:%d to %s" server inbox
+				 article to-group)
+			(setq removeorig t))
 		    (message "IMAP split failed to move %s:%s:%d to %s" server
-			     inbox article to-group)
-		    (setq removeorig nil)))
+			     inbox article to-group)))
 		;; remove article on success
 		(when removeorig
 		  (setq nnimap-need-expunge t)