recoll and mime-text

jf at dockes.org jf at dockes.org
Tue Apr 23 07:44:53 UTC 2013


poma writes:
 > On 22.04.2013 08:18, medoc wrote:
 > > poma wrote
 > >> Sylpheed version 3.3.0-1
 > >> Working like a charm. :)
 > >> Recoll settings related to the file types are default ones.
 > > 
 > > Hi,
 > > 
 > > Dave's problem was not to get at the attachment from the result list, but
 > > trying to 'Open' the message, then get at the attachment from there. This
 > > failed because Thunderbird started in 'Compose' mode with the message itself
 > > as a text attachment, instead of doing the right thing.
 > > 
 > > As far as I know, using 'Open' on an email does not work currently because
 > > neither xdg-open nor any common mail client supports it. Are you able to do
 > > it anyway ? Maybe I'm missing something.
 > > 
 > > To get at the attachment, you need to fiddle with the search until you can
 > > see it as a search result. There will be something in a future Recoll to
 > > make extracting attachments easier.
 > 
 > Cheers Jean, Dave
 > It doesn't matter which method is used. ;)
 > Both do work like a charm.
 > You only need to set the proper mime type association - "rfc822"
 > A reason why I mentioned the Xfce because it has a very convenient MIME
 > type editor - xfce4-mime-settings(xfce4-settings)[1], which can be used
 > for someone who is not proficient in direct editing MIME type file/s.
 > 
 > RFC #  822[2]
 > ~/.local/share/applications/mimeapps.list
 > message/rfc822=mozilla-thunderbird.desktop
 > 
 > /usr/share/applications/mozilla-thunderbird.desktop
 > Exec=thunderbird %u
 > TryExec=thunderbird
 > 
 > > But this is not a subject for the Fedora mailing list, I think we should get
 > > off it if you would like to pursue this further.
 > 
 > Au contraire, it's a good title and theme. Let the people learn. :)

Ok then. 

I did a little more testing, and Dave supplied a hint about kmail.

As far as I know Thunderbird will only open and display a message file
passed on the command line if the file name has a ".eml" extension.

When you get a Recoll message result which is part of an mbox folder, which
would be the case if the message is actually held in the Thunderbird
profile, or also if it is found inside another "mbox" format file, and when
you click "Open" on it, Recoll creates a ".eml" temporary file and starts
Thunderbird on it (through xdg-open), ** which is, I think, why you see
things working ** (I'd be delighted to be wrong).

But, if the message is held in a single-message file inside an MH or
Maildir directory, (in general without a .eml extension), Recoll will have
no reason to create a temporary file, and it will execute
xdg-open/Thunderbird directly on it. I could find no way to get Thunderbird
to behave in this situation (it will usually start in 'Compose' mode, with
the message as a text attachment). 

There is a reasonably simple workaround using an intermediary script to
create a temp file, it is described here:
  https://bitbucket.org/medoc/recoll/wiki/OpenHelperScript

Dave showed me that kmail was able to do the right thing in this situation,
using the --view option. You can set this up by adding message/rfc822 to
the non-desktop mime type exceptions in the Recoll preferences and setting
up "kmail --view %u" as the message/rfc822 viewer.

I would **love** to find a simple mail client which could display any
message/rfc822 file or mail folder passed on the command line, but this
does not seem to really exist. Kmail does the job, but it comes with the
whole akonadi/nepomuk baggage, which is a bit much for people who are not
using KDE already.

Cheers,

jf


More information about the users mailing list