[imapfilter-devel] Messages sometimes saved to listname-%Y-%m

Lefteris Chatzibarbas lefcha at hellug.gr
Fri Feb 6 02:59:03 EET 2004


On Thu, Feb 05, 2004 at 01:02:41PM -0800, Greg Gilbert wrote:
> I have imapfilter set up to filter mailing list mail over  30 days
> old into an archives folder. In many cases, instead of being tagged
> with the date of the messages, the folder name will end in %Y-%m.

Ok, my mistake.  Try the attached patch against 0.9.5.  It should
correct the problem, where the date/time is not substituted properly.

> [...]
>
> filter archive-recent
> older 30
> action move archive/$_/$_- at Y-@m
>
> [...]
>
> debug: ACTION: 3 '' 'archive/$_- at Y-@m' 0 ''

This is very strange and I can't seem to reproduce it though I'm using a
similar "action move" destination mailbox. 

Because I can't see why in "action move archive/$_/$_- at Y-@m" the
destination mailbox gets parsed as "archive/$_- at Y-@m".  A "$_/" seems to
get lost somewhere...

Can you double check that this configuration file was used when you run
imapfilter and send this DEBUG output?

-------------- next part --------------
diff -ruN imapfilter-0.9.5.orig/action.c imapfilter-0.9.5/action.c
--- imapfilter-0.9.5.orig/action.c	Sat Dec  6 22:18:31 2003
+++ imapfilter-0.9.5/action.c	Fri Feb  6 02:41:01 2004
@@ -592,8 +592,9 @@
 
 	while (fetch_response(&connpri, t, 0, dbuf) == RESPONSE_NONE);
 
-	if (strptime(dbuf, "Date: %a, %d %b %Y %H:%M:%S", &tl) &&
-	    strftime(s, MBOX_NAME_LEN - 1, destmbox, &tl))
+	if (((strptime(dbuf, "Date: %a, %d %b %Y %H:%M:%S", &tl) ||
+		    strptime(dbuf, "Date: %d %b %Y %H:%M:%S", &tl)) &&
+		strftime(s, MBOX_NAME_LEN - 1, destmbox, &tl)))
 		xstrncpy(destmbox, s, MBOX_NAME_LEN - 1);
 }
 


More information about the Imapfilter-devel mailing list