Open Bug 83969 Opened 23 years ago Updated 1 year ago

Ability to search for "Has Attachments"

Categories

(MailNews Core :: Search, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: bugzilla, Unassigned)

References

(Depends on 1 open bug)

Details

It could be nice to be able to search mails/newspostings with attachments.

Outlook Express has this as an option to the search:
[ ] "Message has attachment(s)"
mass re-assign.
Assignee: naving → sspitzer
Mail can now be searched on "has attachment" or does not, but it would be nice
to have that function for newsgroups, and to be able to search on number of
attachments.
It would be nice if the name and/or the content type of the attachment searched
for could be specified ...

Like, lets say you know the name of the attachment you're looking to find, the
option "Has Attachment" might not be distinctive enough in such cases.
I would like to be able to search for attachements, too. Would be a very nice
feature!

Case: I wanted to look for a supposed-sent email with attach to an unknown
"to/cc". name or size of attachement are known... but no feature that allows
something like that. number of attachements is less worthy (in MY opinion) and
probably much more complex.

For seraching size enhancement, see Bug 92074
Product: Browser → Seamonkey
*** Bug 274189 has been marked as a duplicate of this bug. ***
Assignee: sspitzer → mail
*** Bug 105169 has been marked as a duplicate of this bug. ***
The patch in bug #196036 allows filtering on the "Has Attachment" status.
Depends on: 196036
No longer depends on: 196036
(In reply to comment #7)
> The patch in bug #196036 allows filtering on the "Has Attachment" status.

I guess that wasn't too relevant since this bug is about Searching, not Filtering.

The current code already allows searching POP3 folders for messages with
attachments. Some more work is needed to get it going for IMAP. I haven't looked
at News at all.
(In reply to comment #7)
> The patch in bug #196036 allows filtering on the "Has Attachment" status.

I think you meant bug 105169; 196036 is about filtering on Junk status.

Due to (I assume) 105169's patch, it's now possible to search Attachment Status for POP/Local Folders.  I assume 105169 is still open due to the IMAP case; adding dependency.
Depends on: 105169
Just to add my 2 cents on this bug -

I work in IT, and I have many users converting from existing e-mail clients to Thunderbird. These clients can sometimes have ten-thousands of e-mails a piece, with attachments scattered within. 

These clients are converting from Eudora, where attachments were kept in a single folder, and referencing them by name was the preferred means. While I do believe it's a better idea to keep the attachment(s) with the message, I don't see why Thunderbird doesn't have the ability to search for an attachment by filename. 

I also tried Google Desktop, as Google Desktop is *supposed* to index and search Thunderbird attachments, but I didn't have much success with that, either. 
Severity: normal → enhancement
QA Contact: laurel → search
Since searching for "Attachment status - is / isn't - has attachments" is already possible someone should change the summary of this bug or open a new one for the remaining issues and close this one.
Component: MailNews: Search → MailNews: Message Display
Referring back to Bug 439143 ... it says

"We can look for mails using a lot of criteria. However, we can't start a
research using the extension or the name of an e-mail's attachement.
We can only start a research to find e-mails with an attachment or not."

The has-attachment search ability of TB fixes the ability to search/find emails
with or without attachments, but the requester of Bug 439143 wants to be able
search for an attachment with a name matching <string> ... ie. find attachments 
based on some part of the attachment name string... for instance in TB 3b1 I 
looked at a message (snippet) source, as per:

<< SNIPPET Follows...

Original-recipient: rfc822;S@xyz.COM

This is a multi-part message in MIME format.

--Boundary_(ID_L0VxGTVX0o9zedpX9VwoJQ)
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT

test3


--Boundary_(ID_L0VxGTVX0o9zedpX9VwoJQ)
Content-type: application/pdf; name=BugStates.pdf
Content-transfer-encoding: BASE64
Content-disposition: attachment; filename=BugStates.pdf

 End of SNIPPET >>

I want to be able to search and find attachments based of filename= or part
of the filename= ... for instance "contains" {bug, states, .pdf} .. 

That ability is missing and desirable... in TB 3 please :-)
Assignee: mail → nobody
QA Contact: search → message-display
Component: MailNews: Message Display → Search
Product: SeaMonkey → MailNews Core
QA Contact: message-display → search
The original request of this bug seems to be quick searching (aka quick filtering) for msgs matching "has attachment". Thunderbird has this feature for quicksearch/quickfilter, global search, and advanced "search messages".
It's missing for TB only in advanced "search messages" for newsserver accounts (-> needs followup bug). Certainly, this bug isn't the right/actionable place to do that.
-> handing over to SeaMonkey product
Product: MailNews Core → SeaMonkey
QA Contact: search → search
Summary: Ability to search for "Attachments" → Ability to search for "Has Attachments"
See Also: → 105169, 224183, 224392, 83969
See Also: 83969
What is the matter with me? I have "attachment status" available on one install of TB but not on another install of the same version (e.g., 24.4.0). Is there a config setting or something I'm missing?
(In reply to Steve VanSlyck from comment #16)
> What is the matter with me? I have "attachment status" available on one
> install of TB but not on another install of the same version (e.g., 24.4.0).
> Is there a config setting or something I'm missing?

Hi Steve, here's advice from the friendly volunteers who do Thunderbird ;)

Following situation is same for TB 24, TB 31 and SeaMonkey 2.26.
Attachment Status is only available for POP accounts (not for News or IMAP).
Attachment Status is only available for advanced search / saved searches (not for Message Filters).

Iow, filtering/searching for Attachment Status ("has/doesn't have attachments") is not fully implemented in either product, and is only available for the very limited use case of Advanced Search / Saved Searches on accounts of type POP, nowhere else (verify Tools > Account Settings > Your Account > Server Settings > Server Type, perhaps TB's automatical account setup picked IMAP for you where you had POP on the other installation).

I'm not aware of a config setting about this.
If you don't see "Attachment Status" in that limited scenario where it's implemented, try starting TB in Safe Mode (Help > Restart with addons disabled).

hth
(In reply to Thomas D. from comment #17)
> (In reply to Steve VanSlyck from comment #16)
> > What is the matter with me? I have "attachment status" available on one
> > install of TB but not on another install of the same version (e.g., 24.4.0).
> > Is there a config setting or something I'm missing?
> 
> Hi Steve, here's advice from the friendly volunteers who do Thunderbird ;)
> 
> Following situation is same for TB 24, TB 31 and SeaMonkey 2.26.
> Attachment Status is only available for POP accounts (not for News or IMAP).
> Attachment Status is only available for advanced search / saved searches
> (not for Message Filters).

For Thunderbird only, Attachment Status is also available from Quick Filter Bar.
For Thunderbird only, Global Search faceted results come with advanced attachment filter options, which might be an alternative for your use case:

Global Search (Ctrl+K)
Type searchword to find matching messages, press Enter
In left-hand-side filter column of faceted search results, tick checkbox for "Attachments"
You'll then see a dropdown appearing:
- Any kind
- Archives
- Documents
- Images
- Other

I don't know how correctly that works, nor for what account types. Don't have time to test right now. The design suggests it should work for all account types.
Situation of this feature and bugs covering this is tricky and messy.

Anyway, on second thoughts, looks like my comment 15 didn't do the right thing;
whatever this bug is trying to fix will be a Mailnews Core thing, not SeaMonkey only.

(In reply to :aceman from bug 105169 comment #55)
> It seems to me this bug 105169 and bug 83969 both mention the lack of searching for
> attachments online (IMAP/News) as it already is implemented for local
> searches/filters.

In addition to that, even where "Attachment Status" is currently implemented and accessible from the UI, that flag is apparently just a guess based on content type of the message, without having parsed the actual message to verify existence of attachments:

(In reply to David :Bienvenu from Bug 105169 Comment 37)
> Comment on attachment 188289 [details] [diff] [review]
> Enable filtering for POP3 and IMAP
> 
> Again, the has attachment flag is only a guess at filter execution time,
> based on the content type of the message. We correct it when a message is
> displayed, if we've gotten it wrong. But it would be a bit dangerous to
> allow filters on a flag which is just an approximation when filters run on
> incoming messages. Thoughts?
Product: SeaMonkey → MailNews Core
This sux. I have it in advanced search (CTRL-SHIFT-F, not quick filter) in ver. 24.2 at work but got sqaut in ver. 31 at home. Both are IMAP accounts, not POP. I'm very careful about this.

As a user my concern isn't really about how its implemented. It works like a charm at work.
I agree with Steve. I had been frequently using "Attachment Status" in advance search ( Edit / Find / Search Message or ctrl-shift-f or rigth click on any folder select Search Messages... ) for my IMAP account for a long time (at least since 2010). It had been working very well. 

It has just disappeared a couple of days ago most probable with an automatic update. I am on release update channel and current version is 31.2.0.

I really would like to get it back, since quite get used to it. Even considering rollback to previous releases.
(In reply to Thomas D. from comment #20)
> In addition to that, even where "Attachment Status" is currently implemented
> and accessible from the UI, that flag is apparently just a guess based on
> content type of the message, without having parsed the actual message to
> verify existence of attachments...

I don't think that's actually true. When Gloda parses the message, it *should* update the flag. Opening the message *definitely* updates the flag.

Here's all the code that does that: http://mxr.mozilla.org/comm-central/ident?i=markHasAttachments

For what it's worth, I can search for things with attachments without issue on 31.2.0 (quick filter, advanced search, and gloda all work fine).
This bug can, IMO, be closed.

Probably another should be open for message filter (as opposed to search): 'has attachment', which seems not to exist.
Severity: normal → S3

(In reply to pedrogfrancisco from comment #24)

This bug can, IMO, be closed.

Probably another should be open for message filter (as opposed to search):
'has attachment', which seems not to exist.

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1814972.

You need to log in before you can comment on or make changes to this bug.