koniu / recoll-webui

web interface for recoll desktop search
266 stars 55 forks source link

How to open mail attachments from search results? #51

Closed derandiunddasbo closed 8 years ago

derandiunddasbo commented 8 years ago

Though recoll webui shows indexed mail attachments from maildir files as seperate search results, the link references the maildir file itself. Is it possible somehow to download only the attachment from the search result rather than the raw maildir file?

Is there some "decode attachment from maildir file to temp file and deliver the temp file to the user" procedure already implemented in recoll webui similar to the recoll desktop application and I just missed it in the readme or in the settings or isn't such a feature implemented (yet).

ghost commented 8 years ago

Actually, this seems to work fine for me (tested with a PDF attachment). Maybe I did not understand your actual issue.

This would dependant on the recoll version too: what version are you running ?

derandiunddasbo commented 8 years ago

Sorry, I forgot to mention the versions I'm using in the first place: recoll v1.17.3 + Xapian 1.2.12 (from the debian wheezy repos) and recoll-webui 1.18.1

And the issue in other words: I'm getting search results with an attachment name as the title (f.e. "my_excel_file.xls") followed by a sequential number in square brackets after the file name indicating if it's the first, second, third, etc. attachment in the maildir file.

But the title links to the raw maildir file and the sequential number isn't a link at all. The third line (green) in the search result, normally holding the containing folder for search results from a local file system, links to the raw maildir file as well. But there is no link in the search result leading to the extracted and decoded attachment itself.

Thus, recoll-webui obviously recognizes the search result as an attachment inside a maildir file, but does not offer a link for downloading / opening the attachment, just two links (title and "folder") to the raw maildir file.

Are newer recoll / recoll-webui versions behaving differently with attachment handling? If so, I'll try again with current versions.

ghost commented 8 years ago

Hi,

Yes, you need to upgrade the recoll installation, 1.17 did not support extracting attachments through the Python API, the webui is detecting this and not proposing the action.

Upgrading the recoll version and restarting the webui should be enough to get things working. There are Debian Wheezy packages for the current version on the recoll web site.

derandiunddasbo commented 8 years ago

Uhm ok - updating recoll is actually easier said than done in my case: I'm using recoll on a raspberry pi 2, but the wheezy backport in the lesbonscomptes.com repo only offers packages for x86 and amd64 architecture. An armhf package is offered for jessie only.

Unfortunately, updating the pi to jessie is not an option at the moment (*), so I don't know where to get a recent recoll version for wheezy on armhf or armv7.

(*) I don't know, why this went so bad last time I did a wheezy to jessie update on a RPi2, but unfortunately it was far from "flawless", even jessie for RPi is labeled as "stable" since early spring this year. It cost me a week to replace or workaround several broken tools and services (all from the standard repositories and all known issues, but unfortunately you only know what to look for if you run into such issues yourself...).

ghost commented 8 years ago

I'll build a wheezy backport, this should be no big deal if I can put my hand on the wheezy sd card...

derandiunddasbo commented 8 years ago

Well ok, if it's actually no big deal for you, I'd very much appreciate to see a recoll backport for wheezy on ARM. Thanks in advance for your effort. :-)

ghost commented 8 years ago

Just the time to reboot the rpi and run a script, no big deal... The package should be available now.

derandiunddasbo commented 8 years ago

With the current packages the preview and attachment extraction is working flawlessly.

Thanks again for your quick support!