From: Erwan David on 28 Jul 2010 03:27 Indi <indi(a)satcidananda.16x108.merseine.nu> disait le 07/28/10 que : > On 2010-07-26, Erwan David <erwan(a)rail.eu.org> wrote: >> >> mairix lacks many features, especially no support for different >> encodings, which means that if I make my request in UTF-8 and I received >> the email in iso-8859-1, it won't be found. >> >> Mairix also always complains about mime part or headers it does not >> understand, and it does not understand many of them. >> > > Okay, I've installed mairix from ports and while it's true that it > chokes on a few headers, etc it does work just fine on local mboxes. > Very well in fact! > > Haven't had time to figure out whether it can be used for searching > the IMAP folders, but I'll bet it will -- even if I have to hook up > offlineimap or something to do it on the local copies. The first problem is very annoying when the majority of your emails is not in english... -- Le travail n'est pas une bonne chose. Si �a l'�tait, les riches l'auraient accapar�
From: Christian Ebert on 28 Jul 2010 03:58 * Erwan David on Wednesday, July 28, 2010: > Indi <indi(a)satcidananda.16x108.merseine.nu> disait le 07/28/10 que : >> On 2010-07-26, Erwan David <erwan(a)rail.eu.org> wrote: >>> mairix lacks many features, especially no support for different >>> encodings, which means that if I make my request in UTF-8 and I received >>> the email in iso-8859-1, it won't be found. >>> >>> Mairix also always complains about mime part or headers it does not >>> understand, and it does not understand many of them. >>> >> >> Okay, I've installed mairix from ports and while it's true that it >> chokes on a few headers, etc it does work just fine on local mboxes. >> Very well in fact! >> >> Haven't had time to figure out whether it can be used for searching >> the IMAP folders, but I'll bet it will -- even if I have to hook up >> offlineimap or something to do it on the local copies. > > The first problem is very annoying when the majority of your emails is > not in english... Perhaps nmzmail is worth a try: http://flpsed.org/nmzmail.html Disclaimer: I haven't used it myself (yet), so I can't guarantee that it works with other charsets as ascii, but I assume so as the underlying search engine is of Japanese origin: http://www.namazu.org/ c -- Was hei�t hier Dogma, ich bin Underdogma! [ What the hell do you mean dogma, I am underdogma. ] free movies --->>> http://www.blacktrash.org/underdogma/ http://itunes.apple.com/podcast/underdogma-movies/id363423596
From: Christian Ebert on 29 Jul 2010 08:30 * Erwan David on Wednesday, July 28, 2010: > Indi <indi(a)satcidananda.16x108.merseine.nu> disait le 07/28/10 que : >> On 2010-07-26, Erwan David <erwan(a)rail.eu.org> wrote: >>> mairix lacks many features, especially no support for different >>> encodings, which means that if I make my request in UTF-8 and I received >>> the email in iso-8859-1, it won't be found. >>> >>> Mairix also always complains about mime part or headers it does not >>> understand, and it does not understand many of them. >> >> Okay, I've installed mairix from ports and while it's true that it >> chokes on a few headers, etc it does work just fine on local mboxes. >> Very well in fact! >> >> Haven't had time to figure out whether it can be used for searching >> the IMAP folders, but I'll bet it will -- even if I have to hook up >> offlineimap or something to do it on the local copies. > > The first problem is very annoying when the majority of your emails is > not in english... Try this (I've called it mairixquery.sh): #!/bin/sh threads= augment= charset="`printf $LANG | cut -d . -f 2`" fallback="windows-1252" yorn() { local ans printf '%s %s ' "$1" "(yes/[no])" read -e ans case "$ans" in y*|Y*) return 0;; *) return 1;; esac } printf '%s\n' "Enter mairix query:" read -e query test -z "$query" && exit 0 yorn "Retrieve thread(s)?" && threads="--threads" yorn "Append message(s) to mfolder?" && augment="--augment" mairix $threads $augment "$query" queryx=`echo "$query" | iconv -f "$charset" -t "$fallback"` if [ "$queryx" != "$query" ]; then echo "trying $fallback" mairix $threads --augment "$queryx" fi You could also make the fallback interactive, but so far this has been enough for my needs. I then use it directly from within Mutt: set my_mairixfolder=`awk -F '=' '/^mfolder/ { print $2 }' ~/.mairixrc` macro index,pager ,m "\ <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ <shell-escape> mairixquery.sh<enter>\ <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ <change-folder>+$my_mairixfolder" "mairix query" macro browser ,m "\ <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ <shell-escape> mairixquery.sh<enter>\ <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ <exit><change-folder>+$my_mairixfolder" "mairix query" c -- \black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_ Ein deutscher Western/A German Western --->> http://www.blacktrash.org/underdogma/ccc.php
From: Erwan David on 31 Jul 2010 14:43 Christian Ebert <blacktrash(a)gmx.net> disait le 07/29/10 que : > * Erwan David on Wednesday, July 28, 2010: >> Indi <indi(a)satcidananda.16x108.merseine.nu> disait le 07/28/10 que : >>> On 2010-07-26, Erwan David <erwan(a)rail.eu.org> wrote: >>>> mairix lacks many features, especially no support for different >>>> encodings, which means that if I make my request in UTF-8 and I received >>>> the email in iso-8859-1, it won't be found. >>>> >>>> Mairix also always complains about mime part or headers it does not >>>> understand, and it does not understand many of them. >>> >>> Okay, I've installed mairix from ports and while it's true that it >>> chokes on a few headers, etc it does work just fine on local mboxes. >>> Very well in fact! >>> >>> Haven't had time to figure out whether it can be used for searching >>> the IMAP folders, but I'll bet it will -- even if I have to hook up >>> offlineimap or something to do it on the local copies. >> >> The first problem is very annoying when the majority of your emails is >> not in english... > > Try this (I've called it mairixquery.sh): > > > #!/bin/sh > > threads= > augment= > charset="`printf $LANG | cut -d . -f 2`" > fallback="windows-1252" > > yorn() { > local ans > printf '%s %s ' "$1" "(yes/[no])" > read -e ans > case "$ans" in > y*|Y*) return 0;; > *) return 1;; > esac > } > > printf '%s\n' "Enter mairix query:" > read -e query > test -z "$query" && exit 0 > > yorn "Retrieve thread(s)?" && threads="--threads" > yorn "Append message(s) to mfolder?" && augment="--augment" > > mairix $threads $augment "$query" > > queryx=`echo "$query" | iconv -f "$charset" -t "$fallback"` > > if [ "$queryx" != "$query" ]; then > echo "trying $fallback" > mairix $threads --augment "$queryx" > fi > > > You could also make the fallback interactive, but so far this has > been enough for my needs. > > > I then use it directly from within Mutt: > > > set my_mairixfolder=`awk -F '=' '/^mfolder/ { print $2 }' ~/.mairixrc` > > macro index,pager ,m "\ > <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ > <shell-escape> mairixquery.sh<enter>\ > <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ > <change-folder>+$my_mairixfolder" "mairix query" > > macro browser ,m "\ > <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ > <shell-escape> mairixquery.sh<enter>\ > <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ > <exit><change-folder>+$my_mairixfolder" "mairix query" > > > c You should better get charset through the locale command. In my setting LANG is undefined, only LC_CTYPE And it won't solve the problem that email is indexed in the received charset and I receive them in several charsets, indexing should be done on a normalized form. -- Le travail n'est pas une bonne chose. Si �a l'�tait, les riches l'auraient accapar�
From: Christian Ebert on 1 Aug 2010 13:01
* Erwan David on Saturday, July 31, 2010: > Christian Ebert <blacktrash(a)gmx.net> disait le 07/29/10 que : >> Try this (I've called it mairixquery.sh): >> >> >> #!/bin/sh >> >> threads= >> augment= >> charset="`printf $LANG | cut -d . -f 2`" >> fallback="windows-1252" >> >> yorn() { >> local ans >> printf '%s %s ' "$1" "(yes/[no])" >> read -e ans >> case "$ans" in >> y*|Y*) return 0;; >> *) return 1;; >> esac >> } >> >> printf '%s\n' "Enter mairix query:" >> read -e query >> test -z "$query" && exit 0 >> >> yorn "Retrieve thread(s)?" && threads="--threads" >> yorn "Append message(s) to mfolder?" && augment="--augment" >> >> mairix $threads $augment "$query" >> >> queryx=`echo "$query" | iconv -f "$charset" -t "$fallback"` >> >> if [ "$queryx" != "$query" ]; then >> echo "trying $fallback" >> mairix $threads --augment "$queryx" >> fi >> >> >> You could also make the fallback interactive, but so far this has >> been enough for my needs. >> >> >> I then use it directly from within Mutt: >> >> >> set my_mairixfolder=`awk -F '=' '/^mfolder/ { print $2 }' ~/.mairixrc` >> >> macro index,pager ,m "\ >> <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ >> <shell-escape> mairixquery.sh<enter>\ >> <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ >> <change-folder>+$my_mairixfolder" "mairix query" >> >> macro browser ,m "\ >> <enter-command> set my_wait_key=\$wait_key wait_key=no<enter>\ >> <shell-escape> mairixquery.sh<enter>\ >> <enter-command> set wait_key=\$my_wait_key &my_wait_key<enter>\ >> <exit><change-folder>+$my_mairixfolder" "mairix query" > > You should better get charset through the locale command. In my setting > LANG is undefined, only LC_CTYPE Ok. Use LC_CTYPE then ;-) > And it won't solve the problem that email is indexed in the received > charset and I receive them in several charsets, indexing should be done > on a normalized form. Of course. It's only a workaround which happens to cover most of my personal use cases. nmzmail might be better suited for you, but it has other shortcomings, like lack of thread retrieval (something I really like with mairix). So, for me, it's at least better than nothing. I asked on the mairix-users list, and it doesn't look like something like you wish for is going to implemented anytime soon. c -- Was hei�t hier Dogma, ich bin Underdogma! [ What the hell do you mean dogma, I am underdogma. ] free movies --->>> http://www.blacktrash.org/underdogma/ http://itunes.apple.com/podcast/underdogma-movies/id363423596 |