<?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>Manitou-Mail Blog</title>
	<atom:link href="http://www.manitou-mail.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manitou-mail.org/blog</link>
	<description>on the use and development of the Manitou-Mail program</description>
	<lastBuildDate>Fri, 23 Jul 2010 00:17:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Version 1.0.0</title>
		<link>http://www.manitou-mail.org/blog/2010/07/version-1-0-0/</link>
		<comments>http://www.manitou-mail.org/blog/2010/07/version-1-0-0/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 00:17:42 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=129</guid>
		<description><![CDATA[<p>After 12 iterations of 0.9.X during 6 years, it&#8217;s time to bump to version 1.0.0&#8230;
The current HEAD of the SVN repository is pretty much what will be the 1.0 release that will appear in the download section in a few days.
Also, the new docbook documentation will be imported into the repository as well, as soon [...]]]></description>
			<content:encoded><![CDATA[<p>After 12 iterations of 0.9.X during 6 years, it&#8217;s time to bump to version 1.0.0&#8230;<br />
The current HEAD of the SVN repository is pretty much what will be the 1.0 release that will appear in the download section in a few days.<br />
Also, the new docbook documentation will be imported into the repository as well, as soon as I&#8217;ve reread it and figured out if the Makefile can be easily generated by autoconf or has to be shipped as is.<br />
In any case, 1.0.0 will be out next week!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2010/07/version-1-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Routing outgoing mail in manitou-mdx</title>
		<link>http://www.manitou-mail.org/blog/2009/10/routing-outgoing-mail-in-manitou-mdx/</link>
		<comments>http://www.manitou-mail.org/blog/2009/10/routing-outgoing-mail-in-manitou-mdx/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 21:25:14 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Usage]]></category>
		<category><![CDATA[manitou-mdx]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=111</guid>
		<description><![CDATA[<p>The default command invoked as the delivery agent for manitou-mdx is `sendmail -f $FROM$ -t` where $FROM$ is replaced by the sender&#8217;s email address,  which matches whats is called the sender&#8217;s identity in Manitou-Mail. On a typical Unix system, this command generally corresponds to the Mail Submission Agent that is installed and responsible for [...]]]></description>
			<content:encoded><![CDATA[<p>The default command invoked as the delivery agent for manitou-mdx is `<code>sendmail -f $FROM$ -t</code>` where $FROM$ is replaced by the sender&#8217;s email address,  which matches whats is called the sender&#8217;s identity in Manitou-Mail. On a typical Unix system, this command generally corresponds to the <a href="http://en.wikipedia.org/wiki/Mail_submission_agent">Mail Submission Agent</a> that is installed and responsible for routing the outgoing messages. The sendmail name doesn&#8217;t necessarily imply that the MSA is the <a href="http://www.sendmail.org">sendmail SMTP server</a> itself, it can be <a href="http://www.postfix.org">postfix</a>, or <a href="http://www.exim.org">exim</a>, or <a href="http://esmtp.sourceforge.net">esmtp</a>, or other programs that have adopted the same name and command line arguments for historical reasons and for the sake of interoperability.<br />
Anyway in manitou-mdx, if this default command is not suitable, the administrator can replace it either globally, or per sender&#8217;s identity. A sender&#8217;s identity is declared in manitou-mdx configuration file by simply declaring a mailbox with its email address. In the Manitou-Mail user interface, the sender&#8217;s identities are configured in the preferences and choosed in the composer.</p>
<p>A typical reason to use different delivery agents when using different identities is that messages may have to be routed to different SMTP servers with different authorization methods. For example, some servers will simply reject messages that have an unexpected From address.<br />
Also there are other cases such as messages from a GMail address that should be routed to a Google SMTP server in order to be signed with a proper <a href="http://www.dkim.org/">DomainKeys</a> header field.<br />
Indeed, while it&#8217;s not mandatory, some receivers may pre-sort as spam or reject messages from GMail addresses that are not signed as the Google SMTP servers do with a DomainKey signature (not trusing these messages being the point of DKIM). Let&#8217;s see how to route messages written in Manitou-Mail from a GMail address to Google SMTP servers.<br />
I&#8217;ve used <a href="http://msmtp.sourceforge.net">msmtp</a> for a simple, easy to configure Mail Submission Agent. <a href="http://esmtp.sourceforge.net/">esmtp </a>is also a candidate but its debian package makes it an alternative to postfix and I happen to want it to supplement postfix, not replace it. msmtp, on the other hand, is a supplementary package that doesn&#8217;t conflict with the default MSA.</p>
<p>The procedure to use msmtp is quite simple:<br />
Create a $HOME/.certs directory if none already exists.<br />
Create a $HOME/.msmtprc file (with perm 0600) containing:<br />
<code><br />
# gmail account<br />
auth on<br />
host smtp.gmail.com<br />
port 587<br />
user USERNAME@gmail.com<br />
password XXXXXX<br />
from USERNAME@gmail.com<br />
tls on<br />
tls_trust_file /home/daniel/.cert/ThawtePremiumServerCA.crt<br />
</code><br />
Obviously USERNAME is to be replaced by your GMail login.<br />
The cert file is to be extracted from the set of Thawte certificates available at: <a href="https://www.verisign.com/support/thawte-roots.zip">https://www.verisign.com/support/thawte-roots.zip</a>, with this command:<br />
<code><br />
unzip -p thawte-roots.zip 'Thawte SSLWeb Server Roots/thawte Premium Server CA/Thawte Premium Server CA.pem' &gt; ~/.certs/ThawtePremiumServerCA.crt<br />
</code></p>
<p>And in manitou-mdx&#8217;s configuration file, we have something like:<br />
<code><br />
[common]<br />
# various things<br />
[USERNAME@gmail.com]<br />
local_delivery_agent = msmtp -f $FROM$ -t<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/10/routing-outgoing-mail-in-manitou-mdx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Face header support</title>
		<link>http://www.manitou-mail.org/blog/2009/10/face-header-support/</link>
		<comments>http://www.manitou-mail.org/blog/2009/10/face-header-support/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 01:26:53 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[New features]]></category>
		<category><![CDATA[Usage]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=93</guid>
		<description><![CDATA[<p>While the X-Face header (48&#215;48 BW picture) has been supported for a long time in the Manitou-Mail user interface, the Face header (48&#215;48 color PNG) was not until yesterday.
Now it is, and while testing the code, I&#8217;ve found that it was another case where an SQL query quickly solved a practical selection problem. The Face [...]]]></description>
			<content:encoded><![CDATA[<p>While the <a href="http://en.wikipedia.org/wiki/X-Face">X-Face header</a> (48&#215;48 BW picture) has been supported for a long time in the Manitou-Mail user interface, the <a href="http://quimby.gnus.org/circus/face/">Face header</a> (48&#215;48 color PNG) was not until yesterday.<br />
Now it is, and while testing the code, I&#8217;ve found that it was another case where an SQL query quickly solved a practical selection problem. The Face header is indeed not so widely used, so getting a significant sample of different pictures to show is not obvious. Ideally I wanted to extract from my mail archive a gallery of pictures that would be all different. That is, if someone had posted 1000 messages with the same Face header, I wasn&#8217;t interested in getting all those messages, only one of them, let&#8217;s say the first by it&#8217;s ID, and I wanted the next mail in the list to be with a different, non-empty Face, and so on for every message that I wanted to look at. It turns out, that in SQL, it can be expressed with:</p>
<p><code>SELECT min(mail_id)<br />
 FROM header<br />
WHERE position(E'\nFace: ' in lines)&gt;0<br />
GROUP BY<br />
 split_part(substr(lines, position(E'\nFace: ' in lines)+7, 1300), E'\n', 1)<br />
</code><br />
position(&#8230;) let us know where the Face header field begins, substr(&#8230;) extracts a sufficient length of it, and split_part(&#8230;) cuts exactly the value at the first newline which marks the end of this header&#8217;s value (they&#8217;re unfolded in the header table precisely to be able to perform that kind of extraction).<br />
Finally the GROUP BY ensures that each row in the result represents a distinct value of the Face header.</p>
<p>This query can be directly input into the SQL statement field of the Query Selection dialog, after which all there is to do is wait for the database engine to run it to completion.</p>
<p>On my sample database of about 800,000 messages from various mailing lists, it turned out that the result was a list of 176 messages. Here is a collage of a selection of the pictures (public messages only).<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/10/face-gallery.png" alt="face-gallery" width="426" height="733" class="aligncenter size-full wp-image-94" /><br />
Here is how one particular message looks with its Face header:<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/10/face-sample-msg.png" alt="face-sample-msg" width="479" height="164" class="aligncenter size-full wp-image-101" /><br />
Right now this is just about displaying, sometime in the future I&#8217;ll try to add Face headers to outgoing mail, and also I&#8217;d like to associate pictures to sender addresses so that messages from people who don&#8217;t use a Face header (the majority) still can be shown with a dedicated picture. I feel like even tags or sender domains (which means companies and organizations), could benefit from that kind of visual representation in certain cases.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/10/face-header-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repackaged windows client available</title>
		<link>http://www.manitou-mail.org/blog/2009/10/repackaged-windows-client-available/</link>
		<comments>http://www.manitou-mail.org/blog/2009/10/repackaged-windows-client-available/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 12:11:18 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=88</guid>
		<description><![CDATA[<p>Since HTML viewing has been integrated, I&#8217;ve had reports that under Windows, the images in messages weren&#8217;t always displayed, but my attempts at reproducing the problem were unsuccessful.
I&#8217;ve recently understood that it was a packaging issue: on machines that don&#8217;t have Qt installed, image plugins must be distributed with the application (except for PNG that [...]]]></description>
			<content:encoded><![CDATA[<p>Since HTML viewing has been integrated, I&#8217;ve had reports that under Windows, the images in messages weren&#8217;t always displayed, but my attempts at reproducing the problem were unsuccessful.<br />
I&#8217;ve recently understood that it was a packaging issue: on machines that don&#8217;t have Qt installed, image plugins must be distributed with the application (except for PNG that is supported as built-in).</p>
<p>So I&#8217;ve repackaged Manitou-Mail 0.9.12 for Windows with the necessary plugins that get installed into an imageformats directory, and re-uploaded the installer:<br />
<a href="http://www.manitou-mail.org/Manitou-Installer-0_9_12.exe">Manitou-Installer-0_9_12.exe</a></p>
<p>For users who were concerned by this problem, I suggest they reinstall and report if it still doesn&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/10/repackaged-windows-client-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows developement environment, final part</title>
		<link>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-final-part/</link>
		<comments>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-final-part/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 14:15:50 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=72</guid>
		<description><![CDATA[<p>In part 1, we installed the build tools. In part 2, we built Qt and the PostgreSQL libraries from source. In this part, let&#8217;s see how to use these to finally build the Manitou-Mail user interface.</p>
<p>The starting point is the set of sources as fetched from the SF.net subversion repository. The latest version can be [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.manitou-mail.org/blog/2009/08/windows-developement-environment-part-1/">part 1</a>, we installed the build tools. In <a href="http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-part-2/">part 2</a>, we built Qt and the PostgreSQL libraries from source. In this part, let&#8217;s see how to use these to finally build the Manitou-Mail user interface.</p>
<p>The starting point is the set of sources as fetched from the SF.net subversion repository. The latest version can be checked out with for example, <a href="http://tortoisesvn.tigris.org/">Tortoise SVN</a>, as shown in this screenshot:</p>
<div id="attachment_75" class="wp-caption alignnone" style="width: 478px"><img class="size-full wp-image-75" src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/09/svn-checkout-tortoise.png" alt="Source checkout with Tortoise" width="468" height="361" /><p class="wp-caption-text">Source checkout with Tortoise</p></div>
<p>The difference between a source tarball and sources from the repository is mostly that the configure script and Makefile.in inside each directory are present in the tarball but not in the repository: these files are to be generated by autoconf and automake.</p>
<p>Here are the steps from the checkout of the source to getting the executable file:</p>
<ol>
<li>
<p>Make sure that Qt binaries are in the path:<br />
<code>export PATH=/c/Qt/4.5.2/bin:$PATH</code></li>
<li>
<p>Generate configure script and Makefile.in files:<br />
<code><br />
aclocal<br />
autoheader<br />
autoconf<br />
automake -a -c<br />
</code></li>
<li>
<p>Configure:<br />
<code><br />
./configure --with-pgsql-includes=/usr/local/pgsql/include  --with-pgsql-libs=/usr/local/pgsql/lib<br />
</code></li>
<li>Compile:<br />
<code><br />
make<br />
</code></li>
</ol>
<p>The compilation produces the final executable, manitou.exe, in the src/ directory. While it&#8217;s possible to run &#8216;make install&#8217; at this point as we would do in an Unix environment, personally I don&#8217;t use it. This is because I just want to package the executable along with libraries inside an installer that is targeted at Windows systems that generally don&#8217;t have MSYS with its Unix-like filiesystem layout.</p>
<p>To package the Manitou-Mail interface for Windows along with the required Qt, PostgreSQL and MingW libraries into a self-contained installer program, I currently use <a href="http://nsis.sourceforge.net">NSIS</a>. The  current <a href="http://www.manitou-mail.org/wiki/doku.php/nsis_script">NSIS script</a> is available on the wiki.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-final-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows developement environment, part 2</title>
		<link>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-part-2/</link>
		<comments>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-part-2/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 16:02:25 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=54</guid>
		<description><![CDATA[<p>In part 1, we installed the tools that are required to build from source.
This post shows how to use them to compile Qt and the PostgreSQL libraries we need.</p>
Qt-4.5.2
<p>Qt is huge and building it from scratch takes a long time, typically several hours on a current desktop machine. Using pre-compiled binaries as available on the [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.manitou-mail.org/blog/2009/08/windows-developement-environment-part-1/">part 1</a>, we installed the tools that are required to build from source.<br />
This post shows how to use them to compile <a href="http://www.qtsoftware.com">Qt</a> and the <a href="http://www.postgresql.org">PostgreSQL</a> libraries we need.</p>
<h1>Qt-4.5.2</h1>
<p>Qt is huge and building it from scratch takes a long time, typically several hours on a current desktop machine. Using pre-compiled binaries as available on the Qt site can be preferred, although it is only since quite recently (4.5.2?) that the pre-compiled version can be used to build manitou-mail (As I mentioned in <a href="http://lists.trolltech.com/qt-interest/2008-03/msg00158.html">this message to qt-interest</a>, there was a problem with the pre-compiled qmake that precluded its use with autotools scripts launched in MSYS. But this appears to have been fixed).<br />
If however a custom compilation is chosen, here are the steps to follow:</p>
<ol>
<li>Download Qt sources into c:\qt\4.5.2 or similar
<li>Open CMD.EXE and make sure g++ is in the PATH. Add it manually if necessary.
<li>Inside, c:\qt\4.5.2, run configure.exe -platform win32-g++.
<li>Run mingw32-make as told at the end of configure, and don&#8217;t expect the result before several hours <img src='http://www.manitou-mail.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</ol>
<p>Beware: contrary to the Unix way of installing from source, no make install is necessary nor possible with Qt/Windows : the build must happen directly inside the destination directory.</p>
<h1>PostgreSQL&#8217;s libpq</h1>
<ol>
<li>Grab postgresql source tar archive and untar it. I&#8217;ve used <a href="http://www.postgresql.org/ftp/source/v8.4.0/">version 8.4.0</a>, the latest available at the time of this post.
<li>If /mingw/include/libz.h doesn&#8217;t exist, grab and unpack the <a href="http://sourceforge.net/projects/mingw/files/MSYS%20zlib/zlib-1.2.3-1/zlib-1.2.3-1-msys-1.0.11-dev.tar.gz/download">zlib dev archive</a> in /mingw.
<li>cd into postgresql source directory and run ./configure
<li> cd into src/interfaces/libpq
<li> run make &amp;&amp; make install
</ol>
<p>Once this is done, the headers files to be found in /usr/local/pgsql/include and the libraries (.a and .dll) in /usr/local/pgsql/lib</p>
<h1>Conclusion of part 2</h1>
<p>Now that Qt and PostgreSQL are built, in the next and final part of this series we&#8217;ll compile the manitou-mail application itself for windows, with the toolchain that we installed in part 1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/09/windows-developement-environment-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows developement environment, part 1</title>
		<link>http://www.manitou-mail.org/blog/2009/08/windows-developement-environment-part-1/</link>
		<comments>http://www.manitou-mail.org/blog/2009/08/windows-developement-environment-part-1/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 11:09:21 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=23</guid>
		<description><![CDATA[<p>This is the first post (out of 3) about setting up a development environment to build the user interface of Manitou-Mail on Windows. In this part, we&#8217;re installing the compiler (GCC packaged by MinGW), the MSYS environment, and the autotools (autoconf and automake).
In the second part, we&#8217;ll build Qt itself and the PostgreSQL client libraries [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first post (out of 3) about setting up a development environment to build the user interface of Manitou-Mail on Windows. In this part, we&#8217;re installing the compiler (<a href="http://gcc.gnu.org/">GCC</a> packaged by <a href="http://www.mingw.org">MinGW</a>), the <a href="http://www.mingw.org/wiki/msys">MSYS </a>environment, and the <a href="http://en.wikipedia.org/wiki/GNU_build_system">autotools</a> (autoconf and automake).<br />
In the second part, we&#8217;ll build <a href="http://www.qtsoftware.com">Qt </a>itself and the <a href="http://www.postgresql.org">PostgreSQL </a>client libraries from source. In the third part, we&#8217;ll build manitou.exe from the sources off the <a href="http://sourceforge.net/scm/?type=svn&amp;group_id=107272">subversion repository</a>.</p>
<h1>MinGW (compiler) installation</h1>
<p>The current version is 5.1.4 is available here: <a href="http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/MinGW%205.1.4/MinGW-5.1.4.exe/download">MingW-5.1.4 installer on sourceforge.net</a>.<br />
Let&#8217;s run the installer and choose &#8220;Download and install&#8221;:<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w1.PNG" alt="MinGW install start" width="503" height="394" class="alignnone size-full wp-image-25" /></p>
<p>After accepting the license, we get to choose the destination directory. Let&#8217;s install into c:\mingw, the default choice.</p>
<p><img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w5.PNG" alt="MinGW destination directory" width="503" height="392" class="alignnone size-full wp-image-30" /></p>
<p>We want the &#8220;current&#8221; version:<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w2.PNG" alt="MinGW version&#39;s choice" width="504" height="394" class="alignnone size-full wp-image-27" /></p>
<p>The next screen is about choosing the components.<br />
We need to check the following ones:</p>
<ul>
<li>MinGW base tools
<li>g++ compiler
<li>MinGW Make
</ul>
<p><img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w3.PNG" alt="MinGW components" width="502" height="393" class="alignnone size-full wp-image-28" /></p>
<p>After that, a rapid succession of screens appear, that show the packages that are being downloaded and installed.<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w6.PNG" alt="MinGW packages getting installed" width="433" height="147" class="alignnone size-full wp-image-29" /></p>
<p>Then the install finished and we end up with a c:\mingw directory containing about 60MB of programs. It turns out that in my case, I&#8217;m also finding .tar.gz archives of the compiler packages on my desktop (from which I launched the installer), so let&#8217;s delete them.<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/w71.PNG" alt="Remaining files" width="88" height="458" class="alignnone size-full wp-image-32" /></p>
<h1>MSYS (shell environment) installation</h1>
<p>MSYS stands for minimal system. It&#8217;s a light unix-like environment with a shell and enough capabilities to support the <a href="http://en.wikipedia.org/wiki/GNU_build_system">autotools</a>.</p>
<p>Like MingW, MSYS has a base system and packages, except that it has a lot more packages. We need only a half-dozen of them.<br />
The current version of the MSYS base is available at:</p>
<p><a href="http://sourceforge.net/projects/mingw/files/MSYS%20Base%20System/Current%20Release_%20MSYS-1.0.11/MSYS-1.0.11.exe/download">MSYS-1.0.11 installer on sourceforge.net</a></p>
<p>Let&#8217;s select the default directory: c:\msys\1.0<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/m1.PNG" alt="MSys destination directory" width="502" height="391" class="alignnone size-full wp-image-34" /><br />
At the end of the installation, a post-installer script running in a CMD window &#8220;will try to normalize&#8221; with MingW, so we just accept what it suggests and type the path of our mingw directory as told (c:/mingw)<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/m3.PNG" alt="MSYS post-install" width="670" height="338" class="alignnone size-full wp-image-36" /></p>
<p>Once the installation is done, we have this icon on the desktop to launch an MSYS shell :<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/m4.PNG" alt="MSYS shortcut" width="50" height="69" class="alignnone size-full wp-image-37" /></p>
<h1>Autotools installation</h1>
<p>MSYS has an <a href="http://sourceforge.net/projects/mingw/files/MSYS%20Supplementary%20Tools/Current%20Release_%20msysDTK-1.0.1/msysDTK-1.0.1.exe/download">MSYS Developer Toolkit</a> in the form of a .EXE that installs automake, autoconf and the perl interpreter they depend on, but unfortunately their versions are too old for manitou&#8217;s configure script. It installs autoconf version 2.56 and automake 1.7.1 that date back from 2002, while we need at least autoconf version 2.60. Perl is version 5.6.1.</p>
<p>Still, let&#8217;s install that package, if just to have Perl, and upgrade separately automake and autoconf.</p>
<p>We install MSYS DTK into the recommended location<br />
<img src="http://www.manitou-mail.org/blog/wp-content/uploads/2009/08/m5.PNG" alt="MSYS Developer Toolkit install" width="499" height="389" class="alignnone size-full wp-image-38" /></p>
<p>Now, following the advice from the <a href="http://www.mingw.org/wiki/msys">MSYS wiki</a>, we get the source archives for autoconf and automake directly off the main GNU FTP server (so it&#8217;s the baseline, not modified versions for MSYS).<br />
The current sources are <a href="http://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.bz2">autoconf-2.64.tar.bz2</a> and <a href="http://ftp.gnu.org/gnu/automake/automake-1.11.tar.bz2">automake-1.11.tar.bz2</a>.</p>
<p>Let&#8217;s download these archives into c:/tmp/ and unpack them (all the subsequent commands are run inside the MSYS shell)</p>
<pre>
$ cd c:/tmp
$ tar xjf autoconf-2.64.tar.bz2
$ tar xjf automake-1.11.tar.bz2
</pre>
<p>The MSYS wiki says it&#8217;s important to compile into separate build directories so we do as told:</p>
<pre>
$ mkdir build-autoconf
$ cd build-autoconf
$ ../autoconf-2.64/configure --prefix=/mingw
$ make
$ make install
</pre>
<p>Same thing for automake:</p>
<pre>
$ mkdir build-automake
$ cd build-automake
$ ../automake-1.11/configure --prefix=/mingw
$ make
$ make install
</pre>
<p>Now that they&#8217;re both installed, <tt>autoconf --version</tt> displays:</p>
<pre>
$ autoconf --version
autoconf (GNU Autoconf) 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
</pre>
<p>And automake &#8211;version:</p>
<pre>
$ automake --version
automake (GNU automake) 1.11
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey
       and Alexandre Duret-Lutz .
</pre>
<h1>Conclusion of part 1</h1>
<p>With MinGW and MSYS, we have an environment that is good enough to build programs on Windows the same way that they are on unix (basically: configure &amp;&amp; make &amp;&amp; make install)<br />
With autotools we can regenerate the configure script and the Makefile.in files, which is something we need to add new source files to the project or modify the configure.in script.<br />
Also, we&#8217;re ready to compile Qt and a PostgreSQL client, which will be done in the next part.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/08/windows-developement-environment-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indexing HTML parts</title>
		<link>http://www.manitou-mail.org/blog/2009/08/indexing-html-parts/</link>
		<comments>http://www.manitou-mail.org/blog/2009/08/indexing-html-parts/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 13:12:44 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[manitou-mdx]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.manitou-mail.org/blog/?p=3</guid>
		<description><![CDATA[<p>While HTML integration is improving in Manitou-Mail, the current version (0.9.12) does not index the contents of HTML parts. This is generally not a problem because messages tend to carry a text version inside a multipart/alternative MIME construct, and that version gets indexed so that the message can still be retrieved by the words it [...]]]></description>
			<content:encoded><![CDATA[<p>While HTML integration is improving in Manitou-Mail, the current version (0.9.12) does not index the contents of HTML parts. This is generally not a problem because messages tend to carry a text version inside a multipart/alternative MIME construct, and that version gets indexed so that the message can still be retrieved by the words it contains. But still, some people send HTML-only messages, in which case we want to automatically extract the text from the HTML and pass it to the indexer.</p>
<p>It&#8217;s relatively easy to write a manitou-mdx Perl plugin that does just that, by using a CPAN module to do the HTML to text conversion: <a href="http://search.cpan.org/~sburke/HTML-Format-2.04/lib/HTML/FormatText.pm">HTML::FormatText</a></p>
<p>Apart from the usual <strong>init</strong> and <strong>process</strong> functions that are described in the <a href="http://www.manitou-mail.org/mdx/plugins-reference.html">mdx plugins reference</a>, we need to provide two functions: one that recursively descends the MIME tree to find the html parts, and another that extracts them to text and pass them to the indexer.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> index_contents <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$fh</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$ctxt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">=</span><span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$html</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$text</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">local</span> <span style="color: #0000ff;">$/</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$fh</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">getline</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">defined</span> <span style="color: #0000ff;">$html</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tree</span> <span style="color: #339933;">=</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">TreeBuilder</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$tree</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">parse_content</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$html</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$formatter</span> <span style="color: #339933;">=</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">FormatText</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span>leftmargin<span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> rightmargin<span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">78</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$text</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$formatter</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$tree</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">defined</span> <span style="color: #0000ff;">$text</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Manitou<span style="color: #339933;">::</span><span style="color: #006600;">Words</span><span style="color: #339933;">::</span><span style="color: #006600;">index_words</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ctxt</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'dbh'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$ctxt</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'mail_id'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">\$text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> process_parts <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$obj</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$ctxt</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">is_multipart</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$subobj</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">parts</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      process_parts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$subobj</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$ctxt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;"># recurse</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">effective_type</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$type</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;text/html&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$io</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$obj</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">bodyhandle</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">open</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;r&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      index_contents<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$io</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$ctxt</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #0000ff;">$io</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">close</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The full source code and download link are available on the <a href="http://www.manitou-mail.org/wiki/doku.php/plugins:html_indexer">wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.manitou-mail.org/blog/2009/08/indexing-html-parts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
