[imapfilter-devel] problem with older x / newer x

Lefteris Chatzibarbas lefcha at hellug.gr
Mon Mar 22 00:13:24 EET 2004


On Sun, Mar 21, 2004 at 03:19:43AM +0100, Michael Reinsch wrote:
> When using older x / newer x, imapfilter uses the user's locale
> (determined by LC_TIME) to render the date sent to the IMAP server. Thus
> if the locale of the user isn't English, the IMAP server will not
> understand the request and return nothing. Calling imapfilter with
> "LC_TIME=C imapfilter" is a workaround, but not very nice.

Use the attached patch against imapfilter version 0.9.6.

> And a suggestion for mask:
> 
> How about allowing the user to call an external command which gets
> either selected header lines or the hole mail? Depending on the exit
> value (0 / non-zero), the mask would be evaluated as true or false.

This is a popular request.

I'm working on a solution that will make this possible, with a very (or the
most) flexible and powerful way.

-------------- next part --------------
diff -ruN imapfilter-0.9.6.orig/imapfilter.c imapfilter-0.9.6/imapfilter.c
--- imapfilter-0.9.6.orig/imapfilter.c	Sun Feb  8 23:45:01 2004
+++ imapfilter-0.9.6/imapfilter.c	Sun Mar 21 23:57:22 2004
@@ -53,7 +53,7 @@
 	account_t *ca;		/* Current account. */
 	mbox_t *cm;		/* Current mailbox. */
 
-	setlocale(LC_ALL, "");
+	setlocale(LC_CTYPE, "");
 
 	home = getenv("HOME");
 	options = (OPTION_DETAILS_NORMAL | OPTION_NAMESPACE | OPTION_PEEK);


More information about the Imapfilter-devel mailing list