[imapfilter-devel] i18n and difference bitween match_subject() and contain_subject()
Lefteris Chatzimparmpas
lefcha at hellug.gr
Fri Nov 20 01:19:07 EET 2009
On Tue, Nov 17, 2009 at 01:33:08PM +0300, Alexander Polyakhov wrote:
> hi,
> Lefteris Chatzimparmpas wrote:
>> Can you run imapfilter with the -v option so we can see what was the
>> error message when the search query was sent to the mail server?
>>
>> I suspect that it might be a character set issue with the search
>> queries...
>>
> here is it:
> S (3): * OK Server IMAP4rev1 1.8.18 at imap6:993 ready to talk with
> 1.2.3.4:64963 2009-Nov-16 22:47:46
> C (3): 1000 CAPABILITY
> S (3): 1000 OK CAPABILITY completed
> C (3): 1001 LOGIN "username" *
> S (3): 1001 OK LOGIN completed
> C (3): 1002 SELECT "INBOX"
> S (3): 1002 OK [READ-WRITE] SELECT completed
> C (3): 1003 UID SEARCH ALL SUBJECT "Ответ на ваш комментарий на welinux.ru"
> S (3): 1003 OK SEARCH completed
> C (3): 1004 LOGOUT
>
> and after that the 'target' message left in INBOX
Instead of contain_subject(), can you try using the send_query()
function, and specify a character set, like this:
account.INBOX:send_query('ALL SUBJECT "Ответ на ваш комментарийна welinux.ru"', "ISO-8859-7")
... where instad of "ISO-8859-7" (greek character set), you should use
what is appropriate for your language, or maybe try "UTF-8".
If that works then since imapfilter lacks some option to have a charset
for all search queries at the moment (too bad I forgot to add that), you
can work around this by editing the /usr/share/imapfilter/mailbox.lua
(or wherever mailbox.lua is installed), and change line 72 from:
charset = ''
... to whatever your charset should be by default.
I'll add some global option for the charset for searching at the next
release...
More information about the Imapfilter-devel
mailing list