<?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>desgrange.net &#187; debian</title>
	<atom:link href="http://blog.desgrange.net/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.desgrange.net</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 21:00:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Don&#8217;t upgrade specific packages</title>
		<link>http://blog.desgrange.net/2012/01/09/dont-upgrade-specific-packages/</link>
		<comments>http://blog.desgrange.net/2012/01/09/dont-upgrade-specific-packages/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 21:00:41 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1796</guid>
		<description><![CDATA[From time to time I don&#8217;t want to upgrade some packages on my debian server (because there is a bug with the new version or some other reasons) but I still want to do the other updates. Apt is able to handle that but it&#8217;s not really easy to do (and to remember). There is [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I don&#8217;t want to upgrade some packages on my <a href="http://www.debian.org" onclick="pageTracker._trackPageview('/outgoing/www.debian.org?referer=');">debian</a> server (because there is a bug with the new version or some other reasons) but I still want to do the other updates.</p>
<p>Apt is able to handle that but it&#8217;s not really easy to do (and to remember). There is a utility called <a href="http://www.togaware.com/wajig/" onclick="pageTracker._trackPageview('/outgoing/www.togaware.com/wajig/?referer=');">wajig</a> that simplify that a lot (wajig aim is to do all the package handling stuff simpler than apt and dpkg).</p>
<p>Install wajig as usual:</p>
<blockquote><div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> wajig</pre></div></div></blockquote>
<p>And here is how to use it for holding a package, unholding it or list all packages that are on hold:</p>
<blockquote><div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">$ <span class="kw2">sudo</span> wajig hold
$ <span class="kw2">sudo</span> wajig unhold
$ <span class="kw2">sudo</span> wajig list-hold</pre></div></div></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2012/01/09/dont-upgrade-specific-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restore grub</title>
		<link>http://blog.desgrange.net/2010/11/15/restore-grub/</link>
		<comments>http://blog.desgrange.net/2010/11/15/restore-grub/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 21:00:49 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1250</guid>
		<description><![CDATA[My server was installed a long time ago and it seems that the partitions were created in a way that grub does not like. And when grub does not like something you have good chances of having a computer not booting. Since I have the problem from time to time, let&#8217;s write a reminder on [...]]]></description>
			<content:encoded><![CDATA[<p>My server was installed a long time ago and it seems that the partitions were created in a way that <a href="http://en.wikipedia.org/wiki/GNU_GRUB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNU_GRUB?referer=');">grub</a> does not like. And when <a href="http://www.gnu.org/software/grub/" onclick="pageTracker._trackPageview('/outgoing/www.gnu.org/software/grub/?referer=');">grub</a> does not like something you have good chances of having a computer not booting.</p>
<p>Since I have the problem from time to time, let&#8217;s write a reminder on how to fix this.</p>
<p>Sometime there are grub updates, and on the next reboot, well, nothing happens. Hopefully, my hosting provider provides an option to boot my server on a <a href="http://en.wikipedia.org/wiki/Ubuntu_(operating_system)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ubuntu_operating_system?referer=');">Ubuntu</a> <a href="http://en.wikipedia.org/wiki/Live_CD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Live_CD?referer=');">live CD</a> (my server is running <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> but that&#8217;s fine).</p>
<p>When <a href="http://www.ubuntu.com/" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu</a> has finished booting, I can ssh on it and list my hard drive partitions:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># fdisk -l /dev/sda
(…)
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          12       96389+  83  Linux
/dev/sda2              13       19324   155123640   83  Linux
/dev/sda3           19325       19454     1044225   83  Linux</pre></div></div>
<p>Here sda1 is my boot partition, sda2 is my root partition ans sda3 is swap. Let&#8217;s mount that:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># mount /dev/sda2 /mnt
# mount /dev/sda1 /mnt/boot</pre></div></div>
<p>Now we have to change the &#8220;root&#8221; directory from the live CD to my server&#8217;s disk so we can simulate being running on my server&#8217;s disk:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># chroot /mnt</pre></div></div>
<p>And now we can reinstall grub:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"># grub-install /dev/sda</pre></div></div>
<p>In my case I have to give the <code>--force</code> option to install grub. That&#8217;s all, I can now restart my <a href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a> server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/11/15/restore-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTunes 10, Firefly, forked-daapd</title>
		<link>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/</link>
		<comments>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 20:00:29 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[daap]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[forked-daapd]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1220</guid>
		<description><![CDATA[Apple recently introduced the new version of iTunes: iTunes 10. For those, like me, who are using Firefly to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore . The bad news is that a lot of commercial products are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a> recently introduced the new version of <a href="http://en.wikipedia.org/wiki/ITunes" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes?referer=');">iTunes</a>: iTunes 10. For those, <a href="/2009/03/01/using-a-linux-server-for-your-mac/">like me</a>, who are using <a href="http://www.fireflymediaserver.org/" onclick="pageTracker._trackPageview('/outgoing/www.fireflymediaserver.org/?referer=');">Firefly</a> to broadcast their music on their local network, you may have seen that iTunes 10 does not show the content of your remote playlist anymore <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . The bad news is that a lot of commercial products are using it (especially <a href="http://en.wikipedia.org/wiki/Network-attached_storage" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Network-attached_storage?referer=');">NAS</a> devices like <a href="http://www.drobo.com/" onclick="pageTracker._trackPageview('/outgoing/www.drobo.com/?referer=');">Drobo</a>…).</p>
<p>Someone started a thread about that on Apple&#8217;s forum: <a href="http://discussions.apple.com/thread.jspa?threadID=2564925" onclick="pageTracker._trackPageview('/outgoing/discussions.apple.com/thread.jspa?threadID=2564925&amp;referer=');">http://discussions.apple.com/thread.jspa?threadID=2564925</a></p>
<p>One guy says to have a look to <a href="http://github.com/jasonmc/forked-daapd" onclick="pageTracker._trackPageview('/outgoing/github.com/jasonmc/forked-daapd?referer=');">forked-daapd</a> which is a full rewriting of Firefly. So I did. On my <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> box, <a href="http://packages.debian.org/testing/forked-daapd" onclick="pageTracker._trackPageview('/outgoing/packages.debian.org/testing/forked-daapd?referer=');">a package is available in &#8220;testing&#8221;</a>:</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install forked-daapd</pre></div></div>
<p>Change the directory where the music is in /etc/forked-daapd.conf, restart and that&#8217;s all. Then go to iTunes, the shared library should be visible and filled with your music!</p>
<p>Since Firefly is a dead project (no activity for a while), everybody using it should migrate to forked-daapd.</p>
<p>Note: this is my 100th post on this blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/09/02/itunes-10-firefly-forked-daapd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to WordPress</title>
		<link>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/</link>
		<comments>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/#comments</comments>
		<pubDate>Mon, 03 May 2010 20:00:45 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dotclear]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=1075</guid>
		<description><![CDATA[I started blogging a long time ago using COREBlog on Plone on Zope (if I remember right), then I moved on dotclear 1 with some friends, then I opened my own blog again using dotclear 2… and now I&#8217;m using WordPress. Why moving from dotclear to WordPress? First of all, my linux server moved to [...]]]></description>
			<content:encoded><![CDATA[<p>I started blogging a long time ago using <a href="http://coreblog.org/" onclick="pageTracker._trackPageview('/outgoing/coreblog.org/?referer=');">COREBlog</a> on <a href="http://plone.org/" onclick="pageTracker._trackPageview('/outgoing/plone.org/?referer=');">Plone</a> on <a href="http://www.zope.org/" onclick="pageTracker._trackPageview('/outgoing/www.zope.org/?referer=');">Zope</a> (if I remember right), then I moved on <a href="http://dotclear.org/" onclick="pageTracker._trackPageview('/outgoing/dotclear.org/?referer=');">dotclear</a> 1 with some friends, then I opened my own blog again using dotclear 2… and now I&#8217;m using <a href="http://wordpress.org/" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/?referer=');">WordPress</a>.</p>
<p>Why moving from <a href="http://en.wikipedia.org/wiki/Dotclear" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Dotclear?referer=');">dotclear</a> to <a href="http://en.wikipedia.org/wiki/WordPress" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/WordPress?referer=');">WordPress</a>? First of all, my <a href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">linux</a> server moved to <a href="http://en.wikipedia.org/wiki/PHP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PHP?referer=');">PHP</a> 5.3… with is not supported by dotclear yet. So I had to install an alpha version of dotclear that supported it… kind of. It was a true <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Software_release_life_cycle_Alpha?referer=');">alpha version</a> (meaning lots of stuff were not working anymore, if you used to navigate on my blog you may have noticed that). And I feel a bit like dotclear is on the dying side (maybe it&#8217;s not true, but that&#8217;s my feeling). I don&#8217;t know if it&#8217;s related by the departure of the creator of dotclear (<a href="http://neokraft.net/" onclick="pageTracker._trackPageview('/outgoing/neokraft.net/?referer=');">Olivier Meunier</a>) last year, maybe they are adjusting from that change, but in the mean time, dotclear is not moving fast enough and I had to do something about getting my blog working.</p>
<p>I know, since I&#8217;m a developer, I could have helped dotclear guys supporting PHP 5.3, by fixing some bugs… I don&#8217;t remember PHP a lot but it&#8217;s a quite simple language, I should have been able to help quite quickly I think. But I&#8217;m also lazy and I did wanted to try WordPress since some people recommended it to me.</p>
<p>So, this is my first post written with WordPress, and it&#8217;s quite nice, the interface is quite good but I have to admit that it&#8217;s far from being perfect too.</p>
<h2>Installation</h2>
<p>As usual I used the <a href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">debian</a> package, which is already an improvement over dotclear since there is no dotclear debian package. On the downside, I encountered several bugs that seems to stupid to be there. And looking on the internet, they are known bugs, but not fixed. For instance:</p>
<ul>
<li>You can&#8217;t specify an absolute path for your upload folder (which is what is done by default by the debian package… so uploading anything was not possible until I changed the path)</li>
<li>When you try to install a theme or a plugin using the admin interface, WordPress checks if it&#8217;s authorized to write files first, if not WordPress allows you to upload it through FTP. That&#8217;s nice except that the script checking authorization is bugged (and that FTP is a protocol that should died but that&#8217;s an other story <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). The script checks that the user executing it is the owner of… the script file! instead of checking that it&#8217;s the owner of the theme/plugin directory. Since they do the things right in debian, the script is owned by root but executed by www-data (apache&#8217;s user). So I had to change the owner of the script to make it work.</li>
</ul>
<h2>Migration</h2>
<p>In WordPress tools, there is a script to import data from dotclear… which does not really work. Maybe it was done for dotclear 1, or my alpha version did have a lot of changes but obviously there was a lot of differences between what the import script was excepted and what my dotclear database looked like. I customized it a bit so it was able to import my posts and comments but I had some encoding issues (mostly solved), and of course I had to upload again all the pictures, audio files and videos… It took me several evenings to do the migration. Maybe I should have done it all by myself without using the original script.</p>
<p>After the import, the comment count was not set on the blog posts and I saw that other people had the problem (comment count not matching the actual number of comments) at some point for a reason or an other and the solution I saw was usually a small PHP script looping on each post and executing the same <a href="http://en.wikipedia.org/wiki/SQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SQL?referer=');">SQL</a> query. So here is the same solution but with only one SQL query, no PHP involved:</p>
<div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="sql" style="font-family:monospace;"><span class="kw1">UPDATE</span> wp_posts <span class="kw1">SET</span> comment_count <span class="sy0">=</span> <span class="br0">&#40;</span><span class="kw1">SELECT</span> count<span class="br0">&#40;</span><span class="sy0">*</span><span class="br0">&#41;</span> <span class="kw1">FROM</span> wp_comments <span class="kw1">WHERE</span> wp_comments<span class="sy0">.</span>comment_post_id <span class="sy0">=</span> wp_posts<span class="sy0">.</span>id<span class="br0">&#41;</span>;</pre></div></div>
<h2>Usage</h2>
<p>I just started using it. For the people reading my blog from the <a href="http://en.wikipedia.org/wiki/RSS" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RSS?referer=');">RSS</a> feed, check out the new <a href="http://en.wikipedia.org/wiki/URL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/URL?referer=');">URL</a>. On the overall it looks quite simple, but there are some stuff I don&#8217;t really like. For instance I have to use categories. So I put everything in the &#8220;Uncategorized&#8221; category. On dotclear I was able to say that I don&#8217;t want to use categories. Tags are way much better than categories… and they are optional.</p>
<p>The visual editor is quite good but the <a href="http://en.wikipedia.org/wiki/HTML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML?referer=');">HTML</a> editor is a &#8220;simple HTML&#8221; editor, not showing the full HTML, and switching from one editor to the other change the HTML code you may have write, and sometimes you don&#8217;t want to. For instance putting <code>audio</code> and <code>video</code> tags (<a href="http://en.wikipedia.org/wiki/HTML5" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTML5?referer=');">HTML 5</a> tags) in an <a href="http://en.wikipedia.org/wiki/XHTML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XHTML?referer=');">XHTML</a> 1 page… is not really allowed, and switching from the HTML editor to the Visual editor simply remove them <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> . There is no <a href="http://en.wikipedia.org/wiki/Wiki_markup" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Wiki_markup?referer=');">wiki syntax</a>, I can understand that choice but I was a bit used to it.</p>
<p>The plugin and theme system work quite well (except for the bug I talked about earlier). For the theme I chose <a href="http://wordpress.org/extend/themes/garland-revisited" onclick="pageTracker._trackPageview('/outgoing/wordpress.org/extend/themes/garland-revisited?referer=');">Garland-revisited</a>, which is a copy of <a href="http://en.wikipedia.org/wiki/Drupal" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Drupal?referer=');">Drupal</a>&#8216;s default theme (I used <a href="http://drupal.org/" onclick="pageTracker._trackPageview('/outgoing/drupal.org/?referer=');">Drupal</a> once and I had to customized the theme for the website but I love their Garland theme, so here is a way to have it <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>I also like the idea of having fixed pages. And I should start by filling the &#8220;about&#8221; page. That&#8217;s all for today, I still have a lot of stuff to configure.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/05/03/moving-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Losing 2 disks on a RAID-5 array</title>
		<link>http://blog.desgrange.net/2010/01/25/losing-2-disks-on-a-raid-5-array/</link>
		<comments>http://blog.desgrange.net/2010/01/25/losing-2-disks-on-a-raid-5-array/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=701</guid>
		<description><![CDATA[Today I was quite disappointed when I saw that my RAID-5 array had suddenly lost 2 out of 4 drives. As you may know, losing 1 drive on RAID-5 is OK, losing 2 is not ok at all, it usually means that you have lost all your data. In fact, my failure today was due [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was quite disappointed when I saw that my RAID-5 array had suddenly lost 2 out of 4 drives. As you may know, losing 1 drive on RAID-5 is OK, losing 2 is not ok at all, it usually means that you have lost all your data.</p>
<p>In fact, my failure today was due to some electrical problems. If you are following this blog you know that my RAID drives are plugged to the server (Debian GNU/Linux) using USB, which is an extremely bad idea (don’t do that at home <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ). And to add more on my stupidity, in order to reduce power consumption I changed my hard drives to laptop hard drives and have them powered through the USB hub… which was not plugged to the <a hreflang="en" href="http://en.wikipedia.org/wiki/Uninterruptible_power_supply" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Uninterruptible_power_supply?referer=');">UPS</a>. So today there was a power failure at home and since the server’s USB was not providing enough power, two drives went off.</p>
<p>Since nothing was being written when it occurred, I know that the content on every drive was still good, but mdadm reported the array as degraded and reading was not really possible anymore.</p>
<p>So, what to do in that case? From what I have seen, the first thing is to stop the array, then to try to reassemble it with various options (but do not try to re-add the “failing” drives). Obviously I did some mistake… So, if at some point <code>mdadm --assemble</code> with any kind of options does not work, re-creating the array might be your last solution. At least it worked for me.</p>
<p>But be careful, when creating the array, you have to provide the same options (chunk size…) as it was before, and you have to keep the drives in the SAME ORDER. And when you have drives on USB, the order is a bit random (maybe I should have looked at each disk’s UUID and write the order somewhere).</p>
<p>So I re created the array with the following command (DON’T FORGET “—assume-clean” otherwise mdadm will start re-synchronizing your disks and it’s something you may not want):</p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;">mdadm <span class="re5">--create</span> <span class="re5">--verbose</span> <span class="sy0">/</span>dev<span class="sy0">/</span>md0 <span class="re5">--level</span>=5 <span class="re5">--raid-devices</span>=4 <span class="re5">--assume-clean</span> <span class="sy0">/</span>dev<span class="sy0">/</span>sdb1 <span class="sy0">/</span>dev<span class="sy0">/</span>sdc1 <span class="sy0">/</span>dev<span class="sy0">/</span>sdd1 <span class="sy0">/</span>dev<span class="sy0">/</span>sde1</pre></div></div>
<p>After doing so… it was still not working. Why? Because I didn’t gave the right disk order! With 4 drives I have something like 24 different possibilities. How to find out if it’s the right one? Well, that’s quite easy, you should be able to mount the disk <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Doing a <code>fsck</code> might also be a good idea (don’t forget the <code>-n</code> option as you don’t want to write on the drive until you are sure that it’s the correct order).</p>
<p>I was quite lucky since I found the right one on the second try.</p>
<h5>Related posts:</h5>
<ul>
<li><a href="/2008/10/10/RAID-5-software-sous-GNULinux/">RAID 5 software sous GNU/Linux</a></li>
<li><a href="/2008/10/13/raid-5-software-sous-gnulinux-la-panne/">La panne</a></li>
<li><a href="/2009/05/25/Moving-a-RAID-array/">Moving a RAID array</a></li>
<li><a href="/2009/07/23/Restoring-your-RAID-array/">Restoring your RAID array</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2010/01/25/losing-2-disks-on-a-raid-5-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fit-PC2</title>
		<link>http://blog.desgrange.net/2009/08/24/fit-pc2/</link>
		<comments>http://blog.desgrange.net/2009/08/24/fit-pc2/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Green IT]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[ecology]]></category>
		<category><![CDATA[fit-PC]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[power consumption]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=682</guid>
		<description><![CDATA[Last year I bought a fit-PC in order to replace my old router (which was a desktop PC). This year I bought a fit-PC2 to replace my home server (which was a big fat computer). Requirements This time my needs were a bit different than the ones for my router. I was looking for a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/2008/09/16/fit-pc/">Last year I bought a fit-PC</a> in order to replace my old <a hreflang="en" href="http://en.wikipedia.org/wiki/Router" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Router?referer=');">router</a> (which was a desktop PC). This year I bought a <a hreflang="en" href="http://fit-pc2.com" onclick="pageTracker._trackPageview('/outgoing/fit-pc2.com?referer=');">fit-PC2</a> to replace my <a hreflang="en" href="http://en.wikipedia.org/wiki/Home_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Home_server?referer=');">home server</a> (which was a big fat computer).</p>
<h5>Requirements</h5>
<p>This time my needs were a bit different than the ones for my router. I was looking for a low power consumption device with at least 512 MB of RAM, fast enough to read videos (I may use it as a <a hreflang="en" href="http://en.wikipedia.org/wiki/Htpc" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Htpc?referer=');">HTPC</a> in the future), fan-less and of course, it must work with <a hreflang="en" href="http://en.wikipedia.org/wiki/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Linux?referer=');">Linux</a>.</p>
<h5>fit-PC2 specifications</h5>
<p>So I end up with <a hreflang="en" href="http://www.compulab.co.il/" onclick="pageTracker._trackPageview('/outgoing/www.compulab.co.il/?referer=');">Compulab</a>’s fit-PC2. Here are the <a hreflang="en" href="http://fit-pc2.com/wiki/index.php?title=Fit-PC2_Specifications" onclick="pageTracker._trackPageview('/outgoing/fit-pc2.com/wiki/index.php?title=Fit-PC2_Specifications&amp;referer=');">official specs</a>:</p>
<ul>
<li>CPU: <a hreflang="en" href="http://en.wikipedia.org/wiki/Intel_Atom" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Intel_Atom?referer=');">Intel Atom</a> Z530 1.6 GHz</li>
<li>RAM: 1 GB DDR2-533</li>
<li>HDD: 160 GB <a hreflang="en" href="http://en.wikipedia.org/wiki/SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SATA?referer=');">SATA</a> 2.5”</li>
<li>1 <a hreflang="en" href="http://en.wikipedia.org/wiki/Gigabit_ethernet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Gigabit_ethernet?referer=');">Gigabit ethernet</a> port</li>
<li>4 <a hreflang="en" href="http://en.wikipedia.org/wiki/USB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/USB?referer=');">USB</a> 2.0 ports</li>
<li>2 mini-USB 2.0 ports</li>
<li>1 mini-SD socket</li>
<li>1 IR receiver (infra-red, for remote control)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Digital_Visual_Interface" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Digital_Visual_Interface?referer=');">DVI</a> output (using a <a hreflang="en" href="http://en.wikipedia.org/wiki/HDMI" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HDMI?referer=');">HDMI</a> connector, HDMI to DVI cable provided)</li>
<li>Power consumption: 6 W idle, 7 W reading <a hreflang="en" href="http://en.wikipedia.org/wiki/H.264" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/H.264?referer=');">H.264</a> videos, 8 W at full load</li>
<li>Shipped with <a hreflang="en" href="http://en.wikipedia.org/wiki/Ubuntu_%28operating_system%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ubuntu_28operating_system_29?referer=');">Ubuntu</a></li>
</ul>
<p>Several flavors are available (with <a hreflang="en" href="http://en.wikipedia.org/wiki/WiFi" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/WiFi?referer=');">WiFi</a>, without hard drive, with an Atom Z510 CPU…).</p>
<h5>Pictures</h5>
<p><a style="text-decoration: none;" href="http://blog.desgrange.net/wp-content/uploads/2009/08/box.jpg"><img class="aligncenter size-full wp-image-982" title="box" src="http://blog.desgrange.net/wp-content/uploads/2009/08/box.jpg" alt="" width="512" height="371" /></a></p>
<p><a style="text-decoration: none;" href="http://blog.desgrange.net/wp-content/uploads/2009/08/content.jpg"><img class="aligncenter size-full wp-image-983" title="content" src="http://blog.desgrange.net/wp-content/uploads/2009/08/content.jpg" alt="" width="512" height="346" /></a></p>
<p><a style="text-decoration: none;" href="http://blog.desgrange.net/wp-content/uploads/2009/08/front.jpg"><img class="aligncenter size-full wp-image-984" title="front" src="http://blog.desgrange.net/wp-content/uploads/2009/08/front.jpg" alt="" width="512" height="300" /></a></p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/08/back.jpg"><img class="aligncenter size-full wp-image-985" title="back" src="http://blog.desgrange.net/wp-content/uploads/2009/08/back.jpg" alt="" width="512" height="239" /></a></p>
<h5>Usage</h5>
<p>I tried the pre-installed <a hreflang="en" href="http://www.ubuntu.com/" onclick="pageTracker._trackPageview('/outgoing/www.ubuntu.com/?referer=');">Ubuntu</a> but it’s an old version (8.04). Anyway, it was working quite fine. For video playback only <a hreflang="en" href="http://en.wikipedia.org/wiki/MPlayer" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MPlayer?referer=');">MPlayer</a> was using hardware acceleration provided in fit-PC2. I played <a hreflang="en" href="http://www.sitasingstheblues.com/" onclick="pageTracker._trackPageview('/outgoing/www.sitasingstheblues.com/?referer=');">Sita Sings The Blues</a> on it, it works wonderfully (the movie is a Full HD (1920*1080), 4.12 GB file (I was hardly able to read it on my <a hreflang="en" href="http://en.wikipedia.org/wiki/MacBook" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MacBook?referer=');">MacBook</a>)).</p>
<p>But I don’t really want to use Ubuntu. If I want a *buntu linux I would install <a hreflang="en" href="http://en.wikipedia.org/wiki/Kubuntu" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Kubuntu?referer=');">Kubuntu</a> instead, anyway I installed <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a>. Here is the beginning of my troubles.</p>
<p>First, I’m using Debian’s “testing” version, which proved to be quite stable so far. Except with the new 2.6.30 Linux kernel which froze my <a hreflang="en" href="http://en.wikipedia.org/wiki/VIA_C7" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/VIA_C7?referer=');">VIA C7</a> powered <a hreflang="fr" href="http://dedibox.fr/" onclick="pageTracker._trackPageview('/outgoing/dedibox.fr/?referer=');">Dedibox</a> and is behaving weirdly on the fit-pc2. I don’t know if the problem is in linux kernel, <a hreflang="en" href="http://en.wikipedia.org/wiki/GNU_Compiler_Collection" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNU_Compiler_Collection?referer=');">gcc</a>, debian but installing 2.6.30 kernel was not a good thing on my debian boxes. I’m using the fit-pc2 remotely (<a hreflang="en" href="http://en.wikipedia.org/wiki/Ssh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ssh?referer=');">ssh</a>, music streaming, time machine backups) and from time to time it stops to respond, but if I hit a key on the keyboard, network operations resume very weird. A problem in power saving code? a deadlock which resolved itself when a new interruption is raised? No idea, I’m clearly not competent in that domain. Easy solution: revert to 2.6.26 kernel.</p>
<p>Second problem: drivers. The graphic chipset used is an <a hreflang="en" href="http://en.wikipedia.org/wiki/GMA500#GMA_500" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GMA500_GMA_500?referer=');">Intel GMA500</a>. Even if Intel recently helped the <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source_community" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source_community?referer=');">Open Source community</a> by giving specifications of its chipsets, they didn’t for that one (because it’s not really an Intel one, it was developed by <a hreflang="en" href="http://en.wikipedia.org/wiki/PowerVR" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PowerVR?referer=');">PowerVR</a> (and they are much less cooperative)). Somehow Compulab/<a hreflang="en" href="http://en.wikipedia.org/wiki/Dell" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Dell?referer=');">DeLL</a>/Ubuntu managed to get a partly open source driver with hardware acceleration (that part is still proprietary), but according to various websites, the driver is crappy and not well maintained (but it looks like some people are trying to make that better). So, for now, hardware acceleration does not work easily on Debian. I hope it will work soon.</p>
<h5>Power consumption</h5>
<ul>
<li>Off: 0.3 W</li>
<li>Idle: 9 W</li>
<li>H.264 playback: &lt;10 W</li>
<li>Full load: &lt;11 W</li>
</ul>
<p>It seems that it consume a bit more than expected (my watt-meter is a cheap one, I’m not sure how reliable it is), or maybe figures on fit-pc2 website were given for an Atom Z510.</p>
<p>Note: the case can be very hot.</p>
<h5>Conclusion</h5>
<p>fit-PC2 is a nice bit of hardware, but if you are going to install an alternative <a hreflang="en" href="http://en.wikipedia.org/wiki/BSD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/BSD?referer=');">BSD</a>/Linux operating system, you have to know that you may get some troubles with video drivers (if you need nice graphical interface).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/08/24/fit-pc2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Restoring your RAID array</title>
		<link>http://blog.desgrange.net/2009/07/23/restoring-your-raid-array/</link>
		<comments>http://blog.desgrange.net/2009/07/23/restoring-your-raid-array/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=678</guid>
		<description><![CDATA[I’m very lucky those days. 2 weeks ago my laptop hard drive died. Today I lost a drive in my RAID array. Few month ago I moved my RAID array from SATA to USB but USB components seems to be of lower quality than SATA ones. So from time to time I see some “USB [...]]]></description>
			<content:encoded><![CDATA[<p>I’m very lucky those days. 2 weeks ago <a href="/2009/07/13/Restoring-your-system-from-a-Linux-based-remote-Time-Machine-backup/">my laptop hard drive died</a>. Today I lost a drive in my <a hreflang="en" href="http://en.wikipedia.org/wiki/RAID" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RAID?referer=');">RAID</a> array.</p>
<p>Few month ago <a href="/2009/05/25/Moving-a-RAID-array/">I moved my RAID array from SATA to USB</a> but <a hreflang="en" href="http://en.wikipedia.org/wiki/USB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/USB?referer=');">USB</a> components seems to be of lower quality than <a hreflang="en" href="http://en.wikipedia.org/wiki/SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SATA?referer=');">SATA</a> ones. So from time to time I see some “USB reset” when reading/writing a lot of data, fortunately it only stop transfers for a few seconds before resuming.</p>
<p>Today my server was <a hreflang="en" href="http://en.wikipedia.org/wiki/Fsck" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Fsck?referer=');">fsck</a>‘ing the array when a disk failed badly. It looks like the external drive’s USB controller crashed. The disk was not visible anymore from my server (I had to manually restart the external drive).</p>
<p>Since it’s a RAID 5 array, everything was still working fine, in degraded mode:</p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Sat Jan 19 17:03:46 2008
     Raid Level : raid5
     Array Size : 1465151808 (1397.28 GiB 1500.32 GB)
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
   Raid Devices : 4
  Total Devices : 3
Preferred Minor : 0
    Persistence : Superblock is persistent
&nbsp;
    Update Time : Wed Jul 22 22:16:04 2009
          State : clean, degraded
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0
&nbsp;
         Layout : left-symmetric
     Chunk Size : 64K
&nbsp;
           UUID : 02918692:35547ed8:ccb6a325:e4cda885 (local to host seth)
         Events : 0.3774
&nbsp;
    Number   Major   Minor   RaidDevice State
       0       8       65        0      active sync   /dev/sde1
       1       0        0        1      removed
       2       8       81        2      active sync   /dev/sdf1
       3       8       33        3      active sync   /dev/sdc1</pre></div></div>
<p>Then adding back the missing drive:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mdadm --manage /dev/md0 --add /dev/sdd1
mdadm: re-added /dev/sdd1
$ sudo mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Sat Jan 19 17:03:46 2008
     Raid Level : raid5
     Array Size : 1465151808 (1397.28 GiB 1500.32 GB)
  Used Dev Size : 488383936 (465.76 GiB 500.11 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent
&nbsp;
    Update Time : Wed Jul 22 22:19:23 2009
          State : clean, degraded, recovering
 Active Devices : 3
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 1
&nbsp;
         Layout : left-symmetric
     Chunk Size : 64K
&nbsp;
 Rebuild Status : 0% complete
&nbsp;
           UUID : 02918692:35547ed8:ccb6a325:e4cda885 (local to host seth)
         Events : 0.3780
&nbsp;
    Number   Major   Minor   RaidDevice State
       0       8       65        0      active sync   /dev/sde1
       4       8       49        1      spare rebuilding   /dev/sdd1
       2       8       81        2      active sync   /dev/sdf1
       3       8       33        3      active sync   /dev/sdc1</pre></div></div>
<p>Now I can monitor the slow process of rebuilding the array:</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd1[4] sde1[0] sdc1[3] sdf1[2]
      1465151808 blocks level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
      [&gt;....................]  recovery =  2.2% (11184896/488383936) finish=661.5min speed=12019K/sec
&nbsp;
unused devices: &lt;none&gt;</pre></div></div>
<p>At least 11 hours to rebuild!!! So, for people as stupid as me: don’t use USB for a RAID array if you are not obliged to, it’s not very safe and it’s a bit slow.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/07/23/restoring-your-raid-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Restoring your system from a Linux based remote Time Machine backup</title>
		<link>http://blog.desgrange.net/2009/07/13/restoring-your-system-from-a-linux-based-remote-time-machine-backup/</link>
		<comments>http://blog.desgrange.net/2009/07/13/restoring-your-system-from-a-linux-based-remote-time-machine-backup/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[crash]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=677</guid>
		<description><![CDATA[In a previous post I explained that I configured my Debian GNU/Linux server to act as a Time Machine server. The purpose of Time Machine is to backup your Mac and to allow you to retrieve some files you deleted or to restore your system. Last week my MacBook’s hard drive suddenly died without a [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post I explained that I configured my <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/GNU/Linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GNU/Linux?referer=');">GNU/Linux</a> server to act as a <a href="/2009/03/01/using-a-linux-server-for-your-mac/">Time Machine server</a>.</p>
<p>The purpose of <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_Machine_%28Apple_software%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_Machine_28Apple_software_29?referer=');">Time Machine</a> is to <a hreflang="en" href="http://en.wikipedia.org/wiki/Backup" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Backup?referer=');">backup</a> your <a hreflang="en" href="http://en.wikipedia.org/wiki/Macintosh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Macintosh?referer=');">Mac</a> and to allow you to retrieve some files you deleted or to restore your system. Last week my <a hreflang="en" href="http://en.wikipedia.org/wiki/MacBook" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MacBook?referer=');">MacBook</a>’s <a hreflang="en" href="http://en.wikipedia.org/wiki/Hard_disk_drive" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Hard_disk_drive?referer=');">hard drive</a> suddenly died without a warning. Since I was moving in my new apartment, the last backup was few days before, but at least I had a quite recent backup.</p>
<p>The question was: does Time Machine will allow me to restore my backup as expected?</p>
<p>I bought a new hard drive, plugged it, boot on <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X</a> install DVD, selected Utilities/Restore system from backup… then nothing. No backup listed and the “Connect to remote disk” is grayed/disabled <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> .</p>
<p>I was a bit disappointed. I launched the terminal and tried to manually mount the remote backup but I failed. This was the good solution, I just didn’t know the right command to mount a remote apple volume. After googling a bit (thanks to my <a hreflang="en" href="http://en.wikipedia.org/wiki/IPhone" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPhone?referer=');">iPhone</a>) I found the right instructions:</p>
<ul>
<li>Create a directory where to mount the remote backup</li>
</ul>
<pre># mkdir /Volumes/backup</pre>
<ul>
<li>Mount remote volume</li>
</ul>
<pre># mount_afp afp://login:password@hostname/volumename /Volumes/backup</pre>
<p>Then relaunch the “Restore from backup” utility, the remote volume was now listed. Just had to select and start waiting (restoring the system may be quite long).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/07/13/restoring-your-system-from-a-linux-based-remote-time-machine-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Instant Messaging</title>
		<link>http://blog.desgrange.net/2009/06/22/open-instant-messaging/</link>
		<comments>http://blog.desgrange.net/2009/06/22/open-instant-messaging/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ejabberd]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[instant messaging]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[standards]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=675</guid>
		<description><![CDATA[Email protocols history A long time ago there was several protocols to send a message from a computer to an other one. There was a protocol per network (the internet was not really born at that time). Those protocols were not compatible between each others. So for instance, if you were using FidoNet, you were [...]]]></description>
			<content:encoded><![CDATA[<h5>Email protocols history</h5>
<p>A long time ago there was several <a hreflang="en" href="http://en.wikipedia.org/wiki/Protocol_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Protocol_computing?referer=');">protocols</a> to send a message from a computer to an other one. There was a protocol per network (the <a hreflang="en" href="http://en.wikipedia.org/wiki/Internet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Internet?referer=');">internet</a> was not really born at that time). Those protocols were not compatible between each others. So for instance, if you were using <a hreflang="en" href="http://en.wikipedia.org/wiki/FidoNet" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FidoNet?referer=');">FidoNet</a>, you were not able to send <a hreflang="en" href="http://en.wikipedia.org/wiki/E-mail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/E-mail?referer=');">emails</a> to people using <a hreflang="en" href="http://en.wikipedia.org/wiki/BITNET" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/BITNET?referer=');">BITNET</a>. Hopefully some people created some gateways to transfer emails from a network to an other one (but it looks like it was quite a nightmare). At some point in time, <a hreflang="en" href="http://en.wikipedia.org/wiki/ARPANET" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ARPANET?referer=');">ARPANET</a> and its email protocol became the standard and other protocols started vanishing. People were now able to communicate with each other easily.</p>
<h5>Instant messaging</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Instant_messaging" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Instant_messaging?referer=');">Instant messaging</a> (IM) appeared much more recently (email started in the late 60s, late 80s for IM). Personal IM became very well known in 1996 with <a hreflang="en" href="http://en.wikipedia.org/wiki/ICQ" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ICQ?referer=');">ICQ</a> (I still have my ICQ account! (but nobody to talk to me on it anymore)). Then several other protocols appeared:</p>
<ul>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Jabber" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Jabber?referer=');">Jabber</a> (1998, free and open protocol)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/QQ" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/QQ?referer=');">QQ</a> (1998, closed and proprietary)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Yahoo!_Messenger" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Yahoo_Messenger?referer=');">Yahoo! Messenger</a> (1998, closed and proprietary)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/MSN_Messenger" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MSN_Messenger?referer=');">MSN Messenger</a> (1999, closed and proprietary)</li>
<li>…</li>
</ul>
<p>Of course you can&#8217;t chat with somebody using MSN Messenger if you use Yahoo! Messenger. ICQ was bought by <a hreflang="en" href="http://en.wikipedia.org/wiki/AOL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/AOL?referer=');">AOL</a>, AOL created <a hreflang="en" href="http://en.wikipedia.org/wiki/AOL_Instant_Messenger" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/AOL_Instant_Messenger?referer=');">AIM</a> (AOL Instant Messenger) based on ICQ protocol. At some point people using ICQ were able to speak with people using AIM.</p>
<p>In 2004, XMPP, the protocol used by Jabber, became the official <a hreflang="en" href="http://en.wikipedia.org/wiki/Internet_Engineering_Task_Force" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Internet_Engineering_Task_Force?referer=');">IETF</a> instant messaging standard (IETF is the group defining the internet standards (like <a hreflang="en" href="http://en.wikipedia.org/wiki/HTTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/HTTP?referer=');">HTTP</a> for the web, <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a> for emails, <a hreflang="en" href="http://en.wikipedia.org/wiki/FTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FTP?referer=');">FTP</a> for file transfer)).</p>
<h5>Jabber/XMPP</h5>
<p>XMPP as been the standard for 5 years now, but still, most of my contacts are using MSN Messenger. Why? Because they also use a <a hreflang="en" href="http://en.wikipedia.org/wiki/Microsoft_Windows" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Microsoft_Windows?referer=');">Microsoft Windows</a> based computer and Microsoft MSN Messenger is the default instant messaging software installed on those computers.</p>
<p>XMPP allows creating gateways to other protocols (like MSN, Yahoo!, ICQ). The situation looks a bit like the email status in the old days. But the email standard imposed itself as the killer application of ARPANET. So, what will be the thing that will wipe out all proprietary protocols and impose the XMPP open standard?</p>
<p>The problem with standards is that it take time to be developed. History as shown that new versions of a standard are not implemented by all software vendors quickly, nor they are deployed as fast as possible. So changes to the standard must not happen everyday and having it quite right at version 1.0 take time.</p>
<p>In the meantime, other protocols evolve faster because vendors have a captive market and a better control on how the software is distributed/used (and they don&#8217;t have to wait for others to implement changes).</p>
<p>While XMPP was on the way to be standardized, other protocols got voice then video functionalities. I had a lot of hope in 1995 when <a hreflang="en" href="http://en.wikipedia.org/wiki/Google" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Google?referer=');">Google</a> released it&#8217;s own IM software <a hreflang="en" href="http://en.wikipedia.org/wiki/Google_Talk" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Google_Talk?referer=');">Google Talk</a>. GTalk is based on XMPP and add some voice extension and video extension later.</p>
<p>Then AOL started an experiment to allow XMPP connections to its network, Yahoo announced that they were interested by XMPP too. The chat in <a hreflang="en" href="http://en.wikipedia.org/wiki/Facebook" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Facebook?referer=');">Facebook</a> uses XMPP (but the network is closed, you can only talk to Facebook users), several other community websites do the same.</p>
<h5>Nowadays</h5>
<p>Last week, the specifications for voice/video in XMPP were released. The biggest missing features making people stay with their proprietary IM is going to be old story soon. But I&#8217;m not sure it will be enough to see a big migration to XMPP.</p>
<p>Those last few years, XMPP interest increased a lot and nearly all IM vendors are now looking at XMPP except <a hreflang="en" href="http://en.wikipedia.org/wiki/Microsoft" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Microsoft?referer=');">Microsoft</a>. It looks like you will soon have the choice between speaking to nearly everybody except MSN Messenger users or speaking only to MSN Messenger users.</p>
<p>Of course there are lots of softwares allowing you to use several accounts at the same time (so being connected to MSN, Yahoo! and Jabber at the same time). I also have several emails account. The difference is that from my professional email account I can send emails to everybody, same for my personal email. I&#8217;m choosing the email account I&#8217;m using depending on what my &#8220;role&#8221; is. If I want to send a message to a colleague, I will use my professional email address.</p>
<p>In IM, you can&#8217;t do that, except if you open several accounts on each protocol you use. Having a professional and a personal account on MSN, on Yahoo!, on AIM, on Jabber With all those protocols I currently have 9 accounts. And you know what? I like keeping things simple. For my email addresses I have started closing several accounts, keeping only the mandatory ones (my personal email address and the ones I have to use for my job). And I would really like doing the same for IM but you know what? Here I can&#8217;t do what I want. Why? Because if I close my MSN account, I will lose contact with a lot of people.</p>
<p>I feel a bit like in jail. Worse, I feel like my friends are in jail too but they are saying &#8220;Where do you see a jail? There&#8217;s only walls and fences&#8221;.</p>
<p>Anyway, lots of people are using <a hreflang="en" href="http://en.wikipedia.org/wiki/GMail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/GMail?referer=');">GMail</a> now, and there is a chat embedded in GMail. Of course this chat uses Google Talk so it uses XMPP. Even if I don&#8217;t really like GMail, I prefer having my friends using GMail/Google Talk than Hotmail/MSN Messenger (or whatever the name of those services are this week).</p>
<h5>ejabberd</h5>
<p>Since XMPP is an open protocol, anybody can implement it. There are several XMPP clients (<a hreflang="en" href="http://en.wikipedia.org/wiki/Pidgin_%28software%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Pidgin_28software_29?referer=');">Pidgin</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Adium" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Adium?referer=');">Adium</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Kopete" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Kopete?referer=');">Kopete</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Trillian_%28software%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Trillian_28software_29?referer=');">Trillian</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/IChat" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IChat?referer=');">iChat</a>) and there are also several servers.</p>
<p>In XMPP servers there is well-known one: <a hreflang="en" href="http://en.wikipedia.org/wiki/Ejabberd" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ejabberd?referer=');">ejabberd</a>. This server is <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a> and written in <a hreflang="en" href="http://en.wikipedia.org/wiki/Erlang_%28programming_language%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Erlang_28programming_language_29?referer=');">Erlang</a>. Ejabberd use the power of Erlang to be <a hreflang="en" href="http://en.wikipedia.org/wiki/Fault_tolerance" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Fault_tolerance?referer=');">fault-tolerant</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Redundancy_%28engineering%29" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Redundancy_28engineering_29?referer=');">redundant</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Scalability" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Scalability?referer=');">scalable</a>, &lt;add here any cool property a server should have&gt;.</p>
<p>And since XMPP is a decentralized system, I can install my own server (as I did for <a hreflang="en" href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">my email server</a> for instance).</p>
<p>Installing ejabberd on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">debian</a> is as easy as usual:</p>
<pre>$ sudo apt-get install ejabberd</pre>
<p>To configure it, you just need to change the domain name to serve in <code>/etc/ejabberd/ejabberd.cfg</code>. If your domain name is <code>example.org</code> change the following:</p>
<pre>%% Hostname {hosts, ["example.org"]}.</pre>
<p>And set the admin user:</p>
<pre>
%% Admin user
{acl, admin, {user, "admin_user_name", "example.org"}}.
</pre>
<p>Add a user with the following command:</p>
<pre>$ sudo ejabberdctl register user_name example.org password</pre>
<p>Restart the server. Done.</p>
<p>Of course there are a lot more parameters to change if you want to fine tune it. You may also need to create a <code>SRV</code> entry in your <a hreflang="en" href="http://en.wikipedia.org/wiki/Domain_Name_System" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Domain_Name_System?referer=');">DNS</a> if your server is not the one serving &#8220;example.org&#8221; (but &#8220;im.example.org&#8221; for example).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/06/22/open-instant-messaging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving a RAID array</title>
		<link>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/</link>
		<comments>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/#comments</comments>
		<pubDate>Mon, 25 May 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[RAID 5]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=670</guid>
		<description><![CDATA[I blogged about how to create a RAID-5 array with GNU/Linux in a previous entry. So my home server is running a 4 disks array (about 500 GB each, for a total of 1.5 TB available). I used SATA disks plugged in the server. For some silly reasons I wanted to move the disks out [...]]]></description>
			<content:encoded><![CDATA[<p>I blogged about <a href="/2008/10/10/RAID-5-software-sous-GNULinux/">how to create a RAID-5 array with GNU/Linux</a> in a previous entry.</p>
<p>So my <a hreflang="en" href="http://en.wikipedia.org/wiki/Home_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Home_server?referer=');">home server</a> is running a 4 disks array (about 500 GB each, for a total of 1.5 TB available). I used <a hreflang="en" href="http://en.wikipedia.org/wiki/SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SATA?referer=');">SATA</a> disks plugged in the server. For some silly reasons I wanted to move the disks out of the server and plug them using a <a hreflang="en" href="http://en.wikipedia.org/wiki/USB" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/USB?referer=');">USB</a> interface (no, not a <a hreflang="en" href="http://en.wikipedia.org/wiki/ESATA#External_SATA" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ESATA_External_SATA?referer=');">eSATA</a> one, USB (I told you, it&#8217;s silly, but it could have been worse, like creating a <a hreflang="en" href="http://ohlssonvox.8k.com/fdd_raid.htm" onclick="pageTracker._trackPageview('/outgoing/ohlssonvox.8k.com/fdd_raid.htm?referer=');">floppy RAID array</a>)).</p>
<p>I bought 4 <a hreflang="de" href="http://www.icybox.de/" onclick="pageTracker._trackPageview('/outgoing/www.icybox.de/?referer=');">Icy Box</a> enclosures and a <a hreflang="en" href="http://en.wikipedia.org/wiki/Usb_hub" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Usb_hub?referer=');">USB hub</a>. Shut down the server, move the disks into the external enclosures, plug everything (lots of wires), switch on the server, cry.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/05/icyboxes.jpg"><img class="aligncenter size-full wp-image-949" title="icyboxes" src="http://blog.desgrange.net/wp-content/uploads/2009/05/icyboxes.jpg" alt="" width="512" height="384" /></a></p>
<p>As quite expected, it didn&#8217;t work right away. My <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> server stopped on a maintenance <a hreflang="en" href="http://en.wikipedia.org/wiki/Shell_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Shell_computing?referer=');">shell</a>, complaining that it was not able to check /dev/md0 (the array).</p>
<p>No problem, I tried a simple command:</p>
<pre>mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1</pre>
<p>Array assembled, exit the shell, Debian finished booting, everything works. But, in doubt, I did a reboot. Again, array not recognized. After a bit of <a hreflang="en" href="http://en.wikipedia.org/wiki/Googling" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Googling?referer=');">googling</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Man_pages" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Man_pages?referer=');">man</a> reading, I tried the same command with a little option added:</p>
<pre>mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 --update=homehost</pre>
<p>Not really sure about what it did, but after rebooting, the array was recognized and assembled automatically.</p>
<p>So YES, you can change the controller interface used to plug your disks in an <a hreflang="en" href="http://en.wikipedia.org/wiki/RAID" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/RAID?referer=');">RAID</a> array.</p>
<p>What about speed? Well high speed is obviously not the purpose of this experiment <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  (but at least it&#8217;s &gt; 30 MB/s in continuous read).</p>
<p>What about reliability? Well it&#8217;s Raid-5 so I might have to rebuild from time to time. So far I only get some USB reset events so transfer stall during ~20 seconds then resume. Of course I get more resets when doing a big transfer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/05/25/moving-a-raid-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mail Story 3: SPF + Greylisting</title>
		<link>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/</link>
		<comments>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[SPF]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[greylisting]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tumgreyspf]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=661</guid>
		<description><![CDATA[In this third post about configuring your own mail server on Debian (first post, second post), I&#8217;m going to talk a bit about SPAM and show you 2 ways of reducing it. There are a lot of ways of fighting spam with various degrees of effectiveness, simplicity, standards respectful, etc. For instance, there are some [...]]]></description>
			<content:encoded><![CDATA[<p>In this third post about configuring your own <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_server?referer=');">mail server</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> (<a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">first post</a>, <a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">second post</a>), I&#8217;m going to talk a bit about <a hreflang="en" href="http://en.wikipedia.org/wiki/E-mail_spam" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/E-mail_spam?referer=');">SPAM</a> and show you 2 ways of reducing it.</p>
<p>There are a lot of ways of fighting spam with various degrees of effectiveness, simplicity, standards respectful, etc.</p>
<p>For instance, there are some stupid systems like <a hreflang="en" href="http://en.wikipedia.org/wiki/SpamCop" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SpamCop?referer=');">SpamCop</a> based on user submissions. If a user tell that he received a spam from a given <a hreflang="en" href="http://en.wikipedia.org/wiki/IP_address" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IP_address?referer=');">IP</a>, then the IP is temporarily marked as a SPAM sender and will be blocked by mail servers using SpamCop black list. So, when your email address is hosted by an <a hreflang="en" href="http://en.wikipedia.org/wiki/ISP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ISP?referer=');">ISP</a> used by a lot of people, of course there are emails reported as junk, and your ISP is black listed. Several mails I sent were blocked by SpamCop. Junk emails are a pain, but being blocked is way much worse. So please, don&#8217;t use system generating to many false positives.</p>
<h5>Greylisting</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Greylisting" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Greylisting?referer=');">Greylisting</a> consist of sending a temporary error when an email is received, store information about this email (server IP, sender, recipient) and wait for a second attempt after a given amount of time. If the email is received again, it&#8217;s allowed.</p>
<p>Usually spam senders send emails to a huge list of addresses, so when they received an error, they just try with the next email address. This is very simple and effective against that kind of spam. The bad news is that emails are often delayed (the sender server may try again 5, 10, 30&#8230; minutes later). By definition emails are not instantaneous, but usually it&#8217;s quite fast, so it can be a bit slower with this solution.</p>
<h5>SPF</h5>
<p><a hreflang="en" href="http://en.wikipedia.org/wiki/Sender_Policy_Framework" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Sender_Policy_Framework?referer=');">SPF</a> stands for Sender Policy Framework. It&#8217;s a way to check if the sender if allowed to send mails. For instance, a domain owner can specify in its DNS a TXT record containing IPs allowed to send emails from that domain.</p>
<p>I strongly suggest that you add this record if you have a mail server. For example, if you <code>dig</code> my domain name for TXT records you will get:</p>
<div id="wpshdo_13" class="wp-synhighlighter-outer"><div id="wpshdt_13" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_13"></a><a id="wpshat_13" class="wp-synhighlighter-title" href="#codesyntax_13"  onClick="javascript:wpsh_toggleBlock(13)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_13" onClick="javascript:wpsh_code(13)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_13" onClick="javascript:wpsh_print(13)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_13" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ dig desgrange.net TXT
&nbsp;
; &lt;&lt;&gt;&gt; DiG 9.5.0-P2 &lt;&lt;&gt;&gt; desgrange.net TXT
(…)
;; ANSWER SECTION:
desgrange.net.		600	IN	TXT	&quot;v=spf1 a mx ~all&quot;
(…)</pre></div></div>
<p>The value <code>v=spf1 a mx ~all</code> means that <code>A</code> and <code>MX</code> IPs are allowed to send emails and that <code>all</code> other IPs should not.</p>
<h5>tumgreyspf</h5>
<p>In order to add greylisting and SPF to <a hreflang="en" href="http://en.wikipedia.org/wiki/Postfix_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Postfix_software?referer=');">postfix</a>, I decided to install <a hreflang="en" href="http://www.tummy.com/Community/software/tumgreyspf/" onclick="pageTracker._trackPageview('/outgoing/www.tummy.com/Community/software/tumgreyspf/?referer=');">tumgreyspf</a>. The name is quite explicit, it does both greylisting and SPF.</p>
<p>Installation:</p>
<pre>$ sudo apt-get install tumgreyspf</pre>
<p>Tell postfix how to start tumgreyspf in <code>/etc/postfix/master.cf</code> by adding:</p>
<div id="wpshdo_14" class="wp-synhighlighter-outer"><div id="wpshdt_14" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_14"></a><a id="wpshat_14" class="wp-synhighlighter-title" href="#codesyntax_14"  onClick="javascript:wpsh_toggleBlock(14)" title="Click to show/hide code block">/etc/postfix/master.cf</a></td><td align="right"><a href="#codesyntax_14" onClick="javascript:wpsh_code(14)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_14" onClick="javascript:wpsh_print(14)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_14" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
tumgreyspf unix -       n       n       -       -       spawn
  user=tumgreyspf argv=/usr/bin/tumgreyspf</pre></div></div>
<p>Tell postfix when to ask tumgreyspf to perform a check, set <code>smtpd_sender_restrictions</code> in <code>/etc/postfix/main.cf</code> to something looking like that:</p>
<div id="wpshdo_15" class="wp-synhighlighter-outer"><div id="wpshdt_15" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_15"></a><a id="wpshat_15" class="wp-synhighlighter-title" href="#codesyntax_15"  onClick="javascript:wpsh_toggleBlock(15)" title="Click to show/hide code block">/etc/postfix/main.cf</a></td><td align="right"><a href="#codesyntax_15" onClick="javascript:wpsh_code(15)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_15" onClick="javascript:wpsh_print(15)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_15" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
smtpd_sender_restrictions =
    permit_sasl_authenticated,
    reject_unauth_destination,
    check_policy_service unix:private/tumgreyspf
(…)</pre></div></div>
<p>And now restart postfix (reload should be enough):</p>
<pre>$ sudo /etc/init.d/postfix restart</pre>
<h5>Misc</h5>
<p>After some tests, I found that tumgreyspf does not reject emails when SPF returns <code>softfail</code> but only <code>fail</code> and <code>permerror</code>.</p>
<p>If you configure your DNS like I did, which seems to be a quite common configuration, you may want to consider <code>softfail</code> has a reason to reject an email.</p>
<p>To change that, change line 122 of <code>/usr/bin/tumgreyspf</code> to the following (it&#8217;s written in <a hreflang="en" href="http://en.wikipedia.org/wiki/Python_(programming_language)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Python_programming_language?referer=');">python</a>, don&#8217;t change indentation):</p>
<div id="wpshdo_16" class="wp-synhighlighter-outer"><div id="wpshdt_16" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_16"></a><a id="wpshat_16" class="wp-synhighlighter-title" href="#codesyntax_16"  onClick="javascript:wpsh_toggleBlock(16)" title="Click to show/hide code block">/usr/bin/tumgreyspf</a></td><td align="right"><a href="#codesyntax_16" onClick="javascript:wpsh_code(16)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_16" onClick="javascript:wpsh_print(16)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_16" class="wp-synhighlighter-inner" style="display: block;"><pre class="python" style="font-family:monospace;"><ol start="122"><li class="li1"><div class="de1"><span class="kw1">if</span> spfResult == <span class="st0">'Fail'</span> <span class="kw1">or</span> spfResult == <span class="st0">'Permerror'</span> <span class="kw1">or</span> spfResult == <span class="st0">'Softfail'</span>:</div></li></ol></pre></div></div>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a></li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a></li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a> (this post)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/30/mail-story-3-spf-greylisting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mail Story 2: RoundCube</title>
		<link>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/</link>
		<comments>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Mail.app]]></category>
		<category><![CDATA[RoundCube]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=660</guid>
		<description><![CDATA[In the previous &#8220;Mail Story&#8221; post, I explained how to quickly install a mail server on Debian. Sometimes I want to check my emails but I don&#8217;t have my own computer with me, only an access to an other computer connected to the internet. So I need a webmail. For that purpose I use RoundCube, [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">previous &#8220;Mail Story&#8221; post</a>, I explained how to quickly install a <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_server?referer=');">mail server</a> on <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a>.</p>
<p>Sometimes I want to check my <a hreflang="en" href="http://en.wikipedia.org/wiki/Email" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Email?referer=');">emails</a> but I don&#8217;t have my own computer with me, only an access to an other computer connected to the internet. So I need a <a hreflang="en" href="http://en.wikipedia.org/wiki/Webmail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Webmail?referer=');">webmail</a>. For that purpose I use <a hreflang="en" href="http://en.wikipedia.org/wiki/Roundcube" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Roundcube?referer=');">RoundCube</a>, it&#8217;s an <a hreflang="en" href="http://en.wikipedia.org/wiki/Ajax_(programming)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Ajax_programming?referer=');">AJAX</a> webmail written in <a hreflang="en" href="http://en.wikipedia.org/wiki/PHP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PHP?referer=');">PHP</a>, using <a hreflang="en" href="http://en.wikipedia.org/wiki/IMAP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IMAP?referer=');">IMAP</a> to retrieve emails and <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a> to send them.</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/roundcube.png"><img class="aligncenter size-medium wp-image-891" title="roundcube" src="http://blog.desgrange.net/wp-content/uploads/2009/03/roundcube-300x163.png" alt="" width="300" height="163" /></a></p>
<h5>Installation</h5>
<p>In <a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a>, <a hreflang="en" href="http://roundcube.net/" onclick="pageTracker._trackPageview('/outgoing/roundcube.net/?referer=');">RoundCube</a> seems not to be a very <a hreflang="en" href="http://qa.debian.org/popcon.php?package=roundcube" onclick="pageTracker._trackPageview('/outgoing/qa.debian.org/popcon.php?package=roundcube&amp;referer=');">popular</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian_package" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian_package?referer=');">package</a>, or maybe Debian people thinks the project is still too young. In fact, there is <a hreflang="en" href="http://packages.debian.org/search?keywords=roundcube&amp;searchon=names&amp;suite=all&amp;section=all" onclick="pageTracker._trackPageview('/outgoing/packages.debian.org/search?keywords=roundcube_amp_searchon=names_amp_suite=all_amp_section=all&amp;referer=');">no RoundCube package for the current stable release of Debian</a>. In &#8220;testing&#8221; there is RoundCube 0.1.1, and 0.2~stable in &#8220;unstable&#8221;. Current official release is 0.2.1.</p>
<p>So lets install the &#8220;unstable&#8221; package (which is quite stable as far as I know <img src='http://blog.desgrange.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>First you need to add unstable repositories to <a hreflang="en" href="http://en.wikipedia.org/wiki/Advanced_Packaging_Tool" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Advanced_Packaging_Tool?referer=');">APT</a> if it&#8217;s not done already. Edit <code>/etc/apt/sources.list</code> and add the following lines (replace <code>ftp.fr.debian.org</code> with your closest mirror):</p>
<div id="wpshdo_17" class="wp-synhighlighter-outer"><div id="wpshdt_17" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_17"></a><a id="wpshat_17" class="wp-synhighlighter-title" href="#codesyntax_17"  onClick="javascript:wpsh_toggleBlock(17)" title="Click to show/hide code block">/etc/apt/sources.list</a></td><td align="right"><a href="#codesyntax_17" onClick="javascript:wpsh_code(17)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_17" onClick="javascript:wpsh_print(17)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_17" class="wp-synhighlighter-inner" style="display: block;"><pre class="apt_sources" style="font-family:monospace;"><span class="kw1">deb</span> <span class="re0">http://ftp.fr.debian.org/debian/</span> <span class="kw2">unstable</span> <span class="kw3">main</span> <span class="kw3">contrib</span> <span class="kw3">non-free</span>
<span class="kw1">deb-src</span> <span class="re0">http://ftp.fr.debian.org/debian/</span> <span class="kw2">unstable</span> <span class="kw3">main</span> <span class="kw3">contrib</span> <span class="kw3">non-free</span></pre></div></div>
<p>Then tell APT to keep using stable packages by default (currently the stable release is called <q>lenny</q>, so set the value accordingly with your system), edit <code>/etc/apt/apt.conf.d/70debconf</code> and add:</p>
<div id="wpshdo_18" class="wp-synhighlighter-outer"><div id="wpshdt_18" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_18"></a><a id="wpshat_18" class="wp-synhighlighter-title" href="#codesyntax_18"  onClick="javascript:wpsh_toggleBlock(18)" title="Click to show/hide code block">/etc/apt/apt.conf.d/70debconf</a></td><td align="right"><a href="#codesyntax_18" onClick="javascript:wpsh_code(18)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_18" onClick="javascript:wpsh_print(18)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_18" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
APT::Default-Release &quot;lenny&quot;;</pre></div></div>
<p>It&#8217;s time to retrieve the list of unstable packages:</p>
<pre>$ sudo apt-get update</pre>
<p>Install RoundCube (RoundCube needs a database, it works with <a hreflang="en" href="http://en.wikipedia.org/wiki/MySQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MySQL?referer=');">MySQL</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/PostgreSQL" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/PostgreSQL?referer=');">PostgreSQL</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/SQLite" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SQLite?referer=');">SQLite</a>, select the one you prefer, here I&#8217;m going to use SQLite):</p>
<div id="wpshdo_19" class="wp-synhighlighter-outer"><div id="wpshdt_19" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_19"></a><a id="wpshat_19" class="wp-synhighlighter-title" href="#codesyntax_19"  onClick="javascript:wpsh_toggleBlock(19)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_19" onClick="javascript:wpsh_code(19)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_19" onClick="javascript:wpsh_print(19)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_19" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install roundcube
-&gt; Configure database for roundcube with dbconfig-common? Yes
-&gt; Database type to be used by roundcube: sqlite</pre></div></div>
<h5>Configuration</h5>
<p>RoundCube should be accessible at <code>http://mailserver.example.com/roundcube/</code>. If it&#8217;s not the case, you may need to uncomment the two <code>Alias</code> directives at the beginning of <code>/etc/roundcube/apache.conf</code> (don&#8217;t forget to reload apache configuration before checking if it works).</p>
<p>Now edit <code>/etc/roundcube/main.inc.php</code>. Each parameter has a quite explicit comment, read them. Things you may want to change:</p>
<div id="wpshdo_20" class="wp-synhighlighter-outer"><div id="wpshdt_20" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_20"></a><a id="wpshat_20" class="wp-synhighlighter-title" href="#codesyntax_20"  onClick="javascript:wpsh_toggleBlock(20)" title="Click to show/hide code block">/etc/roundcube/main.inc.php</a></td><td align="right"><a href="#codesyntax_20" onClick="javascript:wpsh_code(20)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_20" onClick="javascript:wpsh_print(20)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_20" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="br0">&#40;</span>…<span class="br0">&#41;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'enable_caching'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw4">FALSE</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'default_host'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'ssl://localhost:993'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'default_port'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">993</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_server'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'localhost'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_port'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">587</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_user'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'%u'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'smtp_pass'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="st_h">'%p'</span><span class="sy0">;</span>
<span class="re0">$rcmail_config</span><span class="br0">&#91;</span><span class="st_h">'create_default_folders'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw4">TRUE</span><span class="sy0">;</span>
<span class="br0">&#40;</span>…<span class="br0">&#41;</span></pre></div></div>
<p>You should now be able to login, read and send emails.</p>
<h5>Misc</h5>
<p>In the parameters I changed, there is <code>create_default_folder</code> set to <code>TRUE</code>. This in order to have the default IMAP folders always here (<code>INBOX</code>, <code>Drafts</code>, <code>Sent</code>, <code>Junk</code> and <code>Trash</code>). By default they are all protected, so they can&#8217;t be removed.</p>
<p>But there is no real convention on those folder names. For instance, by default <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Mail" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Mail?referer=');">Apple Mail</a> use some different directory names. But you can tell Apple Mail to use the ones you want. First you need to select the directory (<q>{Mailbox</q>} in Apple Mail):</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_01.png"><img class="aligncenter size-full wp-image-892" title="mail.app_01" src="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_01.png" alt="" width="180" height="43" /></a></p>
<p>And then associate it with the right meaning:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_02.png"><img class="aligncenter size-full wp-image-893" title="mail.app_02" src="http://blog.desgrange.net/wp-content/uploads/2009/03/mail.app_02.png" alt="" width="370" height="506" /></a></p>
<p>For other IMAP clients, see the respective documentation. For instance, <a hreflang="en" href="http://kb.mozillazine.org/IMAP_Trash_folder" onclick="pageTracker._trackPageview('/outgoing/kb.mozillazine.org/IMAP_Trash_folder?referer=');">here is how to change the trash folder on Thunderbird</a>.</p>
<p>If you have an iPhone, you only need to synchronize it again, the iPhone uses Mail.app configuration (don&#8217;t forget to check <code>Mail Accounts</code> in <code>Info/Advanced/Replace information on this iPhone:</code> in iTunes before synchronizing).</p>
<p><strong>Note:</strong> since I wrote this post, Debian&#8217;s RoundCube unstable package has been updated to version 0.2.1 but testing package is still version 0.1.1.</p>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a></li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a> (this post)</li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/23/mail-story-2-roundcube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Story 1: Debian + Postfix (SMTP) + Courier (IMAP) + SSL</title>
		<link>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/</link>
		<comments>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[TLS]]></category>
		<category><![CDATA[courier]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=656</guid>
		<description><![CDATA[Here is a quick tutorial to build your own mail server using a Debian GNU/Linux. Disclaimer Configuring its own mail server can be fun, but remember that there are a lot of bad guys on the internet. I&#8217;m no expert on mail server configuration, don&#8217;t forget that you must not allow relaying mails to domains [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick tutorial to build your own <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail_transfer_agent" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail_transfer_agent?referer=');">mail server</a> using a <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> <a hreflang="en" href="http://en.wikipedia.org/wiki/Gnu/linux" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Gnu/linux?referer=');">GNU/Linux</a>.</p>
<h5>Disclaimer</h5>
<p>Configuring its own mail server can be fun, but remember that there are a lot of bad guys on the internet. I&#8217;m no expert on mail server configuration, don&#8217;t forget that you must not allow relaying mails to domains you don&#8217;t own and from people you haven&#8217;t authenticated in order to avoid spam relay. Of course, keep your softwares (operating system, mail server, etc.) up to date in order to keep your computer safe from being cracked.</p>
<h5>Goal</h5>
<p>I have a <a hreflang="en" href="http://en.wikipedia.org/wiki/Domain_name" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Domain_name?referer=');">domain name</a> (desgrange.net as you can see) and I would like to use it for my <a hreflang="en" href="http://en.wikipedia.org/wiki/Email" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Email?referer=');">mails</a>. It&#8217;s not that I don&#8217;t trust service providers, but I would like to be in charge of the mail server configuration (so I would be able to tune it as I want).</p>
<p>For instance, I want to be able to send mails using <a hreflang="en" href="http://en.wikipedia.org/wiki/SMTP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/SMTP?referer=');">SMTP</a> over <a hreflang="en" href="http://en.wikipedia.org/wiki/Transport_Layer_Security" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Transport_Layer_Security?referer=');">SSL</a> and retrieve emails using <a hreflang="en" href="http://en.wikipedia.org/wiki/IMAP" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IMAP?referer=');">IMAP</a> over SSL.</p>
<p>For those tasks I chose:</p>
<ul>
<li><a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a> as operating system (tested on Debian 5.0 and Debian testing)</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Postfix_(software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Postfix_software?referer=');">Postfix</a> (2.5.5) as SMTP server</li>
<li><a hreflang="en" href="http://en.wikipedia.org/wiki/Courier_Mail_Server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Courier_Mail_Server?referer=');">Courier-imap</a> (4.4.0) as IMAP server</li>
</ul>
<p>In this tutorial I assume that I&#8217;m installing a mail server for domain <code>example.com</code> on a computer named <code>mailserver</code>. Allowed users are the standard <a hreflang="en" href="http://en.wikipedia.org/wiki/Unix" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Unix?referer=');">unix</a> users created on the mail server.</p>
<h5>DNS</h5>
<p>First make sure that your <a hreflang="en" href="http://en.wikipedia.org/wiki/Domain_Name_System" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Domain_Name_System?referer=');">DNS</a> has your <a hreflang="en" href="http://en.wikipedia.org/wiki/MX_record" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MX_record?referer=');">MX record</a> pointing to your mail server. See with your domain name provider for that part. I&#8217;m using <a href="http://www.ovh.com" onclick="pageTracker._trackPageview('/outgoing/www.ovh.com?referer=');">OVH</a> so I did it on their website (which sucks a bit for that).</p>
<h5>Postfix</h5>
<p><a hreflang="en" href="http://www.postfix.org/" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/?referer=');">Postfix</a> is a well known SMTP server. As a lot of mail servers, it has several hundreds parameters, but here, all of them have good default values, so we just need to change some of them to get it working like we want. Let&#8217;s start with postfix installation:</p>
<div id="wpshdo_21" class="wp-synhighlighter-outer"><div id="wpshdt_21" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_21"></a><a id="wpshat_21" class="wp-synhighlighter-title" href="#codesyntax_21"  onClick="javascript:wpsh_toggleBlock(21)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_21" onClick="javascript:wpsh_code(21)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_21" onClick="javascript:wpsh_print(21)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_21" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install postfix
-&gt; General type of mail configuration: internet with smarthost
-&gt; System mail name: example.com
-&gt; SMTP relay host: &lt;blank&gt;</pre></div></div>
<p>Now we need to install the authentication system <code>saslauthd</code>.</p>
<div id="wpshdo_22" class="wp-synhighlighter-outer"><div id="wpshdt_22" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_22"></a><a id="wpshat_22" class="wp-synhighlighter-title" href="#codesyntax_22"  onClick="javascript:wpsh_toggleBlock(22)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_22" onClick="javascript:wpsh_code(22)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_22" onClick="javascript:wpsh_print(22)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_22" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install sasl2-bin libsasl2-modules</pre></div></div>
<p>As told by the installation process, to enable <code>saslauthd</code>, edit <code>/etc/default/saslauthd</code> and set <code>START=yes</code>.</p>
<p>To tell postfix to use <code>saslauthd</code>, create a file <code>/etc/postfix/sasl/smtpd.conf</code> containing:</p>
<div id="wpshdo_23" class="wp-synhighlighter-outer"><div id="wpshdt_23" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_23"></a><a id="wpshat_23" class="wp-synhighlighter-title" href="#codesyntax_23"  onClick="javascript:wpsh_toggleBlock(23)" title="Click to show/hide code block">/etc/postfix/sasl/smtpd.conf</a></td><td align="right"><a href="#codesyntax_23" onClick="javascript:wpsh_code(23)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_23" onClick="javascript:wpsh_print(23)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_23" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">pwcheck_method: saslauthd
mech_list: PLAIN LOGIN</pre></div></div>
<p>As postfix is running <a hreflang="en" href="http://en.wikipedia.org/wiki/Chroot" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Chroot?referer=');">chrooted</a>, to allow it to talk to <code>saslauthd</code> we need to move some files (or change the directory specified in <code>OPTIONS</code> in <code>/etc/default/saslauthd</code>):</p>
<div id="wpshdo_24" class="wp-synhighlighter-outer"><div id="wpshdt_24" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_24"></a><a id="wpshat_24" class="wp-synhighlighter-title" href="#codesyntax_24"  onClick="javascript:wpsh_toggleBlock(24)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_24" onClick="javascript:wpsh_code(24)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_24" onClick="javascript:wpsh_print(24)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_24" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo mkdir -p /var/spool/postfix/var/run/
$ sudo mv /var/run/saslauthd /var/spool/postfix/var/run/
$ sudo ln -s /var/spool/postfix/var/run/saslauthd/ /var/run/saslauthd
$ sudo adduser postfix sasl</pre></div></div>
<p>Postfix is configured to run on the standard <a hreflang="en" href="http://en.wikipedia.org/wiki/TCP_and_UDP_port" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/TCP_and_UDP_port?referer=');">port</a> 25 so other mail servers can transfer mails to you. This postfix <a hreflang="en" href="http://en.wikipedia.org/wiki/Process_(computing)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Process_computing?referer=');">process</a> can&#8217;t use SSL only because other mail servers may not support it. So we need to start an other postfix process running over SSL, so we can use this one when we want to send an email. To allow this process to start, just uncomment the <code>submission</code> lines in <code>/etc/postfix/master.cf</code>.</p>
<p>Check that <code>/etc/mailname</code> contains your domain name. It&#8217;s used by postfix for some parameters (seems to be debian specific).</p>
<p>Most of postfix configuration is done in <code>/etc/postfix/main.cf</code>, you can edit this file directly or use the following commands:</p>
<div id="wpshdo_25" class="wp-synhighlighter-outer"><div id="wpshdt_25" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_25"></a><a id="wpshat_25" class="wp-synhighlighter-title" href="#codesyntax_25"  onClick="javascript:wpsh_toggleBlock(25)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_25" onClick="javascript:wpsh_code(25)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_25" onClick="javascript:wpsh_print(25)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_25" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;"><ol><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_security_level = may'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_ciphers = high'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_exclude_ciphers = aNULL'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_tls_mandatory_protocols = TLSv1'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'mydestination = $myhostname localhost.$mydomain localhost $mydomain'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,reject_unauth_destination'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'relay_domains ='</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'home_mailbox = Maildir/'</div></li><li class="li1"><div class="de1">$ sudo postconf -e 'mailbox_command ='</div></li></ol></pre></div></div>
<p>Line 1 tells postfix to use TLS on standard SMTP port (25) if remote server support it.<br />
Line 2 restricts TLS ciphers to only &#8220;HIGH&#8221; ciphers.<br />
Line 3 excludes aNULL cipher (no encryption).<br />
Line 4 tells to use TLSv1 as protocol for the postfix over SSL process.<br />
Line 5 list domain names for which the server will accept mails.<br />
Line 6 tells postfix to send mails only from authenticated users or to domains postfix is in charge of.<br />
Line 7 postfix must not relay mails to other domains.<br />
Line 8 and 9 are for Courier which use a specific type of mailboxes.</p>
<p>You can have a look at the <a hreflang="en" href="http://www.postfix.org/postconf.5.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/postconf.5.html?referer=');">postfix configuration parameters documentation</a>.</p>
<h5>Courier-IMAP</h5>
<p><a hreflang="en" href="http://www.courier-mta.org/" onclick="pageTracker._trackPageview('/outgoing/www.courier-mta.org/?referer=');">Courier</a> is a full mail server but here I&#8217;m going to use only <a hreflang="en" href="http://www.courier-mta.org/imap/" onclick="pageTracker._trackPageview('/outgoing/www.courier-mta.org/imap/?referer=');">Courier&#8217;s IMAP server component</a>. Installation:</p>
<div id="wpshdo_26" class="wp-synhighlighter-outer"><div id="wpshdt_26" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_26"></a><a id="wpshat_26" class="wp-synhighlighter-title" href="#codesyntax_26"  onClick="javascript:wpsh_toggleBlock(26)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_26" onClick="javascript:wpsh_code(26)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_26" onClick="javascript:wpsh_print(26)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_26" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install courier-imap-ssl
-&gt; Create directories for web-based administration?: no</pre></div></div>
<p>By default IMAP and IMAP over SSL processes are started but I don&#8217;t want the first one. To disable the standard IMAP process, set <code>IMAPDSTART</code> to <code>NO</code> in <code>/etc/courier/imapd</code>.</p>
<p>Some parameters have to be changed for the IMAP over SSL process, edit the file <code>/etc/courier/imapd-ssl</code> and set the following values:</p>
<div id="wpshdo_27" class="wp-synhighlighter-outer"><div id="wpshdt_27" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_27"></a><a id="wpshat_27" class="wp-synhighlighter-title" href="#codesyntax_27"  onClick="javascript:wpsh_toggleBlock(27)" title="Click to show/hide code block">/etc/courier/imapd-ssl</a></td><td align="right"><a href="#codesyntax_27" onClick="javascript:wpsh_code(27)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_27" onClick="javascript:wpsh_print(27)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_27" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">(…)
IMAP_TLS_REQUIRED=1
TLS_PROTOCOL=SSL23
TLS_STARTTLS_PROTOCOL=SSL23
TLS_CIPHER_LIST=HIGH
(…)</pre></div></div>
<p>For <code>TLS_PROTOCOL</code> and <code>TLS_STARTTLS_PROTOCOL</code> I use <code>SSL23</code> because I&#8217;m using <a hreflang="en" href="http://en.wikipedia.org/wiki/Mail.app" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mail.app?referer=');">Apple Mail</a> and it does not handle TLS very well. If you use a mail client supporting TLS, replace <code>SSL23</code> with <code>TLS1</code>.</p>
<h5>Finishing the installation</h5>
<p>First we need to restart everything:</p>
<div id="wpshdo_28" class="wp-synhighlighter-outer"><div id="wpshdt_28" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_28"></a><a id="wpshat_28" class="wp-synhighlighter-title" href="#codesyntax_28"  onClick="javascript:wpsh_toggleBlock(28)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_28" onClick="javascript:wpsh_code(28)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_28" onClick="javascript:wpsh_print(28)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_28" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo /etc/init.d/saslauthd restart
$ sudo /etc/init.d/postfix restart
$ sudo /etc/init.d/courier-authdaemon restart
$ sudo /etc/init.d/courier-imap restart
$ sudo /etc/init.d/courier-imap-ssl restart</pre></div></div>
<p>If you type <code>sudo netstat -lntp</code> you should see something like that:</p>
<div id="wpshdo_29" class="wp-synhighlighter-outer"><div id="wpshdt_29" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_29"></a><a id="wpshat_29" class="wp-synhighlighter-title" href="#codesyntax_29"  onClick="javascript:wpsh_toggleBlock(29)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_29" onClick="javascript:wpsh_code(29)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_29" onClick="javascript:wpsh_print(29)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_29" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      12718/master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      12718/master
tcp6       0      0 :::993                  :::*                    LISTEN      12440/couriertcpd</pre></div></div>
<p>There are two processes for postfix (<code>master</code> on ports 25 and 587 (SSL)) and one for courier on port 993.</p>
<p>Create your mailbox. You may want to initialize your own mailbox directory on the server:</p>
<div id="wpshdo_30" class="wp-synhighlighter-outer"><div id="wpshdt_30" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_30"></a><a id="wpshat_30" class="wp-synhighlighter-title" href="#codesyntax_30"  onClick="javascript:wpsh_toggleBlock(30)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_30" onClick="javascript:wpsh_code(30)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_30" onClick="javascript:wpsh_print(30)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_30" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ maildirmake ~/Maildir</pre></div></div>
<h5>Certificates</h5>
<p>I didn&#8217;t say anything about SSL <a hreflang="en" href="http://en.wikipedia.org/wiki/Public_key_certificate" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Public_key_certificate?referer=');">certificates</a>, you need certificates for all your SSL connections, here some default ones are created, but when you connect with your mail client, it may complain about the certificate not being trustworthy.</p>
<p>It may prevent you to read/send mails (for instance I had to tell <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a> <a hreflang="en" href="http://www.apple.com/macosx/features/mail" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/macosx/features/mail?referer=');">Mail</a> to trust the certificate in order to be able to send emails).</p>
<h5>Trouble shooting</h5>
<p>While configuring my mail server I ran in several problems, mainly due to Apple Mail, TLS and certificates. So, if you have any trouble, don&#8217;t forget to have a look at log files in <code>/var/log/</code>, use <code>netstat</code> and <code>ps</code> to be sure that your servers are running and listening on the right ports.</p>
<p>You may even try to manually connect to the IMAP server with a command like this one:</p>
<div id="wpshdo_31" class="wp-synhighlighter-outer"><div id="wpshdt_31" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_31"></a><a id="wpshat_31" class="wp-synhighlighter-title" href="#codesyntax_31"  onClick="javascript:wpsh_toggleBlock(31)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_31" onClick="javascript:wpsh_code(31)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_31" onClick="javascript:wpsh_print(31)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_31" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ openssl s_client -tls1 -connect mailserver:993 -state -debug</pre></div></div>
<p>Have a look to the <a hreflang="en" href="http://bobpeers.com/technical/telnet_imap.php" onclick="pageTracker._trackPageview('/outgoing/bobpeers.com/technical/telnet_imap.php?referer=');">IMAP commands</a> to check if it works.</p>
<p>Some of the errors I had:</p>
<ul>
<li><code>SASL authentication failure: cannot connect to saslauthd server: No such file or directory</code> because I didn&#8217;t had moved <code>saslauthd</code> files to <code>/var/spool/postfix/var/run</code>.</li>
<li><code>imapd-ssl: Unexpected SSL connection shutdown</code> because Apple Mail was not trusting the certificate.</li>
<li><code>imapd-ssl: couriertls: connect: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number</code> because Apple Mail does not support SSL3/TLS1 on IMAP.</li>
</ul>
<h5>Update (2010-05-09):</h5>
<p>My father&#8217;s mail client was displaying the following error message:</p>
<div id="wpshdo_32" class="wp-synhighlighter-outer"><div id="wpshdt_32" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_32"></a><a id="wpshat_32" class="wp-synhighlighter-title" href="#codesyntax_32"  onClick="javascript:wpsh_toggleBlock(32)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_32" onClick="javascript:wpsh_code(32)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_32" onClick="javascript:wpsh_print(32)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_32" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">Filesystem notification initialization error -- contact your mail administrator (check for configuration errors with the FAM/Gamin library)</pre></div></div>
<p>A quick solution to solve that is to replace <a href="http://oss.sgi.com/projects/fam/" onclick="pageTracker._trackPageview('/outgoing/oss.sgi.com/projects/fam/?referer=');">FAM</a> with <a href="http://people.gnome.org/~veillard/gamin/" onclick="pageTracker._trackPageview('/outgoing/people.gnome.org/_veillard/gamin/?referer=');">Gamin</a>:</p>
<div id="wpshdo_33" class="wp-synhighlighter-outer"><div id="wpshdt_33" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_33"></a><a id="wpshat_33" class="wp-synhighlighter-title" href="#codesyntax_33"  onClick="javascript:wpsh_toggleBlock(33)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_33" onClick="javascript:wpsh_code(33)" title="Show code only"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_33" onClick="javascript:wpsh_print(33)" title="Print code"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://blog.desgrange.net/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_33" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">$ sudo apt-get install gamin</pre></div></div>
<p>And to restart <code>courier</code>.</p>
<h5>Links</h5>
<p>Some useful resources:</p>
<ul>
<li><a hreflang="en" href="http://www.postfix.org/docs.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/docs.html?referer=');">Postfix Howtos and FAQs</a></li>
<li><a hreflang="en" href="http://www.postfix.org/documentation.html" onclick="pageTracker._trackPageview('/outgoing/www.postfix.org/documentation.html?referer=');">Postfix Documentation</a></li>
<li><a hreflang="en" href="http://www.howtoforge.com/postfix-smtp-authentication-on-the-secure-port-only" onclick="pageTracker._trackPageview('/outgoing/www.howtoforge.com/postfix-smtp-authentication-on-the-secure-port-only?referer=');">A tutorial on SMTP authentication over SSL</a></li>
<li><a hreflang="en" href="http://www.howtoforge.com/perfect_setup_debian_sarge_p4" onclick="pageTracker._trackPageview('/outgoing/www.howtoforge.com/perfect_setup_debian_sarge_p4?referer=');">A tutotial including a postfix/courier-imap installation</a></li>
</ul>
<h5>Mail Stories posts</h5>
<ul>
<li><a href="/2009/03/16/Mail-Story-1%3A-Debian-Postfix-%28SMTP%29-Courier-%28IMAP%29-SSL/">Installing a mail server</a> (this post)</li>
<li><a href="/2009/03/23/Mail-Story-2%3A-RoundCube/">Installing a webmail</a></li>
<li><a href="/2009/03/30/Mail-Story-3%3A-SPF-Greylisting/">Spam reduction</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/16/mail-story-1-debian-postfix-smtp-courier-imap-ssl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using a Linux server for your Mac</title>
		<link>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/</link>
		<comments>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 22:00:00 +0000</pubDate>
		<dc:creator>laurent</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FLAC]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[firefly]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.desgrange.net/?p=650</guid>
		<description><![CDATA[Time Machine Server One great feature introduced in Mac OS X 10.5 (Leopard) is Time Machine. Time Machine is a backup/restore system. As a lot of backup systems it creates an incremental backup. You can create your backup to an attached hard drive, a Time Capsule or an Xserve. If, like me, you would like [...]]]></description>
			<content:encoded><![CDATA[<h5>Time Machine Server</h5>
<p>One great feature introduced in <a hreflang="en" href="http://en.wikipedia.org/wiki/Mac_OS_X" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Mac_OS_X?referer=');">Mac OS X 10.5 (Leopard)</a> is <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_Machine_(Apple_software)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_Machine_Apple_software?referer=');">Time Machine</a>.</p>
<p><a hreflang="en" href="http://www.apple.com/macosx/features/timemachine.html" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/macosx/features/timemachine.html?referer=');">Time Machine</a> is a backup/restore system. As a lot of backup systems it creates an incremental backup. You can create your backup to an attached hard drive, a <a hreflang="en" href="http://en.wikipedia.org/wiki/Time_Capsule_(Apple)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Time_Capsule_Apple?referer=');">Time Capsule</a> or an <a hreflang="en" href="http://en.wikipedia.org/wiki/Xserve" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Xserve?referer=');">Xserve</a>.</p>
<p>If, like me, you would like to backup your Mac on a Linux server, there is a solution. It&#8217;s not perfect yet, but so far (I&#8217;m using it for a week now) it&#8217;s working quite well.</p>
<p>I followed the instruction written on <a hreflang="fr" href="http://blog.delacelle.com/post/2009/01/19/tuto-comment-creer-votre-serveur-timecapsule-sous-debian-ou-ubuntu/" onclick="pageTracker._trackPageview('/outgoing/blog.delacelle.com/post/2009/01/19/tuto-comment-creer-votre-serveur-timecapsule-sous-debian-ou-ubuntu/?referer=');">how to create a Time Machine Server on Debian</a> (it&#8217;s in french), which is mostly a translation of this article on <a hreflang="en" href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/" onclick="pageTracker._trackPageview('/outgoing/www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/?referer=');">how to create a Time Machine Server on Ubuntu</a> (in english).</p>
<p>It&#8217;s quite easy, you just have to follow instructions. Some tips:</p>
<ul>
<li>On my <a hreflang="en" href="http://en.wikipedia.org/wiki/Debian" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Debian?referer=');">Debian</a> installation there&#8217;s a problem with <code>cracklib2-dev</code> package, I just had to install <code>libcrack2-dev</code> instead.</li>
<li>Don&#8217;t copy/paste the XML file from the tutorial&#8217;s french version (the blog&#8217;s style sheet messed up the quotes).</li>
<li>If you have to manually create a sparse bundle disk image, it seems that the size is the size of your &#8220;virtual&#8221; backup drive. For instance, I have 300 GB available on my server, I selected 200 GB as image size, so Time Machine should not use all the space available on my server but restrict itself to 200 GB (I hope so, it&#8217;s not clear as Time Machine is still telling me that my hard drive is about 1.3 TB with 300 GB available, but the sparse bundle disk image is telling me that there is 200 GB with 100 GB available (I already have 100 GB of backup)).</li>
<li>On <a hreflang="en" href="http://www.debian.org/" onclick="pageTracker._trackPageview('/outgoing/www.debian.org/?referer=');">Debian</a>, doing an update will erase your home made <code>netatalk</code> package. In order to prevent that you can use the following command (see <a hreflang="en" href="http://www.debian-administration.org/articles/67" onclick="pageTracker._trackPageview('/outgoing/www.debian-administration.org/articles/67?referer=');">Preventing Debian package upgrades</a>):</li>
</ul>
<pre># echo "netatalk hold" | dpkg --set-selections</pre>
<p>I said it was not perfect because from time to time Time Machine failed while backuping, so I have to launch a new backup (ok, it&#8217;s just 2 clicks). The other problem is that my home folder is encrypted with <a hreflang="en" href="http://en.wikipedia.org/wiki/FileVault" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/FileVault?referer=');">FileVault</a>. In that case Time Machine does not backup my home folder when I&#8217;m connected. When I logoff, FileVault do some stuff then my home folder is backuped. But now with a remote backup, the backup part is not done anymore. I have to connect with an other account and launch a backup.</p>
<h5>iTunes Server</h5>
<p>Like a lot of <a hreflang="en" href="http://en.wikipedia.org/wiki/Macintosh" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Macintosh?referer=');">Mac</a> users, I&#8217;m using <a hreflang="en" href="http://en.wikipedia.org/wiki/ITunes" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes?referer=');">iTunes</a> to listen to my music. The overall software is quite good but there are several things that are just wrong. By default <a hreflang="en" href="http://www.apple.com/itunes/" onclick="pageTracker._trackPageview('/outgoing/www.apple.com/itunes/?referer=');">iTunes</a> is only able to read <a hreflang="en" href="http://en.wikipedia.org/wiki/MP3" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MP3?referer=');">mp3</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Apple_Inc." onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Apple_Inc.?referer=');">Apple</a>&#8216;s own audio <a hreflang="en" href="http://en.wikipedia.org/wiki/Codec" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Codec?referer=');">codecs</a>. I convert all my <a hreflang="en" href="http://en.wikipedia.org/wiki/CD" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/CD?referer=');">CD</a>s to <a hreflang="en" href="http://en.wikipedia.org/wiki/Free_Lossless_Audio_Codec" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Free_Lossless_Audio_Codec?referer=');">FLAC</a> because it&#8217;s a <a hreflang="en" href="http://en.wikipedia.org/wiki/Lossless_data_compression" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Lossless_data_compression?referer=');">lossless</a> and <a hreflang="en" href="http://en.wikipedia.org/wiki/Open_source" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Open_source?referer=');">open source</a> codec.</p>
<p>The other problem I have is that my <a hreflang="en" href="http://en.wikipedia.org/wiki/MacBook" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/MacBook?referer=');">MacBook</a> has a small hard drive so I can&#8217;t keep all my music on it (especially if encoded in <a hreflang="en" href="http://flac.sourceforge.net/index.html" onclick="pageTracker._trackPageview('/outgoing/flac.sourceforge.net/index.html?referer=');">FLAC</a>).</p>
<p>The solution is to use <a hreflang="en" href="http://en.wikipedia.org/wiki/Firefly_Media_Server" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Firefly_Media_Server?referer=');">Firefly</a> and have it sharing my music on my local network. The music is decoded by <a hreflang="en" href="http://www.fireflymediaserver.org/" onclick="pageTracker._trackPageview('/outgoing/www.fireflymediaserver.org/?referer=');">Firefly</a> then sent over the network, so iTunes doesn&#8217;t have to know how to decode the original file.</p>
<p>Installing Firefly on Debian is quite easy:</p>
<pre>$ sudo apt-get install mt-daapd</pre>
<p>Then edit <code>/etc/mt-daapd.conf</code> in order to configure it a bit. There is also a web interface to configure Firefly, connect on your server on port 3689 with your web browser (the main thing you have to set is the directory where your music is).</p>
<p>Now open iTunes, you should see a Firefly share in the left panel:</p>
<p><a href="http://blog.desgrange.net/wp-content/uploads/2009/03/firefly.png"><img class="aligncenter size-full wp-image-875" title="firefly" src="http://blog.desgrange.net/wp-content/uploads/2009/03/firefly.png" alt="" width="242" height="44" /></a></p>
<p>Some drawbacks with this method. On iTunes you only see remote playlists, so some functionalities are not working anymore (changing songs <a hreflang="en" href="http://en.wikipedia.org/wiki/Metadata" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Metadata?referer=');">metadata</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/Genius_(iTunes)" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/Genius_iTunes?referer=');">genius</a>, <a hreflang="en" href="http://en.wikipedia.org/wiki/ITunes#Sound_processing" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/ITunes_Sound_processing?referer=');">sound check</a>, creating your own local playlist from the remote one, copying a song to your <a hreflang="en" href="http://en.wikipedia.org/wiki/IPod" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPod?referer=');">iPod</a>/<a hreflang="en" href="http://en.wikipedia.org/wiki/IPhone" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/IPhone?referer=');">iPhone</a> (retrieving a song in local)).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.desgrange.net/2009/03/01/using-a-linux-server-for-your-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

