Open
Bug 11037
Opened 25 years ago
Updated 2 years ago
add Javascript filter actions (not criteria)
Categories
(MailNews Core :: Backend, enhancement)
MailNews Core
Backend
Tracking
(Not tracked)
NEW
People
(Reporter: sspitzer, Unassigned)
References
(Depends on 1 open bug, )
Details
(Whiteboard: [action to call a javascript code])
Attachments
(1 file)
(deleted),
patch
|
mscott
:
review-
mscott
:
superreview-
|
Details | Diff | Splinter Review |
allow javascript in the filter actions.
Reporter | ||
Updated•25 years ago
|
Summary: Javascript filters → [HELP WANTED] Javascript filters
Whiteboard: HELP WANTED
Reporter | ||
Updated•25 years ago
|
Target Milestone: M15
Reporter | ||
Comment 1•25 years ago
|
||
marking m15.
Comment 2•25 years ago
|
||
Bulk-resolving requests for enhancement as "later" to get them off the Seamonkey
bug tracking radar. Even though these bugs are not "open" in bugzilla, we
welcome fixes and improvements in these areas at any time. Mail/news RFEs
continue to be tracked on http://www.mozilla.org/mailnews/jobs.html
Comment 3•25 years ago
|
||
Reopen mail/news HELP WANTED bugs and reassign to nobody@mozilla.org
Reporter | ||
Comment 4•25 years ago
|
||
adding toshok to the cc list.
Reporter | ||
Comment 5•25 years ago
|
||
see http://devedge/docs/manuals/communicator/jsguide4/mail.htm for details.
unlike 4.x, in 5.0 the rules file is the same across all platforms: rules.dat
Comment 6•25 years ago
|
||
Could somebody fix that link? It's invalid.
Reporter | ||
Comment 7•25 years ago
|
||
both links
http://devedge/docs/manuals/communicator/jsguide4/mail.htm
http://www.mozilla.org/mailnews/jobs.html
work for me.
what link isn't working?
Comment 8•25 years ago
|
||
Found it. You didn't put ".netscape.com" so I futzed around with devedge.com,
.org, .net etc. I'm not entirely hip on all the Netscape lingo yet.
Reporter | ||
Comment 9•25 years ago
|
||
my fault. sorry about that.
http://devedge.netscape.com/docs/manuals/communicator/jsguide4/mail.htm
Updated•25 years ago
|
Keywords: helpwanted
Updated•25 years ago
|
Summary: [HELP WANTED] Javascript filters → Javascript filters
Whiteboard: HELP WANTED
Target Milestone: M15
Comment 10•22 years ago
|
||
JavaScript (with regular expressions) would be able to do amazing and powerful
things as a message filter. Simply pass an email message object to a function in
the script, with read-only members such as .Sender(), .From(), .CC(), .Subject(),
perhaps even .Source(), and then decide an action based on its return value.
Given all of the JavaScript-based cross-platform development going on anyway in
this project, JS filters would seem at least within the realm of possibility.
Comment 11•22 years ago
|
||
Comment 12•22 years ago
|
||
Is this bug 4xp?
Was that functionality present in Netscape Messenger 4?
Comment 13•22 years ago
|
||
Yes, the doc link in comment #11 refers to documentation for a feature that
shipped in 4.x.
/be
Keywords: 4xp
Comment 14•22 years ago
|
||
Bug 59341 is a dup of this one. Transfering deps. And check Bug 59341 comment
#9 for more dups of this bug.
Comment 15•21 years ago
|
||
Actually nsMsgFilter contains code to attach a script to filter action, and it
also saves it back (type="2" filters, I guess); but I don't understand where
that code is actually called upon message receiving not where the actual
filtering is done.
I suppose that file only contains "residual" type-2 message filers from
Netscape4 code?
Comment 16•21 years ago
|
||
Seems like there's been a long-standing typo here. Does nobody use News
filters?
Comment 17•21 years ago
|
||
This was as far as I wanted a mail filter.. Very useful but never worked.
Even more useful now with bounced virus in the thousands hitting my intray...
Updated•20 years ago
|
Product: MailNews → Core
Comment 18•20 years ago
|
||
*** Bug 59341 has been marked as a duplicate of this bug. ***
Comment 19•20 years ago
|
||
Updating summary. Adding status whiteboard.
We should discuss what access the script should have. Perhaps a security setting
on the level of access such a script could have, such as filesystem (useful for
writing emails to a log file) or chrome, or simply mailboxes.
Summary: Javascript filters → Javascript filter actions (not criteria)
Whiteboard: [action to call a javascript code]
Comment 20•19 years ago
|
||
*** Bug 330785 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
QA Contact: nobody → backend
Updated•19 years ago
|
Attachment #151438 -
Flags: review?
Updated•19 years ago
|
Attachment #151438 -
Flags: superreview?
Comment 21•19 years ago
|
||
Comment on attachment 151438 [details] [diff] [review]
Fix News filtertype definition
there's no code to apply javascript filters so I don't think this change by itself will do anything.
Updated•18 years ago
|
Attachment #151438 -
Flags: superreview?(mscott)
Attachment #151438 -
Flags: superreview?
Attachment #151438 -
Flags: review?(mscott)
Attachment #151438 -
Flags: review?
Comment 22•18 years ago
|
||
Comment on attachment 151438 [details] [diff] [review]
Fix News filtertype definition
I'm not sure why would want this code, it doesn't give us JS filter actions anyway.
Attachment #151438 -
Flags: superreview?(mscott)
Attachment #151438 -
Flags: superreview-
Attachment #151438 -
Flags: review?(mscott)
Attachment #151438 -
Flags: review-
Comment 23•18 years ago
|
||
I can imagine having a filter action "Execute Skript", with a editable combobox for its values. You could either enter the code for a function in the textbox or choose from a list of registered functions (passed in from the frontend by registering respective callback functions). The function would be called with relevant data, like msgHdr or message body.
Or what is this bug about?
Comment 24•18 years ago
|
||
I'm not sure of everyone else, but my interest is in filtering things that are "obvious" to me as a developer, but beyond the scope of simple =/!=/like filters.
E.g. If I could run a RegEx (via JavaScript) on the subject line of an email... whereby if it started or ended with 4+ digits, then I would like to, because for me, this is a sure fire indicator of Spam.
Likewise, the same ability on the body of the email, or the to: or the cc: list would be desired.
I would be ecstatic with a filter type called 'script',... that would pass a single param to a function that you (the end user) supply, that simply returns true/false; if true, the msg meets the filter criteria... if false, it doesn't...
So, for example:
/*
object msg
.headers
.body
*/
function mySpamFilter(msg){
if(msg.headers.Subject.length >= 50){
//likely spam...
return true;
} else if(msg.headers.Subject.indexOf(' wrote') != -1){
//spam-a-palooza
return true;
} else {
//AFAIK, ATM, not spam
return false;
}
}
It may seem strange... but the idea is very cool, for those of us that would have a good idea as to what to do with it.
Comment 25•18 years ago
|
||
JFTR:
URL of comment #11 as found in the WayBackMachine:
<http://web.archive.org/web/20021219010440/http://developer.netscape.com/docs/manuals/js/client/jsguide/mail.htm>
Comment 26•18 years ago
|
||
> I would be ecstatic with a filter type called 'script',... that would pass a
> single param to a function that you (the end user) supply, that simply returns
> true/false; if true, the msg meets the filter criteria... if false, it
> doesn't...
This is exactly what this bug is *not* about. ;-)
You're talking about <https://bugzilla.mozilla.org/show_bug.cgi?id=58407#c8>
Comment 27•18 years ago
|
||
@Karsten: I apologize then, I found this Bug#, when searching for the ability that was available in Netscape Comm. Mail 4.x.
And since 58407 is marked "verified invalid", I suppose this is still the place to be. ;-)
Comment 28•17 years ago
|
||
perhaps this could be complimentary to bug 19442
Assignee | ||
Updated•16 years ago
|
Product: Core → MailNews Core
Comment 29•14 years ago
|
||
Wayne suggested that a comment here might be appropriate for watchers:
In TB 3.0 / SM 2.0 a new feature was added to allow arbitrary custom filter actions to be added by extensions. In my extension FiltaQuilla, one of the added filter actions is an arbitrary javascript filter action (javascript search is also available there).
That does not directly affect the status of this bug, which remains a request to add this function in core. However, given its availability in an extension, and its fairly rare use there, the functionality of this bug is not likely to be added to core.
Updated•14 years ago
|
Severity: normal → enhancement
Priority: P3 → --
Summary: Javascript filter actions (not criteria) → add Javascript filter actions (not criteria)
Comment 30•14 years ago
|
||
If someone has a patch and wants help with it then helpwanted is appropriate. That's not currently true afaict. Nix "helpwanted".
Keywords: helpwanted
Updated•4 years ago
|
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•