Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No way to filter imap messages by "body contains"?

2,149 views
Skip to first unread message

Autumn

unread,
Apr 8, 2016, 9:25:16 PM4/8/16
to mozilla-suppo...@lists.mozilla.org
Hello, I don't see any options for creating a filter that filters
messages based on the contents of the message body on my imap account.

I've tried creating a filter with a custom message header named "Body"
but it does nothing.

On the web it appears that this is not possible for imap accounts. Is
this true? if not, how can I do it?

I'm using v31.7.0. Thanks

John Kaufmann

unread,
Apr 8, 2016, 10:55:09 PM4/8/16
to support-t...@lists.mozilla.org
On 04/08/2016 09:24 PM, Autumn wrote:

> ... I don't see any options for creating a filter that filters messages
> based on the contents of the message body on my imap account.

What do you mean by "don't see any options"? Is "Body" not available? - is
it available but without the "Contains" selection?

> I've tried creating a filter with a custom message header named "Body" but
> it does nothing.
>
> On the web it appears that this is not possible for imap accounts. Is this
> true? if not, how can I do it?
>
> I'm using v31.7.0...

No problem here (v38.6.0). In an imap account [not this account] I made a
filter on "Body" "Contains" <string> and it executed perfectly. (And of
course the same conditions also work in message search.)

Autumn

unread,
Apr 8, 2016, 11:53:03 PM4/8/16
to mozilla-suppo...@lists.mozilla.org
On 04/08/2016 09:54 PM, John Kaufmann wrote:
> On 04/08/2016 09:24 PM, Autumn wrote:

> What do you mean by "don't see any options"? Is "Body" not available? -
> is it available but without the "Contains" selection?
>

Exactly, not available

>
> No problem here (v38.6.0). In an imap account [not this account] I made
> a filter on "Body" "Contains" <string> and it executed perfectly. (And
> of course the same conditions also work in message search.)

Is it available for you or did you create the custom message header
named "Body"?

Jim Porter

unread,
Apr 9, 2016, 1:48:49 AM4/9/16
to mozilla-suppo...@lists.mozilla.org
On 04/08/2016 08:24 PM, Autumn wrote:
> Hello, I don't see any options for creating a filter that filters
> messages based on the contents of the message body on my imap account.

Works fine for me. There's a built-in option for filtering by Body when
I create a filter for an IMAP account.

Do you have Thunderbird set to automatically download message bodies?
(Account Settings -> Synchronization & Storage -> Keep message for this
account on this computer). If you don't, I would be unsurprised to find
that you can't filter based on the bodies of incoming messages - they
haven't been downloaded!

- Jim

Autumn

unread,
Apr 9, 2016, 2:54:24 AM4/9/16
to mozilla-suppo...@lists.mozilla.org
On 04/09/2016 12:48 AM, Jim Porter wrote:
>
> Do you have Thunderbird set to automatically download message bodies?
> (Account Settings -> Synchronization & Storage -> Keep message for this
> account on this computer). If you don't, I would be unsurprised to find
> that you can't filter based on the bodies of incoming messages - they
> haven't been downloaded!
>
> - Jim
>

I don't, but I don't like downloading messages to any of computers I use
thunderbird on. Is this absolutely necessary?

Jim Porter

unread,
Apr 9, 2016, 2:53:41 PM4/9/16
to mozilla-suppo...@lists.mozilla.org
On 04/09/2016 01:53 AM, Autumn wrote:
> On 04/09/2016 12:48 AM, Jim Porter wrote:
>> Do you have Thunderbird set to automatically download message bodies?
>>
> I don't, but I don't like downloading messages to any of computers I use
> thunderbird on. Is this absolutely necessary?

I'm 95% sure you'd need to download message bodies in order to filter
(in Thunderbird) by body. If you request that Thunderbird not download
bodies automatically, it should always respect that, but that makes it
impossible to filter on the body.

However, depending on what mail provider you're using, you could create
a message filter on your IMAP server. That has the benefit of
centralizing your filters so you don't need to keep them in sync on
every device you use. Gmail has decent mail filters, and I know a number
of other mail providers do too.

- Jim

autumn

unread,
Jun 14, 2016, 9:29:31 AM6/14/16
to mozilla-suppo...@lists.mozilla.org
Jim Porter wrote:
Do you have Thunderbird set to automatically download message bodies?
(Account Settings -> Synchronization & Storage -> Keep message for this
account on this computer). If you don't, I would be unsurprised to find
that you can't filter based on the bodies of incoming messages - they
haven't been downloaded!
>
> I'm 95% sure you'd need to download message bodies in order to filter
> (in Thunderbird) by body. If you request that Thunderbird not download
> bodies automatically, it should always respect that, but that makes it
> impossible to filter on the body.
>

Hello, I'm coming back to this because I tried to do this again the
other day and recalled it can't be done and I'd already made a thread
about it. I've a few thoughts and questions:

1. When you automatically download messages for an imap account are they
somehow protected in the folder where they're saved? e.g. can others
different from me browse the folder and read them? That's what I'm
worried about when downloading messages to several computers I have TB
installed in. If the answer is YES no need to move to 2

2. If automatic downloading of messages is disabled isn't there a way to
tell Thunderbird something like "look, I've got a bunch of body filters
you obviously can't apply for all messages because I don't download
them, but why don't you do this: when you download a message for me to
read, run the body filters through it and save the result. Do this for
every message I read so that later I can apply body filters to several
Read messages *without* having to download them again" ?

Example: I create a filter like this "body contains: accepted", then I
get and read an email that contains "accepted". While I am reading it TB
runs the filter and since this message contains the word, then TB
associates the filter and this message. Later I read another message
that also contains the word "accepted" so TB associates it with the
filter too.
I reboot the computer and reopen TB. I select the "body contains:
accepted" filter and then the 2 messages I was reading previously are
listed.

Can this be done?

Tanstaafl

unread,
Jun 14, 2016, 10:20:35 AM6/14/16
to support-t...@lists.mozilla.org
On 6/14/2016 9:28 AM, autumn <aut...@leaves.dca1.giganews.com> wrote:
> 1. When you automatically download messages for an imap account are they
> somehow protected in the folder where they're saved? e.g. can others
> different from me browse the folder and read them?

Only if they have access to where they are located.

As long as you are using different usernames on the computer - meaning,
they aren't logging on to the computer with the same username you are
using - then they won't be able to read them.

If you are using a shared user login - then don't. There are numerous
reasons this is a very bad idea, privacy being only one.

> 2. If automatic downloading of messages is disabled isn't there a way to
> tell Thunderbird something like "look, I've got a bunch of body filters
> you obviously can't apply for all messages because I don't download
> them, but why don't you do this: when you download a message for me to
> read, run the body filters through it and save the result. Do this for
> every message I read so that later I can apply body filters to several
> Read messages *without* having to download them again" ?

That would be an enhancement request for the filtering mechanism. Only
thing to do is file the bug. I'm not even sure it is possible with
respect to how it is currently coded.


0 new messages