Bug 3799 migrated from Mozdev.org
I would like to be able to search the text body of encrypted messages, using
mozilla/netscape's search functions. Right now, I must save each message into a
separate decrypted text file and search the directory where these are located.
I sometimes forget to decrypt some messages to these text files and therefore
lose the ability to search some messages. It would be much easier if I could
search in the mail program instead.
------- Comment #1 From Patrick Brunschwig 2003-05-23 11:49:14 [reply] -------
As could be seen on the mailing list, you're not the only one ...
------- Comment #2 From Fabián Rodríguez 2004-09-03 15:57:44 [reply] -------
Would this mean decrypting every message being searched ? I think this is out
the scope of Enigmail, unless it can plug itself in the search module of TB /
Mail&News. This could take a long time (either searching or changin the current
------- Comment #3 From Patrick Brunschwig 2004-09-07 03:01:54 [reply] -------
There is a major problem with searching encrypted messages (probably the reason
why it's not possible to search in encrypted S/MIME messages either):
On IMAP servers, searching is not done on the client, but on the server, i.e.
Mozilla issues a search command to the IMAP server which returns found messages.
But the IMAP server certainly knows nothing about GnuPG and it's very likely
that you can't (and don't want to) put your private key on the IMAP server. It's
the same with newsgroup messages, but they are normally not encrypted. So in
short, searching for messages on an IMAP server will not work!
Assuming that most organizations use IMAP, I think that fixing this bug would be
------- Comment #4 From Barry Porter 2004-09-07 03:25:25 [reply] -------
What about if the IMAP server folders are synchronised locally, and the search
is carried out against the local files? Would this be feasible?
------- Comment #5 From Patrick Brunschwig 2004-09-07 03:37:57 [reply] -------
In theory yes, but very likely only by hacking Mozilla. In general, the IMAP
implementation does not expose the fact that a folder (or actually a message) is
locally available or not. In any case, searching is always done on the server,
no matter if the message would be locally available. And furthermore, if
searching encrypted messages would not be included (transparently) in the normal
search dialog, it would be quite a useless functionality.
------- Comment #6 From Fabián Rodríguez 2004-09-07 16:31:38 [reply] -------
(pls. mark platform=all)
------- Comment #7 From Tom Braun 2004-09-07 18:01:07 [reply] -------
There are some good points raised here so far. However, we are not
talking so much about adding this to Enigmail (it truly would be out
of its scope), but to add this to Thunderbird (or the mail client in
general), since it obviously knows about registered plugins, which
need to be called upon to display a message. Where can I file a
bug for Thunderbird, for example?
Secondly, as far as IMAP is concerned, I might be wrong, but I think
that the assumption that most organizations are using IMAP is a bit
optimistic. So far, I have yet to work in an organization that uses
it. I think all we are asking for is that the search feature inside
of Thunderbird (where they are accessing the mbox file and look for
strings) is supporting decrypting when searching. That way, all the
POP users (there are many!) will be happy, and even the IMAP users
should be able to load the messages they want to search as a copy onto
their HD, should they not?
I understand that probably some indexing will not be possible, since
you would end up with secret information in the index files, and that
a search could take a longer time. Still, anything is better than
what we have right now.
------- Comment #8 From Barry Porter 2004-09-07 18:27:23 [reply] -------
What about adding the ability to send enigmail off in the background to decrypt
all messages in a folder and store them in a new mailbox file?
Setting a flag on a folder identifies that it should be handled by Enigmail so
that you can select which folders you wish to apply the task to.
The new mailbox file is not stored in the normal mail folders but in an
encrypted store using GPG to encrypt it using the OpenPGP Key password.
As new mail arrives in a folder, Enigmail decrypts it and adds it to the store.
If a message is deleted, it is also deleted from the encrypted store.
A search can then be performed on the data requiring only one password to be
Each message in the original mail folder would need to have an X-Enigmail-Store
type header added with a value that linked to the decrypted message, so that in
the search box you would open the original message rather than the one from the
There will be quite an overhead on slower machines, especially where a lot of
messages are being handled.
Feel free to shoot any/all of it down in flames... :-)
------- Comment #9 From email@example.com 2011-04-13 01:12:53 [reply] -------
The ability to search encrypted message bodies would be very useful.