<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://julien.danjou.info/blog/index.php/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>jd:/dev/blog - Tag - mysql</title>
  <link>http://julien.danjou.info/blog/index.php/</link>
  <atom:link href="http://julien.danjou.info/blog/index.php/feed/tag/mysql/rss2" rel="self" type="application/rss+xml"/>
  <description>Julien Danjou's blog</description>
  <language>fr</language>
  <pubDate>Fri, 14 Nov 2008 16:30:23 +0100</pubDate>
  <copyright>All Right Reserved</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Boarding the Prometheus</title>
    <link>http://julien.danjou.info/blog/index.php/post/2008/05/16/Boarding-the-Prometheus</link>
    <guid isPermaLink="false">urn:md5:577fb957ed1ccf6af5cf26621292f593</guid>
    <pubDate>Sun, 18 May 2008 10:26:00 +0200</pubDate>
    <dc:creator>jd</dc:creator>
        <category>Naquadah Network</category>
        <category>amavisd-new</category><category>clamav</category><category>courier</category><category>dovecot</category><category>dspam</category><category>email</category><category>exim</category><category>mysql</category><category>naquadah</category><category>postfix</category><category>postfixadmin</category><category>postgresql</category><category>procmail</category><category>sieve</category><category>spamassassin</category>    
    <description>    &lt;p&gt;As I said a month ago, my main server &lt;em&gt;Delmak&lt;/em&gt; was dying. Well it still runs (proof: you could read this blog some days ago).&lt;/p&gt;


&lt;p&gt;Thanks to friends I host for free, they've kindly given enough money to buy a brand new server (C2D E8400, 4 GB RAM, 2x500 GB RAID 1) in order to replace the good old &lt;em&gt;Delmak&lt;/em&gt;.
&lt;img src=&quot;http://julien.danjou.info/blog/public/img/Prometheus_Stargate_Grace.jpg&quot; alt=&quot;Prometheus&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;This new box has been named &lt;em&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Tau%27ri_starships_in_Stargate#Prometheus&quot;&gt;Prometheus&lt;/a&gt;&lt;/em&gt; after the only &lt;em&gt;BC-303&lt;/em&gt; class battleship ever built.&lt;/p&gt;


&lt;p&gt;&lt;em&gt;Delmak&lt;/em&gt; was used to mainly run as a Web, mail and databases server. I decided to do use this server switch to change the server software I use.&lt;/p&gt;


&lt;p&gt;The first mail server I setup was based on &lt;em&gt;&lt;a href=&quot;http://www.exim.org&quot;&gt;Exim 3&lt;/a&gt;&lt;/em&gt;, &lt;em&gt;courier-{imap,pop}{-ssl,}&lt;/em&gt; with userdb files. That was... rough. Later I switched to &lt;em&gt;&lt;a href=&quot;http://www.exim.org&quot;&gt;Exim 4&lt;/a&gt;&lt;/em&gt;, using &lt;em&gt;&lt;a href=&quot;http://silverwraith.com/vexim/&quot;&gt;vexim&lt;/a&gt;&lt;/em&gt;, and &lt;em&gt;&lt;a href=&quot;http://www.mysql.org&quot;&gt;MySQL&lt;/a&gt;&lt;/em&gt; as a back-end. That was something like 3 years ago I guess. Since then I never really touched that back. I added &lt;em&gt;&lt;a href=&quot;http://www.spamassassin.apache.org&quot;&gt;spamassassin&lt;/a&gt;&lt;/em&gt; and &lt;em&gt;&lt;a href=&quot;http://www.clamav.net&quot;&gt;clamav&lt;/a&gt;&lt;/em&gt; filtering some months after, because some users asked for it. That's all.&lt;/p&gt;


&lt;p&gt;So this week, I decided to switch away from this configuration. I do not understand &lt;em&gt;Exim&lt;/em&gt; anymore anyway, so I decided to use &lt;em&gt;&lt;a href=&quot;http://www.postfix.org&quot;&gt;Postfix&lt;/a&gt;&lt;/em&gt; which I often use and administrate at work. Obviously, I also now use &lt;em&gt;&lt;a href=&quot;http://www.postgresql.org&quot;&gt;PostgreSQL&lt;/a&gt;&lt;/em&gt; as database back-end, since it rocks, and since &lt;em&gt;&lt;a href=&quot;http://postfixadmin.sourceforge.net/&quot;&gt;Postfixadmin&lt;/a&gt;&lt;/em&gt; supports it. By the way, be aware that the Debian package of &lt;em&gt;postfixadmin&lt;/em&gt; is crappy (the configuration file is readable by anyone by default, with the database password in it).
I also set up &lt;em&gt;&lt;a href=&quot;http://postgrey.schweikert.ch/&quot;&gt;postgrey&lt;/a&gt;&lt;/em&gt; which is quite nice and efficient.&lt;/p&gt;


&lt;p&gt;Well, then was time for &lt;em&gt;&lt;a href=&quot;http://www.ijs.si/software/amavisd/&quot;&gt;amavisd-new&lt;/a&gt;&lt;/em&gt; installation, but I did not do it. Seriously, &lt;em&gt;amavisd-new&lt;/em&gt; configuration is a bloody mess, as the language it is written in (yes, &lt;em&gt;&lt;a href=&quot;http://www.perl.org&quot;&gt;Perl&lt;/a&gt;&lt;/em&gt;).&lt;/p&gt;


&lt;p&gt;So I switched to &lt;em&gt;&lt;a href=&quot;http://dspam.nuclearelephant.com/&quot;&gt;dspam&lt;/a&gt;&lt;/em&gt; which I heard is nice. Well, it seems to be for now, since it even supports &lt;em&gt;clamav&lt;/em&gt; daemon usage directly, which is very very nice because that means I do not have to set up another thing for that.&lt;/p&gt;


&lt;p&gt;I also switched from &lt;em&gt;&lt;a href=&quot;http://www.courier-mta.org&quot;&gt;courier&lt;/a&gt;&lt;/em&gt; to &lt;em&gt;&lt;a href=&quot;http://www.dovecot.org&quot;&gt;dovecot&lt;/a&gt;&lt;/em&gt;, mainly because the latter seems to be faster and lighter. I then changed the default &lt;em&gt;virtual_transport&lt;/em&gt; to &lt;em&gt;&lt;a href=&quot;http://wiki.dovecot.org/LDA&quot;&gt;Dovecot LDA&lt;/a&gt;&lt;/em&gt;. The main advantage of this is that the LDA updates the &lt;em&gt;Dovecot&lt;/em&gt; index while delivering. It also supports quota, which I do not use and plug-ins, like the &lt;em&gt;&lt;a href=&quot;http://sieve.info/&quot;&gt;Sieve&lt;/a&gt;&lt;/em&gt; language for mail filtering.&lt;/p&gt;


&lt;p&gt;So I decided to change my &lt;em&gt;procmailrc&lt;/em&gt; to a new Sieve filter. My &lt;em&gt;procmailrc&lt;/em&gt; is quite small since I only use regex to match lists and some mail address, so it has only something like 12 rules.
And well, I did not do it since I discovered after some googling that &lt;em&gt;Dovecot&lt;/em&gt; implementation of &lt;em&gt;Sieve&lt;/em&gt; is grabbed from &lt;em&gt;Cyrus&lt;/em&gt; which does not support variables for now. That means that the following &lt;em&gt;procmailrc&lt;/em&gt; code:&lt;/p&gt;

&lt;pre&gt;
:0:
* ^X-Mailing-List: &amp;lt;debian-.+@lists.debian.org&amp;gt;
* ^X-Mailing-List: &amp;lt;debian-\/[^@]+
list-debian-$MATCH/
&lt;/pre&gt;


&lt;p&gt;which will translate to:&lt;/p&gt;

&lt;pre&gt;
require [ &amp;quot;regex&amp;quot;, &amp;quot;variables&amp;quot;, &amp;quot;fileinto&amp;quot; ]
if header :regex &amp;quot;X-Mailing-List&amp;quot; &amp;quot;&amp;lt;debian-(.+)@&amp;quot;
{
    fileinto &amp;quot;lists.debian.${1}&amp;quot;;
    stop;
}
&lt;/pre&gt;


&lt;p&gt;But that won't work since &lt;em&gt;Dovecot&lt;/em&gt; &lt;em&gt;Sieve&lt;/em&gt; implementation does not support &quot;variables&quot;. Well, since I'm not ready to list all the lists I'm subscribed to, &lt;em&gt;Sieve&lt;/em&gt; is a no-go for now. I'll stick with &lt;em&gt;procmail&lt;/em&gt;.&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Why you won't use MySQL/ndb</title>
    <link>http://julien.danjou.info/blog/index.php/post/2007/06/14/MySQL/ndb-shit</link>
    <guid isPermaLink="false">urn:md5:76106fc65a402bf2a7ff3e83766edc01</guid>
    <pubDate>Sun, 17 Jun 2007 11:25:00 +0200</pubDate>
    <dc:creator>jd</dc:creator>
        <category>Free Software</category>
        <category>bugs</category><category>debian</category><category>mysql</category><category>software</category>    
    <description>    &lt;p&gt;I just failed to migrate a big project at work because of that, the D day:&lt;/p&gt;


&lt;pre&gt;Jun 15 10:46:39 hostname mysqld[20095]: Version:'5.0.32-Debian_7etch1-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian etch distribution
Jun 15 10:46:43 hostname mysqld[20095]: mysqld got signal 11&lt;/pre&gt;


&lt;p&gt;So no, you won't use &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-overview.html&quot;&gt;NDB&lt;/a&gt;, at least with MySQL 5.0.31 (included in etch). It's _so_ buggy that we get a segfault on the first DELETE statement with a 30 MB database.&lt;/p&gt;


&lt;p&gt;Backporting version 5.0.41 from sid gives better results (at least for now).&lt;/p&gt;


&lt;p&gt;I knew we should have used PostgreSQL from the beginning...&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>