<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MesQuilla &#187; Extensions</title>
	<atom:link href="http://mesquilla.com/category/extensions/feed/" rel="self" type="application/rss+xml" />
	<link>http://mesquilla.com</link>
	<description>Messaging with Mozilla by rkent</description>
	<lastBuildDate>Wed, 21 Jul 2010 16:14:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Junk management for newsgroups in Thunderbird 3</title>
		<link>http://mesquilla.com/2010/07/21/junk-management-for-newsgroups-in-thunderbird-3/</link>
		<comments>http://mesquilla.com/2010/07/21/junk-management-for-newsgroups-in-thunderbird-3/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 16:14:13 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[JunQuilla]]></category>
		<category><![CDATA[Mailnews development]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=939</guid>
		<description><![CDATA[Thunderbird since version 3 has had experimental support for junk filtering in newsgroups. The feature basically works fine, but the user interface mostly fights against your attempts to use it. I&#8217;d like to give brief instructions here for anyone who wants to try it. You&#8217;ll need to install my addon JunQuilla to enable one critical [...]]]></description>
			<content:encoded><![CDATA[<p>Thunderbird since version 3 has had experimental support for junk filtering in newsgroups. The feature basically works fine, but the user interface mostly fights against your attempts to use it. I&#8217;d like to give brief instructions here for anyone who wants to try it.</p>
<p>You&#8217;ll need to install my addon <a href="https://addons.mozilla.org/en-US/thunderbird/addon/9886">JunQuilla</a> to enable one critical piece of user interface. JunQuilla supports a folder property that lets you selectively enable or disable junk processing for a tree of folders. So after you&#8217;ve installed JunQuilla, enable processing of junk for a newsgroup:</p>
<p style="text-align: center;"><a href="http://mesquilla.com/wp-content/uploads/2010/07/EnableJunk.jpg"><img class="aligncenter size-full wp-image-940" style="border: 0pt none;" title="Enable Junk" src="http://mesquilla.com/wp-content/uploads/2010/07/EnableJunk.jpg" alt="" width="624" height="379" /></a></p>
<p>This will run future posts sent to the newsgroup m.d.a.thunderbird through the bayes junk filter in Thunderbird. After this is enabled, some of the junk management controls on the folder should be enabled. Try &#8220;Run Junk Controls on Folder&#8221; to process existing posts for junk.</p>
<p>But nothing will appear to happen when you do, because there is no functionality to delete or hide the junk messages for newsgroups built in. Still, you can see the results using JunQuilla&#8217;s &#8220;junk percent&#8221; and &#8220;junk status +&#8221; columns:</p>
<p style="text-align: center;"><a href="http://mesquilla.com/wp-content/uploads/2010/07/JunkMessagesInNewsgoup.jpg"><img class="aligncenter size-full wp-image-943" style="border: 0pt none;" title="Junk Messages In Newsgoup" src="http://mesquilla.com/wp-content/uploads/2010/07/JunkMessagesInNewsgoup.jpg" alt="" width="566" height="346" /></a></p>
<p style="text-align: left;">The next step is to remove those junk messages from your view. The easiest thing to do is to create a virtual folder that shows the messages in the newsgroup without the junk messages. This is where the user interface fights against you. But you can trick it in the following manner.</p>
<p style="text-align: left;">Create a virtual folder on a message folder with search criteria &#8220;Junk Percent &lt; 80&#8243;. Save the folder as a subfolder of a local mail folder. Now open the virtual folder and change the folders that it scans, removing the original folder and replacing it with the newsgroup folder:</p>
<p style="text-align: left;"><a href="http://mesquilla.com/wp-content/uploads/2010/07/Change-Searched-Folder.jpg"><img class="aligncenter size-full wp-image-945" style="border: 0pt none;" title="Change Searched Folder" src="http://mesquilla.com/wp-content/uploads/2010/07/Change-Searched-Folder.jpg" alt="" width="614" height="576" /></a></p>
<p style="text-align: left;">Now the spam posts are hidden from this virtual folder:</p>
<p style="text-align: center;"><a href="http://mesquilla.com/wp-content/uploads/2010/07/View-without-Spam.jpg"><img class="aligncenter size-full wp-image-947" style="border: 0pt none;" title="View without Spam" src="http://mesquilla.com/wp-content/uploads/2010/07/View-without-Spam.jpg" alt="" width="637" height="437" /></a></p>
<p style="text-align: left;">You may need to specifically train the junk filter using a few junk and good messages in news. But the good news is that newsgroup spammers are not really optimizing against bayes filters, so it seems to be a lot easier to detect newsgroup spam than mail spam.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2010/07/21/junk-management-for-newsgroups-in-thunderbird-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript filter action in Thunderbird with FiltaQuilla</title>
		<link>http://mesquilla.com/2010/06/16/javascript-filter-action-in-thunderbird-with-filtaquilla/</link>
		<comments>http://mesquilla.com/2010/06/16/javascript-filter-action-in-thunderbird-with-filtaquilla/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 23:54:04 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[FiltaQuilla]]></category>
		<category><![CDATA[Planet Mozilla]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=875</guid>
		<description><![CDATA[I received an email today asking that I add a feature to FiltaQuilla. Slightly edited, the author said: Something I&#8217;ve found myself doing at work is creating a new filter for every folder I create. I work on technical cases and for each new case number I create a new folder and have all emails [...]]]></description>
			<content:encoded><![CDATA[<p>I received an email today asking that I add a feature to FiltaQuilla. Slightly edited, the author said:</p>
<p style="padding-left: 30px;"><em>Something I&#8217;ve found myself doing at work is creating a new filter for  every folder I create. I work on technical cases and for each new case  number I create a new folder and have all emails with that case number  go into that folder.  The crappy part about it is that I literally have  hundreds of cases I deal with, and hence hundreds of filters.  You&#8217;ve  already got the regex match criteria in filtaqulla, I&#8217;d love to be able  to take that match criteria and use whatever string it matches as the  destination folder action criteria. Sample subject line contains the following: 2010-0609-518<br />
</em></p>
<p>One of the features added to my extension FiltaQuilla recently is the ability to add custom javascript actions. I thought that I would give a shot at doing this request as a custom javascript action. The author of the email was expecting this to get linked to the regex search term, but that is not the easiest way to do it. It is easier to just let the filter action also do the regex search.</p>
<p>After installing FiltaQuilla, you need to enable the custom javascript action, which is done on the Addon options page. After that, you can add a javascript custom action in the filter editor.</p>
<p>Then you need to write the javascript code for the action. I&#8217;ve done similar work in the past, so that took me about an hour to get correct. Then insert the code into the action field for the javascript action, and it&#8217;s ready to go! You have to have some sort of search in the filter as well. You could just search for everything if you wanted, or you could add a regex search for the precise term if you want. It doesn&#8217;t matter much, as all of the work is really being done in the action. You just need to make sure that the action gets called for each message that might need to be moved. There&#8217;s more documentation of this feature available at the <a href="http://mesquilla.com/extensions/filtaquilla/">FiltaQuilla page</a> on this site.</p>
<p>The code I came up with is:</p>
<pre>let digitsRegex = /20\d\d\-[0-1]\d[0-3]\d\-\d\d\d/;
let acctmgr = Cc["@mozilla.org/messenger/account-manager;1"]
                .getService(Ci.nsIMsgAccountManager);
let copyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                    .getService(Ci.nsIMsgCopyService);
for (let index = 0; index &lt; msgHdrs.length; index++)
{
  let hdr = msgHdrs.queryElementAt(index, Ci.nsIMsgDBHdr);
  let theDigits = digitsRegex.exec(hdr.subject);
  let folders = acctmgr.allFolders;
  let length = folders.length;
  for (let i = 0; i &lt; length; i++) {
    let folder = folders.queryElementAt(i, Ci.nsIMsgFolder);
    if (folder.name == theDigits) {
      let messages = Cc["@mozilla.org/array;1"]
                       .createInstance(Ci.nsIMutableArray);
      messages.appendElement(hdr, false);
      copyService.CopyMessages(hdr.folder, messages, folder, true,
                               null, msgWindow, false);
    }
  }
}
</pre>
<p>With this filter, if you create a folder with a name like &#8220;2010-0616-001&#8243;, and your message has that in the subject, the message will get moved to that folder.</p>
<p>If you are having trouble getting it to work, an easy way to debug is just to insert statements like this into the javascript:</p>
<pre>Cu.reportError("I am here");
</pre>
<p>Those printouts will show up on the error console, so you should be able to see if your filter action code is working or not.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2010/06/16/javascript-filter-action-in-thunderbird-with-filtaquilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript custom filter action in new FiltaQuilla</title>
		<link>http://mesquilla.com/2010/05/20/javascript-custom-filter-action-in-new-filtaquilla/</link>
		<comments>http://mesquilla.com/2010/05/20/javascript-custom-filter-action-in-new-filtaquilla/#comments</comments>
		<pubDate>Thu, 20 May 2010 17:00:05 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[FiltaQuilla]]></category>
		<category><![CDATA[Planet Mozilla]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=788</guid>
		<description><![CDATA[I recently released a new version of FiltaQuilla for Thunderbird and SeaMonkey, and one of its cool new features is a custom filter action that runs arbitrary JavaScript. This relies on new backend features, so you&#8217;ll need TB 3.1 beta2 or later for this to work. Mitra recently pinged bug 249191 asking for a filter [...]]]></description>
			<content:encoded><![CDATA[<p>I recently released a new version of <a href="http://mesquilla.com/extensions/filtaquilla/">FiltaQuilla</a> for Thunderbird and SeaMonkey, and one of its cool new features is a custom filter action that runs arbitrary JavaScript. This relies on new backend features, so you&#8217;ll need <a href="ftp://ftp.mozilla.org/pub/thunderbird/releases/3.1b2">TB 3.1 beta2</a> or later for this to work.</p>
<p>Mitra recently pinged <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=249191">bug 249191</a> asking for a filter action that affects remote content. That looked like a good application of a javascript filter action, so I tried it out.</p>
<p>Looking at the underlying code in <a href="http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgContentPolicy.cpp">nsMsgContentPolicy.cpp</a>, there is a message header property &#8220;remoteContentPolicy&#8221; that can be used to enable showing of remote content for a message. Unfortunately disallowing content appears more complex, as the address book whitelisting appears to override the message header value. But really I think that allowing remote content on a per message basis is probably the more common action need, so let me demo that.</p>
<p>In my <a href="http://mesquilla.com/extensions/filtaquilla/">documentation for FiltaQuilla</a>, I show a simple basic javascript example of a custom action that affects a message header subject property:</p>
<pre>for (let index = 0; index &lt; msgHdrs.length; index++)
{
  let hdr = msgHdrs.queryElementAt(index, Ci.nsIMsgDBHdr);
  hdr.subject = "[Hello, world] " + hdr.subject;
}
</pre>
<p>It&#8217;s fairly easy to modify this to set the remoteContentPolicy instead. The result is:</p>
<pre>for (let index = 0; index &lt; msgHdrs.length; index++)
{
 let hdr = msgHdrs.queryElementAt(index, Ci.nsIMsgDBHdr);
 hdr.setUint32Property("remoteContentPolicy", 2);
}
</pre>
<p>So if you enter this as a JavaScript custom filter in JunQuilla, you can enable remote content on messages controlled by a filter.</p>
<p>I tested it on a spam message that had &#8220;Exxon&#8221; in the subject. The resulting filter, including the javascript, looks like this:</p>
<p style="text-align: center;"><a href="http://mesquilla.com/wp-content/uploads/2010/05/RemoteContentPolicy2.jpg"><img class="aligncenter size-full wp-image-793" title="Remote Content Policy Action" src="http://mesquilla.com/wp-content/uploads/2010/05/RemoteContentPolicy2.jpg" alt="" width="660" height="790" /></a></p>
<p>I&#8217;m sure that defining these filters is beyond the skill of all but a few advanced users, but once the code is written it&#8217;s pretty much just cut and paste to get this to work. If I collect a few more examples, I suppose I should create a webpage to show them.</p>
<p>Thanks to jcranmer, Standard8, and bienvenu on IRC channel #maildev for helping to point me to the base code that manages remote content policy.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2010/05/20/javascript-custom-filter-action-in-new-filtaquilla/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Combining Thunderbird with SpamAssassin</title>
		<link>http://mesquilla.com/2010/02/12/combining-thunderbird-with-spamassassin/</link>
		<comments>http://mesquilla.com/2010/02/12/combining-thunderbird-with-spamassassin/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 01:22:53 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[JunQuilla]]></category>
		<category><![CDATA[Mailnews development]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=607</guid>
		<description><![CDATA[For anyone who gets lots of spam mail, I typically recommend that their anti-spam management plan must consist of a multi-stage process. A common open source solution to that (and the one that I use personally) is a server-based SpamAssassin (SA) front end, followed by a client-based bayes filter, in this case the Thunderbird (TB) [...]]]></description>
			<content:encoded><![CDATA[<p>For anyone who gets lots of spam mail, I typically recommend that their anti-spam management plan must consist of a multi-stage process. A common open source solution to that (and the one that I use personally) is a server-based SpamAssassin (SA) front end, followed by a client-based bayes filter, in this case the Thunderbird (TB) default filter. Both filters are tuned to never give false positives, with Uncertain emails show in an Uncertain folder that I regularly watch.</p>
<p>In the Thunderbird 3.0 / SeaMonkey 2.0 series, I snuck in a little hidden preference to allow modifications to the way that the TB bayes filter does it tokenization. The main point of this was to allow better transfer of information between SA and TB. I&#8217;d like to describe here how to use that feature.</p>
<p>SA&#8217;s decision process involves two key steps. First, they evaluate the message with zillions of rules, and tag the message with each rule that the message hits. Second, they have a method of combining all of those tags into a final junk score for the message, which is used to decide whether to tag the overall message as spam.</p>
<p>SA&#8217;s rules include many tests that are not done by TB (score one point for SA). Yet when they take all of their rules and combine them together, in most cases they are using broad measures of goodness and spaminess that apply to some concept of a universal email. In contrast, TB&#8217;s bayes algorithm will precisely tune the junk analysis to the particular set of emails that a user gets. So if you are in the Viagra business, you can tune your local TB filter to accept those. (score one point for TB).</p>
<p>Wouldn&#8217;t it be great if you could combine together the superior rule set of SA, with the superior decision making customization of TB? That is the point of the hidden preference.</p>
<p>SA communicates its message tags to TB in the form of a custom header, X-SPAM-STATUS. A sample value of that from a spam message that I got is:</p>
<p id="line1">X-Spam-Status: No, score=4.9 required=5.0 tests=HTML_IMAGE_ONLY_16,<br />
HTML_IMAGE_RATIO_02,HTML_MESSAGE,HTML_SHORT_LINK_IMG_2,<br />
MIME_HTML_ONLY,	SPF_PASS shortcircuit=no autolearn=disabled version=3.2.5</p>
<p>This message was not marked as spam by SA, as it just barely missed the score=5.0 cutoff point, so arrives in TB as a suspicious but nevertheless good message. Yet there is lots of information about the tests that SA did in that header. TB should be able to take advantage of that information.</p>
<p>In the default TB configuration, the entire content of the X-Spam-Status header is treated as a single token. So TB will only respond to exact matches to that header. Yet those tests can appear in a variety of combinations, so that is not really taking advantage of the information effectively.</p>
<p>The answer provided in TB3 / SM2 is to provide a hidden preference that allows you to tell TB to break that particular header up into lots of separate tokens, and analyze each of those separately. That is documented in the code <a href="http://mxr.mozilla.org/comm-central/source/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp#371">here</a>. In the preference, you specify a particular header, and give a list of delimiters for that tokenization. So to process the x-spam-status header as individual tokens including both space and comma as delimiters, you add the preference:</p>
<pre style="padding-left: 30px;">mailnews.bayesian_spam_filter.tokenizeheader.x-spam-status
</pre>
<p>and assign it the string value &#8221; ,\t\n\r\f&#8221;</p>
<p>(That can be hard to set with all of those special characters in it). That includes space, comma, tab, line feed, carriage return, and form feed as delimiters.</p>
<p>You really can&#8217;t do this to an existing training corpus without getting strange results. So you must reset the training data and retrain after you do that.</p>
<p>As a sample, the tokens used by TB to process an email with my example x-spam-status is:</p>
<p><a href="http://mesquilla.com/wp-content/uploads/2010/02/JunkAnalysisDetail1.jpg"><img class="alignnone size-full wp-image-612" title="Junk Analysis Detail" src="http://mesquilla.com/wp-content/uploads/2010/02/JunkAnalysisDetail1.jpg" alt="" width="513" height="534" /></a></p>
<p>This image uses the &#8220;Junk Analysis Detail&#8221; report from my <a href="http://mesquilla.com/extensions/junquilla/">JunQuilla extension</a>.</p>
<p>Things to notice:</p>
<ol>
<li>The tokens that TB is using to analyze this email are mostly these x-spam-status tokens, as this is a mostly-image spam message with little text for TB to analyze. So the use of the SA tokens greatly enhances the power of TB&#8217;s internal filter.</li>
<li>The final score for this, 84, ended up with the message marked as junk for me. I run a cutoff of 75, while the default cutoff is 90.</li>
<li>Many of the x-spam-status tokens are actually working against us here. For example, x-spam-status:required=5.0 has a score of 23, which moves the message toward the &#8220;good&#8221; status. Yet that token appears on every single email I receive, so should be neutral. What is going on here?
<p>This is the issue that I reported in a previous post &#8220;<a href="http://mesquilla.com/2009/12/02/bad-effects-on-junk-training-corpus-from-change/">bad effects on junk training corpus from change</a>&#8221; That is, recently I have been automatically training more messages as Good than Junk. &#8220;x-spam-status:required=5.0&#8243; must not exist in my older emails for some reason, so this bias is appearing because 1) the token changed at some point in time, and 2) there is a mismatch in the number of junk and good emails being trained recently. I really need to figure out a solution to this. What I will probably do is to add features to FiltaQuilla to allow me to precisely match the training of junk and good to remove this bias.</li>
</ol>
<p>I still need to do some tests of this to directly compare the performance of the spam filters with and without the tokenization to be sure this is really a good idea. That is quite tricky to do unfortunately.</p>
<p>In spite of these issues, I would recommend to new installations that you use this alternate tokenization when you are using a Spam Assassin front-end to Thunderbird or SeaMonkey.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2010/02/12/combining-thunderbird-with-spamassassin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TaQuilla 0.3.0 released</title>
		<link>http://mesquilla.com/2009/12/22/taquilla-0-3-0-released/</link>
		<comments>http://mesquilla.com/2009/12/22/taquilla-0-3-0-released/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 19:15:30 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>
		<category><![CDATA[TaQuilla]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=569</guid>
		<description><![CDATA[I&#8217;ve just uploaded a new version of TaQuilla to Mozilla&#8217;s add-on site. You can download it here. It is still listed as experimental status, so updates are not automatic. Details of the changes in this revision are available here, but briefly it mostly adds some user interface consolidations for consistency, plus support for Thunderbird 3.0 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded a new version of <a href="http://mesquilla.com/extensions/taquilla/">TaQuilla</a> to Mozilla&#8217;s add-on site. You can download it <a href="https://addons.mozilla.org/en-US/thunderbird/addon/10905">here</a>. It is still listed as experimental status, so updates are not automatic. Details of the changes in this revision are available <a href="http://mesquilla.com/extensions/taquilla/taquilla-revisions/">here</a>, but briefly it mostly adds some user interface consolidations for consistency, plus support for Thunderbird 3.0 and SeaMonkey 2.0.</p>
<p>Frankly, I&#8217;ve struggled to find a good personal use of TaQuilla for use in my dogfooding. I&#8217;ve tried using it to <a href="http://mesquilla.com/2009/03/15/automatically-determining-interesting-rss-feed-posts/">categorize &#8220;interesting&#8221; posts</a>, but I can&#8217;t even agree myself from day-to-day what is &#8220;interesting&#8221;, and the soft tagging is even more indecisive. But I&#8217;ve finally hit on a good use for it in my workflow &#8211; rejecting of sports articles in newsfeeds!</p>
<p>I have an RSS feed that subscribes to local news for the &#8220;Seattle Times&#8221; newspaper, but I find a lot of the articles are sports related. Now I am a certified geek, and not really interested in those types of articles. So what I did is to create a tag &#8220;Sports&#8221;, then I setup TaQuilla soft tags for &#8220;Sports&#8221; on the RSS feed, create a virtual folder that filters out articles tagged with &#8220;Sports&#8221;, and voila I can read the newspaper feed without all of those annoying sports articles. It&#8217;s particularly useful since many of the same articles get updated multiple times, and the updates are very efficiently rejected with the bayes filter if I tag the original.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/12/22/taquilla-0-3-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FiltaQuilla 1.0.0 released, adds custom search terms</title>
		<link>http://mesquilla.com/2009/12/02/filtaquilla-1-0-0-released-adds-custom-search-terms/</link>
		<comments>http://mesquilla.com/2009/12/02/filtaquilla-1-0-0-released-adds-custom-search-terms/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 06:37:35 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[FiltaQuilla]]></category>
		<category><![CDATA[Planet Mozilla]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=512</guid>
		<description><![CDATA[Well I finally decided to quit adding new stuff, and just get a compatible FiltaQuilla out the door that works with Thunderbird 3.0 and SeaMonkey 2.0. You can get the new version from Mozilla&#8217;s download site here. In addition to some new filter actions (print, add sender to address list, and save attachments to a [...]]]></description>
			<content:encoded><![CDATA[<p>Well I finally decided to quit adding new stuff, and just get a compatible <a href="http://mesquilla.com/extensions/filtaquilla/">FiltaQuilla</a> out the door that works with Thunderbird 3.0 and SeaMonkey 2.0. You can get the new version from Mozilla&#8217;s download site <a href="https://addons.mozilla.org/en-US/thunderbird/addon/10052">here</a>.</p>
<p>In addition to some new filter actions (print, add sender to address list, and save attachments to a folder) this release introduces &#8220;custom search terms&#8221; for the first time. This is a new feature that has been added recently to the mailnews core code, and is part of the TB 3.0 and SM 2.0 releases.</p>
<p>The search I am talking about is the old-style Thunderbird search, not the newer global database (gloda) search that was added to Thunderbird. Gloda gets all of the press, but we&#8217;ve also taught the old style search a few tricks as well! These are particularly useful in saved searchs (also called virtual folders).</p>
<p>I think that the most interesting new capability is that you can define a search (and therefore a virtual folder) by adding a few lines of javascript code that does precisely what you want. Let me give a very simple example.</p>
<p>Let&#8217;s assume that you want a virtual  folder to contain all of the active items that you currently need to process involving projects. Incoming emails are marked with tags, either manually or by some sort of filter. You define new tags for each project, and each tag begins with &#8220;pro&#8221; and ends with some sort of project marker, say a number or word. You want to have your active folder contain messages that have a tag containing &#8220;pro&#8221;, but NOT include messages that are tagged &#8220;done&#8221;.</p>
<p>The standard mailnews tag search forces you to enter the tag name for each tag that you want. There is no way to search for tags by the characters in the tags. Plus, searching for several tags is an OR function, and saying to not include DONE messages is an AND function. But the standard mailnews search does not handle complex boolean searches.</p>
<p>The javascript custom search comes to the rescue! Go to the folder that contains the messages that you want, and select the Javascript search term:</p>
<p><img class="alignnone size-full wp-image-513" title="Search Javascript search term" src="http://mesquilla.com/wp-content/uploads/2009/12/SearchJavascript.jpg" alt="Search Javascript search term" width="577" height="194" /></p>
<p>Click on the script icon <img class="alignnone size-full wp-image-494" title="Script edit button" src="http://mesquilla.com/wp-content/uploads/2009/12/script_edit.png" alt="Script edit button" width="16" height="16" /> and you will get a small editor window, where you can enter a few lines of javascript. All that we need to do is grab the string that has the tags in it, and make sure it includes &#8220;pro&#8221; but does not include &#8220;done&#8221;. Our javacript is given a variable &#8220;message&#8221; which is the database header object that can be used to get message properties. We need to execute an expression as the last statement, whose value is either <strong>true</strong> if we want the message, or<strong> false </strong>if we do not. That&#8217;s just the following two lines of javascript:</p>
<pre style="padding-left: 30px;">let tags = message.getStringProperty('keywords');
(/pro/.test(tags) &amp;&amp; !(/done/.test(tags));</pre>
<p>So here&#8217;s what our javascript window and code looks like:</p>
<p><img class="alignnone size-full wp-image-514" title="Enter Javascript code" src="http://mesquilla.com/wp-content/uploads/2009/12/EnterJavascript.jpg" alt="Enter Javascript code" width="489" height="156" /></p>
<p>Now save this as a virtual folder, and you have the exact virtual folder that you want!</p>
<p>OK, this is just for geeks, but it is really powerful in letting you define folders that can precisely define the workflow that you want. There&#8217;s also a few other geek-friendly search terms, including the much-requested regular expression search by subject or other header. For details, see the updated <a href="http://mesquilla.com/extensions/filtaquilla/">FiltaQuilla page</a> on this site.</p>
<p>FiltaQuilla is still in experimental status, though I have now nominated it to be public. Still it may be a few weeks before it gets there. If you are an existing FiltaQuilla user, you will need to go to the <a href="https://addons.mozilla.org/en-US/thunderbird/addon/10052">download page</a> directly and download and install the new version.</p>
<p>Enjoy!</p>
<span class="sfforumlink"><a href="http://mesquilla.com/forum/filtaquilla/filtaquilla-1-0-0-released-adds-custom-search-terms/"><p><img src="http://mesquilla.com/wp-content/plugins/simple-forum/styles/icons/default/bloglink.png" alt="" /> Join the forum discussion on this post</p>
</a></span>]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/12/02/filtaquilla-1-0-0-released-adds-custom-search-terms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Extension driven development</title>
		<link>http://mesquilla.com/2009/11/28/extension-driven-development/</link>
		<comments>http://mesquilla.com/2009/11/28/extension-driven-development/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 07:37:49 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Mailnews development]]></category>
		<category><![CDATA[Planet Mozilla]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=479</guid>
		<description><![CDATA[What then do I mean by &#8220;extension driven development&#8221;? It is the concept of changing the way that Thunderbird is developed and distributed, with a bare minimum set of core code, and the main features presented as a set of extensions, shipped with the product,  that can be enabled or disabled by users. I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>What then do I mean by &#8220;extension driven development&#8221;? It is the concept of changing the way that Thunderbird is developed and distributed, with a bare minimum set of core code, and the main features presented as a set of extensions, shipped with the product,  that can be enabled or disabled by users.</p>
<p>I don&#8217;t have any illusions that this has a significant chance of being implemented, and I&#8217;m not even sure it&#8217;s a good idea myself. But I ask you to suspend disbelief for a minute, and imagine a change to the development culture and process.</p>
<p>An email client is different from a web client in many ways, but one significant way is that there is no real need for a fat uniform core product that developers can target (such as web developers for FireFox). So we are free to allow wide changes in our product configuration that would not make sense for FireFox. There is really no fundamental need for Thunderbird to be presented as a single, fat, feature-laden client.</p>
<p>Instead, ship Thunderbird as a minimal base with a collection of extensions. The extensions could be in a variety of statuses. At one status extreme, &#8220;Core&#8221; extensions would be enabled by default, would be fully localized, and their updates would be shipped with updates to the core product, rather than through AMO. Many existing core features would be converted into &#8220;Core&#8221; extensions that could be disabled if desired (for example bayes junk processing, or gloda.) At the other extreme, &#8220;Pilot&#8221; extensions would be shipped with the core product in a disabled state, would be updated by AMO, and not fully localized. There would also be &#8220;Standard&#8221; extensions that are shipped with the product, not maintained through AMO, but would not be enabled by default. Lightning might be one example of this. FiltaQuilla or JunQuilla could easily get added to this category in the future, or popular extensions like ThunderBrowse.</p>
<p>So why would you do such a crazy thing? For several reasons.</p>
<p>First, you would have a path to add features to the program that is not as generally disruptive as has been, for example, gloda or the new message header. By not using a new extension, an existing user would not see changes to their workflow that they did not want or appreciate. Also, new features need not delay the release of new versions of Thunderbird, as &#8220;Pilot&#8221; status extensions could be updated through AMO.</p>
<p>Second, new complex features like gloda, even though they are developed by the core team (well mostly asuth) are in a state of rapid flux, and would really benefit from allowing updates more frequently than even the accelerated release process will allow.</p>
<p>Third, you provide a natural path for outside developers to add contribution to the product without having to completely submerge themselves in the Mozilla culture, or give up complete control of their creation.</p>
<p>Fourth, this really recognizes that the use of an email client is highly personal. Basic users could be presented a basic email client. Advanced users could easily add advanced features. (Existing AMO-based extensions are also good for this, but the quality is not uniform, and they frequently are not kept up to date. And the standard product is still very fat with lots of features that are unneeded by most users.)</p>
<p>Fifth, this would solve the serious issue with Thunderbird of how hard it is for the average user to install addons (because the most popular and important addons would be shipped with the product).</p>
<p>There&#8217;s another dimension to this, and that is the developer&#8217;s relationship with his or her extension. I know that I feel a responsibility for my extensions that is beyond the responsibility I feel for any core code. You can see that in the documentation that I provide, and my reliability in responding to issues. I think that many other extension developers are like that as well. I&#8217;m guessing that they would be delighted to see a higher level of promotion of their work, without the need to cede complete control that incorporation in core might involve.</p>
<p>I suppose I could write a book on what this might look like, but for now let me leave it here.</p>
<p>rkent</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/11/28/extension-driven-development/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ToneQuilla version 1.0.1</title>
		<link>http://mesquilla.com/2009/11/28/tonequilla-version-1-0-1/</link>
		<comments>http://mesquilla.com/2009/11/28/tonequilla-version-1-0-1/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 05:00:50 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[ToneQuilla]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=473</guid>
		<description><![CDATA[ToneQuilla version 1.0.1 has been posted on AMO for review (or is available on this site here.) This fixes a bug reported in the forum, where for some users .wav files were playing in the default media player, instead of using Mozilla&#8217;s internal code.]]></description>
			<content:encoded><![CDATA[<p>ToneQuilla version 1.0.1 has been posted on AMO for review (or is available on this site <a href="http://mesquilla.com/prereleases/tonequilla.1.0.1.rc1.xpi">here</a>.) This fixes a bug <a href="http://mesquilla.com/forum/tonequilla/tone-quilla-1-0-0-starts-media-player/">reported in the forum</a>, where for some users .wav files were playing in the default media player, instead of using Mozilla&#8217;s internal code.</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/11/28/tonequilla-version-1-0-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maybe I need a search extension &#8211; SearchaQuilla?</title>
		<link>http://mesquilla.com/2009/11/20/maybe-i-need-a-search-extension-searchaquilla/</link>
		<comments>http://mesquilla.com/2009/11/20/maybe-i-need-a-search-extension-searchaquilla/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 19:13:12 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[FiltaQuilla]]></category>
		<category><![CDATA[Mailnews development]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=461</guid>
		<description><![CDATA[The last few weeks I&#8217;ve been adding custom search terms to my FiltaQuilla extension using the new nsIMsgSearchCustomTerm interface, which can then be used in searches, virtual folders, or filters. But I keep coming up with new things that I want to do. That delays my packaging of FiltaQuilla 1.0.0 for non-experimental release. Maybe I [...]]]></description>
			<content:encoded><![CDATA[<p>The last few weeks I&#8217;ve been adding custom search terms to my <a href="http://mesquilla.com/category/extensions/filtaquilla/"></a><a href="http://mesquilla.com/extensions/filtaquilla/">FiltaQuilla</a> extension using the new <a href="http://mxr.mozilla.org/comm-central/source/mailnews/base/search/public/nsIMsgSearchCustomTerm.idl">nsIMsgSearchCustomTerm</a> interface, which can then be used in searches, virtual folders, or filters. But I keep coming up with new things that I want to do. That delays my packaging of FiltaQuilla 1.0.0 for non-experimental release. Maybe I should quit adding this stuff to FiltaQuilla (which is already pretty large with all of its filter actions) and define a new search-oriented extension, called probably SearchaQuilla?</p>
<p>So far, I have added the following new search terms:</p>
<p><strong>BCC</strong> &#8211; locate items in the BCC field</p>
<p><strong>Subject Regex</strong> &#8211; search the subject using a javascript regular expression</p>
<p><strong>Header Regex</strong> &#8211; search any specific header using a javascript regular expression</p>
<p><strong>Javascript</strong> &#8211; load javascript in a text field, and program your own search given an nsIMsgDBHdr object</p>
<p><strong>Tag of Thread Head</strong> &#8211; match a tag in the head of a message&#8217;s thread</p>
<p><strong>Tag of Thread Messages</strong> &#8211; match a tag near the message in its thread (within +/- 10 messages by default)</p>
<p><strong>Address in Thread</strong> &#8211; match an address near the message in its thread (within +/- 10 messages by default)</p>
<p>This stuff can be useful outside of filters, in fact I am mostly using them personally to define virtual folders. So I&#8217;ll probably move them to a new extension, and try to get FiltaQuilla out the door finally.</p>
<p>rkent</p>
]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/11/20/maybe-i-need-a-search-extension-searchaquilla/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JunQuilla version 1.0.0 released</title>
		<link>http://mesquilla.com/2009/11/16/junquilla-version-1-0-0-released/</link>
		<comments>http://mesquilla.com/2009/11/16/junquilla-version-1-0-0-released/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 21:08:27 +0000</pubDate>
		<dc:creator>rkent</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[JunQuilla]]></category>
		<category><![CDATA[Planet Mozilla]]></category>
		<category><![CDATA[Planet MozillaMessaging]]></category>

		<guid isPermaLink="false">http://mesquilla.com/?p=452</guid>
		<description><![CDATA[Today I released a version of JunQuilla that supports SeaMonkey 2.0, and the latest versions of Thunderbird including the upcoming 3.0RC1 and 3.0.0 The new version can be downloaded from the AMO site here. I&#8217;ve also submitted this version for review so that it can get out of experimental status. JunQuilla is my attempt to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I released a version of <a href="http://mesquilla.com/extensions/junquilla/">JunQuilla</a> that supports SeaMonkey 2.0, and the latest versions of Thunderbird including the upcoming 3.0RC1 and 3.0.0 The new version can be downloaded from the AMO site <a href="https://addons.mozilla.org/en-US/thunderbird/addon/9886">here</a>. I&#8217;ve also submitted this version for review so that it can get out of experimental status.</p>
<p>JunQuilla is my attempt to extend the user interface in the Mozilla mailnews product to provide the information that I believe is needed to properly manage the bayesian junk filter. I suppose that most of these features should really be in the core product, but I found that support for that was not very strong, so I decided to do most of this in an extension instead. These backend features have only been added to the core code in the last couple of years, so this extension will only work on newer versions of the Mozilla email clients (Thunderbird 3.* versions, and SeaMonkey 2.* versions.)</p>
<p>Version 1.0.0 fixes some bugs that have been reported in previous releases, provides partial support for SeaMonkey (except for the &#8220;Uncertain&#8221; folders), and adds a number of new features:</p>
<h4>Junk Options</h4>
<p>You can set critical overall junk options in the standard junk options screen (previously, this was only possible in the more obscure addons/options area). In Thunderbird, select Tools/Options/Security/Junk. In SeaMonkey, select Edit/Preferences/Mail &amp; Newsgoups/JunQuilla. There you will see a display like this:</p>
<p><img class="aligncenter size-full wp-image-396" title="JunQuilla Options" src="http://mesquilla.com/wp-content/uploads/2009/11/JunQuillaOptions.jpg" alt="JunQuilla Options" width="389" height="97" /></p>
<p>&#8220;Junk threshold&#8221; is the percentage value as calculated by the bayes classifier for each message, above which a message will be classified as junk. This should be set as low as possible, though always high enough to avoid having any real messages classified as junk. The default value of 90 is much too high for a well-trained bayes classifier.</p>
<p>The &#8220;Maximum token count&#8221; is a measure of the resources that the junk classifier will use. The higher it is set, the more accurate your classifications will be. The default value of 100,000 is probably too low for good classification performance. I&#8217;ve had good results with 300,000 &#8211; and JunQuilla will set your value to this when first installed. If this value is too high, and you have trained a lot of messages, then memory usage may be excessive.</p>
<p>The other parameters are read only, and are displays of values from your training file. The &#8220;Current token count&#8221; shows how many junk training tokens (which are like words) are currently in use. You probably won&#8217;t get good performance until this number is over 10,000 &#8211; and it really should be more like 100,000.  &#8220;Good&#8221; and &#8220;Junk&#8221; messages trained shows how many messages have been used to train the junk filter. Ideally the number of junk and good messages should be more or less equal. If they are not, then pick some previously untrained messages and train them.</p>
<p>When the number of tokens exceeds the maximum value, then Mozilla mailnews will prune the training file in a large chunk, typically reducing both the number of trained messages, and the number of tokens, in about half.</p>
<h4>Disable/enable junk processing for a folder.</h4>
<p>You can set an &#8220;<a href="http://mesquilla.com/2009/11/06/inherited-folder-properties-revisited/">inherited folder property</a>&#8221; to allow you to selectively enable or disable junk processing for folders. This has two main uses.</p>
<ul>
<li>If you have server-side filters that process email in IMAP, then you may already know that certain folders contain either junk mail or good mail, and don&#8217;t want to waste time processing them locally &#8211; or take the risk that they will be processed incorrectly.</li>
</ul>
<ul>
<li>Mozilla mailnews core code now supports junk processing of RSS and News folders. You can select certain RSS or News folders, and then junk processing will run on new posts to those folders. This will also enable the standard user interface features that allow you to train messages as good or junk in those folders.</li>
</ul>
<p>To set this, right click on a folder in the folder tree, and select Properties, then the &#8220;General Information&#8221; tab. At the bottom, you will see this:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-400" title="JunQuilla Folder Properties" src="http://mesquilla.com/wp-content/uploads/2009/11/JunQuillaFolderProperties.jpg" alt="JunQuillaFolderProperties" width="189" height="114" /></p>
<p>&#8220;Analyze Junk&#8221; is an inherited folder property. What that means is that each folder can either gets its value from its parent, or can be set locally. The default value depends on the characteristics of the folder itself. So for example, this would be disabled in News by default, but enabled in IMAP. To change the value, first reset the &#8220;Inherit&#8221; checkbox, then set the value that you want in &#8220;Enabled&#8221;. If you change a value for a folder, then the value will also change for the children of that folder (assumming that they have the default &#8220;Inherit&#8221; checked.)</p>
<h4>Toolbar &#8220;Is Junk&#8221; and &#8220;Is Good&#8221; button</h4>
<p>You can add two new buttons to your toolbar &#8211; &#8220;Is Junk&#8221; and &#8220;Is Good&#8221;. Here&#8217;s what they look like, next to a standard &#8220;Junk/Not Junk&#8221; icon:</p>
<p><img class="aligncenter size-full wp-image-403" title="JunQuilla Is Good or Is Junk toolbar button" src="http://mesquilla.com/wp-content/uploads/2009/11/JunQuillaIsGoodOrJunk.jpg" alt="JunQuilla Is Good or Is Junk toolbar button" width="231" height="42" /></p>
<p>To add these buttons, right click on a toolbar, select &#8220;Customize&#8221;, then drag the buttons to the desired location.</p>
<p>The standard Junk button will always show as &#8220;Junk&#8221; when it thinks a message is good, and &#8220;Good&#8221; when it thinks that a message is junk. But that means that we can only classify a message as &#8220;Good&#8221; when it has been falsely classified as junk, and we <em>never</em> want our junk filter to do that. The &#8220;Is Good&#8221; button is meant to be used in the &#8220;Uncertain&#8221; folders to give you a means to train a message as &#8220;Good&#8221; there.</p>
<p style="padding-left: 30px;">
<span class="sfforumlink"><a href="http://mesquilla.com/forum/junquilla/junquilla-version-1-0-0-released/"><p><img src="http://mesquilla.com/wp-content/plugins/simple-forum/styles/icons/default/bloglink.png" alt="" /> Join the forum discussion on this post</p>
</a></span>]]></content:encoded>
			<wfw:commentRss>http://mesquilla.com/2009/11/16/junquilla-version-1-0-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
