It does not work because the filters (and the current version of FiltaQuilla) only see the text representation of the HTML code when filtering, if any, because for some folders (offline IMAP folders) they only see the message headers.
I really don't know why default filters in Thunderbird don't allow users to filter the raw body, I guess it's because nobody has requested it. Also, I don't know why sophisticated plugins like FiltaQuilla don't provide raw body access out-of-the-box,. Again, maybe is lack of user's interest.
So, I can tell you how to do it with FiltaQuilla but your are not gonna like it. It's messy, hackish, slow, fragile and not user-friendly at all. But it's possible. It works on my computer. It should works in yours. Unless, of course, Thunderbird crashes and corrupts your mailbox (as it happened once here while I was testing this, it never worked again in that folder). Surprisingly it worked flawlessly with my IMAP folders. So think of this like an experiment, not a final solution.
If you already have FiltaQuilla, enable Javascript in the Search Term tab in the Preferences window (restart Thunderbird).
Now create a filter as usual, in the what-to-search list look for Javascript. In the next list choose Matches. There will be an edit icon, select it and insert the following code (Note: this code is based on some tests included with the source code of Thunderbird):
let mylist = ["emv3.com", "_blank", "tumblr.com", "xxxx"];
var matchfound = -1;
const MAX_MESSAGE_LENGTH = 10240;
let msgFolder = message.folder;
let msgUri = msgFolder.getUriForMsg(message);
let messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
let streamListener = Cc["@mozilla.org/network/sync-stream-listener;1"].createInstance(Ci.nsISyncStreamListener);
messenger.messageServiceFromURI(msgUri).streamMessage(msgUri, streamListener, null, null, false, "", false);
let sis = Cc["@mozilla.org/scriptableinputstream;1"].createInstance(Ci.nsIScriptableInputStream);
sis.init(streamListener.inputStream);
let rawbody = sis.read(MAX_MESSAGE_LENGTH);
for (let listidx = 0; listidx < mylist.length; listidx++) {
//Components.utils.reportError("Checking " + mylist[listidx] + " in " + message.subject);
matchfound = rawbody.search(mylist[listidx]);
if (matchfound>0) {
Components.utils.reportError("Matched " + matchfound + " " + mylist[listidx] + " in " + message.subject);
break;
}
}
(matchfound>0)
Do you see the "let mylist =" line? That's a Javascript array. You can fill it with text strings to search. Do you see the MAX_MESSAGE_LENGTH=10240? that's how far from the start of the message this code will search. Usually 10K is enough as spam message larger that that include images or other attachments.
Close the edit window with OK.
Define your actions (move, delete, flag, etc.).
Try to run it.
If you have enabled the debug console in Thunderbird, you can see a list of matches there (this is not the normal filter log).
A final note, this script does not decode Base64 (or any other) encoding. A message Base64-encoded will not match anything.
Other note, while briefly browsing the Thunderbird source code, I think the Bayesian filter has access to the raw message body, however I don't know if that means anything to you.
So, for a better answer, your options are:
- Write a plugin yourself.
- Ask a plugin author to add support for raw body access (the FiltaQuilla author seems like a nice person, you may ask in the FiltaQuilla forums).
Have you turned on the Spam filter in Thunderbird? – avirk – 2012-06-26T18:14:31.263
Read this KB Article may be help you.
– avirk – 2012-06-26T18:21:04.080Are you using an imap account? – Ahmed Bilfaqih – 2012-06-27T06:48:53.803
Remember that some (most?) spam emails use an image to display their crap, bypassing filters which use text to determine badness. Or they may use %48%45%58 (HEX) codes to obfuscate the contents too. Many many ways to get around filters. – lornix – 2012-06-28T03:55:12.777
1Can you save one of theses messages and post it for us ? – harrymc – 2012-06-29T18:18:36.533