[Dovecot] decode2text.sh

Timo Sirainen tss at iki.fi
Wed Jan 30 23:38:08 EET 2013


On 29.1.2013, at 20.59, bhs692-dove at yahoo.com wrote:

> Dovecot version: 2.1.13
> OS: Centos 6.3
> CPU: 64bit x86
> 
> There appear to be two related errors in the decode2text.sh file (which can be used for indexing/ searching attachments).
> -  The layout of "$formats" has repeated values for pdf, ppt, etc, so you should only match the pattern once by adding -m1
> -  The layout of "$formats" has the file extension in the second "column", so the "start of line"(^) match doesn't work as is.
> 
> 
> Original problem line (from ./src/plugins/fts/decode2texh.sh):
>    fmt=`echo "$formats" | grep -w "^$content_type" | cut -d ' ' -f 2`

This finds the the extension text based on the content-type and does it correctly. You seem to think it wants to search for the extension text. Why? If there's a bug, it's not in the script.



More information about the dovecot mailing list