<?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>wlallemand.info</title>
	<atom:link href="http://wlallemand.irq6.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://wlallemand.irq6.net</link>
	<description>sekh&#039;s blog</description>
	<lastBuildDate>Fri, 13 Jan 2012 10:44:45 +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>Tips: Pipe command with find -exec</title>
		<link>http://wlallemand.irq6.net/2011/04/22/tips-pipe-command-with-find-exec/</link>
		<comments>http://wlallemand.irq6.net/2011/04/22/tips-pipe-command-with-find-exec/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 19:37:09 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=281</guid>
		<description><![CDATA[Sometimes, you need to pipe several commands with find -exec, you can do it using the sh command! Example: 1find . -exec sh -c 'cat $0 &#124; rot13 &#124; grep -q toto' {} \; -print]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you need to pipe several commands with find -exec, you can do it using the sh command!</p>

<p>Example:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find . -exec sh -c 'cat $0 | rot13 | grep -q toto' {} \; -print</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2011/04/22/tips-pipe-command-with-find-exec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips: Encrypt chromium passwords with gnome-keyring</title>
		<link>http://wlallemand.irq6.net/2011/03/12/tips-encrypt-chromium-passwords-with-gnome-keyring/</link>
		<comments>http://wlallemand.irq6.net/2011/03/12/tips-encrypt-chromium-passwords-with-gnome-keyring/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 09:28:29 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[encryption]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=271</guid>
		<description><![CDATA[Chromium allows you to encrypt website password using the gnome-keyring, the feature isn&#8217;t in the manual. 1$ chromium-browser --password-store=gnome]]></description>
			<content:encoded><![CDATA[<p>Chromium allows you to encrypt website password using the gnome-keyring, the feature isn&#8217;t in the manual.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ chromium-browser --password-store=gnome</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2011/03/12/tips-encrypt-chromium-passwords-with-gnome-keyring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype + minbif on Debian.</title>
		<link>http://wlallemand.irq6.net/2011/02/25/skype-minbif-on-debian/</link>
		<comments>http://wlallemand.irq6.net/2011/02/25/skype-minbif-on-debian/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 00:25:40 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Non classé @en]]></category>
		<category><![CDATA[minbif]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=210</guid>
		<description><![CDATA[I will explain to you my ugly method to use skype with minbif. Indeed, skype is a proprietary protocol, and we can only use the API of the Qt client for that hack. We must use it with a virtual &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2011/02/25/skype-minbif-on-debian/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I will explain to you my ugly method to use skype with minbif.</p>

<p>Indeed, skype is a proprietary protocol, and we can only use the API of the Qt client for that hack.
We must use it with a virtual X server, Xvfb.</p>

<p>On the remote server:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># aptitude install xvfb x11vnc<br />
# dpkg -i skype-debian_2.1.0.81-1_i386.deb<br />
# apt-get -f install<br />
# aptitude install minbif<br />
# usermod -s /bin/bash minbif<br />
# sudo su minbif<br />
$ export DISPLAY=:25<br />
$ Xvfb :25 -screen 0 1024x768x16 &amp;<br />
$ skype &amp;<br />
$ x11vnc -bg</div></td></tr></tbody></table></div>

<p>On your local computer:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ssh server -L 5900:localhost:5900</div></td></tr></tbody></table></div>

<p>Next on your local computer:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ xvncviewer localhost</div></td></tr></tbody></table></div>

<p>You must accept the license and enter your login/password, then activate the autologin.
You can now use your graphical skype client over VNC.</p>

<p>On the remote server:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ killall x11vnc<br />
$ killall skype<br />
$ killall Xvfb</div></td></tr></tbody></table></div>

<p>You must edit the config.xml, after minbif can access to the skype API.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ vim /var/lib/minbif/.Skype/YOURACCOUNT/config.xml<br />
&nbsp; &lt;UI&gt;<br />
&nbsp; &nbsp; &lt;API&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;Authorizations&gt;(null)&lt;/Authorizations&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;BlockedPrograms&gt;&lt;/BlockedPrograms&gt;<br />
&nbsp; &nbsp; &lt;/API&gt;<br />
&nbsp; &lt;/UI&gt;<br />
&lt;/config&gt;</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># usermod -s /bin/false minbif</div></td></tr></tbody></table></div>

<p>Now you must install skype4pidgin with Xvfb.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># aptitude install pidgin-dev</div></td></tr></tbody></table></div>

<p>I use revision 579</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn checkout -r 579 http://skype4pidgin.googlecode.com/svn/trunk/ skype4pidgin<br />
gcc -I/usr/include/libpurple `pkg-config --libs purple x11` -DPURPLE_PLUGINS -DENABLE_NLS -DUSE_XVFB_SERVER -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib64/glib-2.0/include -I/usr/include -I. -g -pipe libskype.c -o libskype.so -shared -fPIC -DPIC<br />
cp libskype.so /usr/lib/purple-2/</div></td></tr></tbody></table></div>

<div>Log on minbif</div>

<div>If everything is ok, you can speak to &#8220;echo123&#8243; </div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ps aux | grep minbif<br />
minbif &nbsp; &nbsp;6764 &nbsp;0.0 &nbsp;2.0 &nbsp;10248 &nbsp;5440 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;14:15 &nbsp; 0:01 Xvfb :25 -ac -terminate -tst -xinerama -render -shmem -screen 0 320x240x16<br />
minbif &nbsp; &nbsp;6766 &nbsp;0.4 13.8 &nbsp;80096 36328 ? &nbsp; &nbsp; &nbsp; &nbsp;Sl &nbsp; 14:15 &nbsp; 1:00 skype --pipelogin -display :25<br />
minbif &nbsp; 10342 &nbsp;0.3 &nbsp;0.6 &nbsp;12368 &nbsp;1580 ? &nbsp; &nbsp; &nbsp; &nbsp;Ss &nbsp; 15:38 &nbsp; 0:29 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf<br />
minbif &nbsp; 14203 &nbsp;9.5 &nbsp;4.8 &nbsp;86264 12616 ? &nbsp; &nbsp; &nbsp; &nbsp;Sl &nbsp; 17:31 &nbsp; 1:05 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf<br />
minbif &nbsp; 14232 &nbsp;0.4 &nbsp;1.8 &nbsp;85680 &nbsp;4964 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;17:31 &nbsp; 0:03 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2011/02/25/skype-minbif-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype (skype4pidgin) + minbif, ou comment utiliser l&#8217;IM skype dans votre irssi.</title>
		<link>http://wlallemand.irq6.net/2010/05/13/skype-skype4pidgin-minbif-ou-comment-utiliser-lim-skype-dans-votre-irssi/</link>
		<comments>http://wlallemand.irq6.net/2010/05/13/skype-skype4pidgin-minbif-ou-comment-utiliser-lim-skype-dans-votre-irssi/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:48:45 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Non classé]]></category>
		<category><![CDATA[minbif]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=158</guid>
		<description><![CDATA[Vous savez surement que j&#8217;utilise minbif pour la messagerie instantanée. Mais il y a un protocole que j&#8217;utilise régulièrement pour la messagerie instantanée entre autre, et que je n&#8217;ai jamais pensé à intégré dans minbif, il s&#8217;agit de Skype. Ce &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2010/05/13/skype-skype4pidgin-minbif-ou-comment-utiliser-lim-skype-dans-votre-irssi/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Vous savez surement que j&#8217;utilise minbif pour la messagerie instantanée. Mais il y a un protocole que j&#8217;utilise régulièrement pour la messagerie instantanée entre autre, et que je n&#8217;ai jamais pensé à intégré dans minbif, il s&#8217;agit de Skype.</p>

<p>Ce que je vous propose ici et une solution bien moche, en effet, skype est un protocole propriétaire, nous allons devoir utiliser le binaire skype, le lancer et passer par son API.</p>

<p>Cependant ce binaire ne propose pas de solution en console, il va falloir lancer skype en mode graphique, et le minbif étant sur un serveur, celà pose problème. La solution: utiliser Xvfb, un &#8220;fake&#8221; serveur X.</p>

<p>Voici la procédure que j&#8217;ai utilisé</p>

<p>Sur la machine distance :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># aptitude install xvfb x11vnc<br />
# dpkg -i skype-debian_2.1.0.81-1_i386.deb<br />
# apt-get -f install<br />
# aptitude install minbif<br />
# usermod -s /bin/bash minbif<br />
# sudo su minbif<br />
$ export DISPLAY=:25<br />
$ Xvfb :25 -screen 0 1024x768x16 &amp;<br />
$ skype &amp;<br />
$ x11vnc -bg</div></td></tr></tbody></table></div>

<p>Puis sur votre machine locale :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ssh server -L 5900:localhost:5900</div></td></tr></tbody></table></div>

<p>Et également en local :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ xvncviewer localhost</div></td></tr></tbody></table></div>

<p>Vous pouvez alors accepter les conditions d&#8217;utilisation, entrer votre login/password et activer l&#8217;autologin.
Votre client skype devrait-être fonctionnel en graphique.</p>

<p>Sur la machine distante :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ killall x11vnc<br />
$ killall skype<br />
$ killall Xvfb</div></td></tr></tbody></table></div>

<p>On modifie le fichier config.xml pour donner l&#8217;accès de minbif à l&#8217;API skype, tout à la fin:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ vim /var/lib/minbif/.Skype/VOTRECOMPTE/config.xml<br />
&nbsp; &lt;UI&gt;<br />
&nbsp; &nbsp; &lt;API&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;Authorizations&gt;(null)&lt;/Authorizations&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;BlockedPrograms&gt;&lt;/BlockedPrograms&gt;<br />
&nbsp; &nbsp; &lt;/API&gt;<br />
&nbsp; &lt;/UI&gt;<br />
&lt;/config&gt;</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># usermod -s /bin/false minbif</div></td></tr></tbody></table></div>

<p>Maintenant il faut compiler le plugin skype4pidgin avec le mode Xvfb :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># aptitude install pidgin-dev</div></td></tr></tbody></table></div>

<p>j&#8217;utilise la révision 579</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">svn checkout http://skype4pidgin.googlecode.com/svn/trunk/ skype4pidgin<br />
gcc -I/usr/include/libpurple `pkg-config --libs purple x11` -DPURPLE_PLUGINS -DENABLE_NLS -DUSE_XVFB_SERVER -Wall -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib64/glib-2.0/include -I/usr/include -I. -g -pipe libskype.c -o libskype.so -shared -fPIC -DPIC<br />
cp libskype.so /usr/lib/purple-2/</div></td></tr></tbody></table></div>

<div>Connectez vous à minbif, ajoutez un compte skype</div>

<div>Normalement si tout se passe bien, vous devriez voir se connecter echo123 et pouvoir faire des tests en lui parlant.</div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ ps aux | grep minbif<br />
minbif &nbsp; &nbsp;6764 &nbsp;0.0 &nbsp;2.0 &nbsp;10248 &nbsp;5440 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;14:15 &nbsp; 0:01 Xvfb :25 -ac -terminate -tst -xinerama -render -shmem -screen 0 320x240x16<br />
minbif &nbsp; &nbsp;6766 &nbsp;0.4 13.8 &nbsp;80096 36328 ? &nbsp; &nbsp; &nbsp; &nbsp;Sl &nbsp; 14:15 &nbsp; 1:00 skype --pipelogin -display :25<br />
minbif &nbsp; 10342 &nbsp;0.3 &nbsp;0.6 &nbsp;12368 &nbsp;1580 ? &nbsp; &nbsp; &nbsp; &nbsp;Ss &nbsp; 15:38 &nbsp; 0:29 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf<br />
minbif &nbsp; 14203 &nbsp;9.5 &nbsp;4.8 &nbsp;86264 12616 ? &nbsp; &nbsp; &nbsp; &nbsp;Sl &nbsp; 17:31 &nbsp; 1:05 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf<br />
minbif &nbsp; 14232 &nbsp;0.4 &nbsp;1.8 &nbsp;85680 &nbsp;4964 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp;17:31 &nbsp; 0:03 /usr/bin/minbif --pidfile /var/run/minbif/minbif.pid /etc/minbif/minbif.conf</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2010/05/13/skype-skype4pidgin-minbif-ou-comment-utiliser-lim-skype-dans-votre-irssi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Bash et fonctionnalités réseaux</title>
		<link>http://wlallemand.irq6.net/2010/03/29/bash-et-fonctionnalites-reseaux/</link>
		<comments>http://wlallemand.irq6.net/2010/03/29/bash-et-fonctionnalites-reseaux/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 09:31:31 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[epitech]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[netsoul]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=135</guid>
		<description><![CDATA[Ce week-end j&#8217;ai mis à jour netsoul-purple. Création de packages debian, corrections&#8230; Et ce matin en me levant je me suis demandé : Mais combien de personnes utilisent netsoul-purple ? Est-il utilisé ? J&#8217;ai donc décidé de faire un petit &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2010/03/29/bash-et-fonctionnalites-reseaux/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Ce week-end j&#8217;ai mis à jour netsoul-purple. Création de packages debian, corrections&#8230;</p>

<p>Et ce matin en me levant je me suis demandé : Mais combien de personnes utilisent netsoul-purple ? Est-il utilisé ?</p>

<p>J&#8217;ai donc décidé de faire un petit script en bash pour compter les utilisateurs.</p>

<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">&lt;&gt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>tcp<span style="color: #000000; font-weight: bold;">/</span>ns-server.epita.fr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4242</span><br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;list_users&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">9</span><br />
<span style="color: #007800;">numbers</span>=<span style="color: #000000;">0</span><br />
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> line <span style="color: #000000; font-weight: bold;">&lt;&amp;</span><span style="color: #000000;">9</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp; <span style="color: #007800;">ns</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$line</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> netsoul<span style="color: #000000; font-weight: bold;">%</span>2dpurple <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp; <span style="color: #007800;">quit</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$line</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;rep 002 -- cmd end&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$ns</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$ns</span><br />
&nbsp; &nbsp; <span style="color: #007800;">numbers</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #007800;">$numbers</span>+<span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$quit</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #7a0874; font-weight: bold;">break</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">fi</span>;<br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">&lt;&amp;</span>-<br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span>-<br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Result: <span style="color: #007800;">$numbers</span>&quot;</span></div></td></tr></tbody></table></div>

<p>Voilà un parfait exemple de comment initialiser une connexion TCP et la lire avec bash.
Par la suite il serait intéressant de faire des graphs RRD avec le résultat.</p>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2010/03/29/bash-et-fonctionnalites-reseaux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minbif, la messagerie instantanée facile.</title>
		<link>http://wlallemand.irq6.net/2009/07/21/minbif-la-messagerie-instantanee-facile/</link>
		<comments>http://wlallemand.irq6.net/2009/07/21/minbif-la-messagerie-instantanee-facile/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 23:18:49 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[autre]]></category>
		<category><![CDATA[bitlbee]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[minbif]]></category>
		<category><![CDATA[netsoul]]></category>
		<category><![CDATA[pidgin]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=74</guid>
		<description><![CDATA[Utilisant de nombreux protocoles différents, Jabber, AIM, MSN, pour ne citer qu&#8217;eux, j&#8217;ai toujours souhaité utiliser un  client multi-protocole. J&#8217;ai essayé de nombreuses solutions, Tout d&#8217;abord il y eut GAIM, client multiprotocole en C/GTK+, on se plaindra surtout à l&#8217;époque &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2009/07/21/minbif-la-messagerie-instantanee-facile/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Utilisant de nombreux protocoles différents, Jabber, AIM, MSN, pour ne citer qu&#8217;eux, j&#8217;ai toujours souhaité utiliser un  client multi-protocole.</p>

<p>J&#8217;ai essayé de nombreuses solutions,</p>

<p>Tout d&#8217;abord il y eut GAIM, client multiprotocole en C/GTK+, on se plaindra surtout à l&#8217;époque de son manque de fonctionnalité pour chaque protocole.</p>

<p>Avec l&#8217;essort du protocol jabber, vit le jour des passerelles vers les autres protocoles, certaines efficaces, d&#8217;autre non, je retiendrais surtout avoir été victime de beaucoup de problèmes techniques au niveau du serveur pour quelque chose d&#8217;utilisable.</p>

<p>Un fork de gaim vit le jour, <a href="http://www.bitlbee.org" target="_blank">bitlbee</a>, proposant quelque chose d&#8217;intéressant, une passerelle IRC vers les protocoles utilisé par GAIM. Cependant le projet ne mergera pas les sources de GAIM régulièrement, il restera assez pauvre au niveau des fonctionnalités, bien que pratique !</p>

<p>GAIM se renomma ensuite en pidgin, <a href="http://www.pidgin.im/" target="_blank">Pidgin</a> est une interface graphique utilisant la libpurple pour se connecter aux différents IM.</p>

<p>Puis vint <a href="http://symlink.me/wiki/minbif" target="_blank">Minbif</a>, reprenant la même idée que bitlbee, celui-ci utilise cependant la libpurple, permettant d&#8217;utiliser tous les plugins que nous souhaitons (notamment <a href="http://code.google.com/p/msn-pecan/" target="_blank">msn-pecan </a>pour un meilleur support de MSN, et <a href="http://projects.irq6.net/projects/show/netsoul-purple" target="_blank">netsoul-purple</a> pour notre protocole favoris à l&#8217;école). <a href="http://symlink.me/wiki/minbif" target="_blank">Minbif</a> permet donc d&#8217;utiliser toute la libpurple au travers d&#8217;une passerelle IRC.</p>

<p>Bien que encore en développement, Minbif est désormais mon client de Messagerie Instantanée fêtiche !
N&#8217;hésitez pas à l&#8217;essayer et à faire des rapports de bugs !</p>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2009/07/21/minbif-la-messagerie-instantanee-facile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netsoul-Purple</title>
		<link>http://wlallemand.irq6.net/2009/07/20/netsoul-purple/</link>
		<comments>http://wlallemand.irq6.net/2009/07/20/netsoul-purple/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 20:22:05 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[epitech]]></category>
		<category><![CDATA[netsoul]]></category>

		<guid isPermaLink="false">http://wlallemand.irq6.net/?p=69</guid>
		<description><![CDATA[Il est un protocole que tout Epitechiens connait, il s&#8217;agit de l&#8217;immonde^W^Wdu merveilleux protocole de messagerie instantanée de l&#8217;école, j&#8217;ai nommé Netsoul. Bien plus qu&#8217;un simple protocole de messagerie, celui-ci permet de vous identifier sur le PIE, de surveiller vos &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2009/07/20/netsoul-purple/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Il est un protocole que tout Epitechiens connait, il s&#8217;agit de l&#8217;immonde^W^Wdu merveilleux protocole de messagerie instantanée de l&#8217;école, j&#8217;ai nommé Netsoul. Bien plus qu&#8217;un simple protocole de messagerie, celui-ci permet de vous identifier sur le PIE, de surveiller vos temps de log pour que vous travailliez bien&#8230; Bref le protocol Netsoul est indispensable à toute personne qui veut travailler à l&#8217;école.</p>

<p>Il existe un plugin netsoul pour pidgin nommé <a href="http://sourceforge.net/projects/gaim-netsoul/" target="_blank">gaim-netsoul</a> qui n&#8217;est plus maintenu.</p>

<p>Je vous propose donc ma version, j&#8217;ai nommé <a href="http://projects.irq6.net/projects/show/netsoul-purple" target="_blank">netsoul-purple</a>, corrigeant segfaults et désagréments notoires !</p>

<p>Je vous invite bien entendu à créer des tickets pour tout bug (car il en reste plein) et toute demande de fonctionalité !</p>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2009/07/20/netsoul-purple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La virtualisation avec KVM sous debian</title>
		<link>http://wlallemand.irq6.net/2008/04/10/la-virtualisation-avec-kvm-sous-debian/</link>
		<comments>http://wlallemand.irq6.net/2008/04/10/la-virtualisation-avec-kvm-sous-debian/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 15:11:57 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.wlallemand.info/?p=54</guid>
		<description><![CDATA[On a toujours besoin de tester ses configurations sur une machine qui n&#8217;est pas en prod, il y a encore peu, je testais tout sur du matériel de récupération que j&#8217;accumulais chez moi. Mais il arrive un moment dans la &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2008/04/10/la-virtualisation-avec-kvm-sous-debian/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>On a toujours besoin de tester ses configurations sur une machine qui n&#8217;est pas en prod, il y a encore peu, je testais tout sur du matériel de récupération que j&#8217;accumulais chez moi. Mais il arrive un moment dans la vie où il faut se débarasser de tout ce vieux matériel (une petite amie, un déménagement, ou je ne sais quoi <img src='http://wlallemand.irq6.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). Bref, des machines ça prend de la place, et j&#8217;essaie désormais d&#8217;en avoir le moins possible.</p>

<p>Pour notre plus grand bonheur, Intel et AMD ont implémenté dans les derniers processeurs des technologies de virtualisation ! On voit alors fleurir sur le net, de multiples applications opensource (ou pas) utilisant ces technologies, comme par exemple, KVM, Xen.</p>

<p>J&#8217;ai choisi d&#8217;utiliser KVM et non Xen, en effet, ce dernier n&#8217;est pas compatible avec les dernières versions du kernel linux, ce qui est un peu génant pour moi, en effet, ma carte mère n&#8217;est pas pleinement supportée avec un 2.6.18.</p>

<p>On commence d&#8217;abord par installer kvm et son module kernel, sous debian, pour les autres je vous laisse chercher :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;# apt-get install kvm<br />
&nbsp;# module-assistant<br />
&nbsp;# modprobe kvm<br />
&nbsp;# modprobe kvm-intel ( ou kvm-amd )</div></td></tr></tbody></table></div>

<p>N&#8217;oubliez pas de vérifier que votre processeur est compatible avec la virtualisation, et que cette option est activée dans le BIOS <img src='http://wlallemand.irq6.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> 
Il devient alors assez simple de créer une machine virtuelle. On créer tout d&#8217;abord le fichier qui va la contenir :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;$ kvm-img create file.qcow2 -f qcow2 5G</div></td></tr></tbody></table></div>

<p>Ceci créera une image de 5 gigas.
Vous souhaitez alors installer une debian (par exemple) sur ce disque virtuel, il suffira de donner en paramètre l&#8217;image iso du CD de cette façon :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ kvm -m 512 -cdrom debian-40r3-i386-businesscard.iso \<br />
-boot d -hda file.qcow2</div></td></tr></tbody></table></div>

<p>Vous procédez alors à une installation classique d&#8217;une debian <img src='http://wlallemand.irq6.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>Tout ça est bien joli, ou presque, mais vous ne pouvez pas accéder à votre machine virtuelle depuis le réseau, et inversement, ce qui n&#8217;est pas réellement pratique si vous souhaitez vous servir de votre machine virtuelle comme serveur.</p>

<p>En supposant qu&#8217;il y ait un serveur dhcp sur le réseau, nous allons configurer votre machine en tant que bridge, pour qu&#8217;elle puisse faire circuler le réseau vers les VMs.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># apt-get install bridge-utils uml-utilities</div></td></tr></tbody></table></div>

<p>Il vous faut alors modifier votre configuration réseau dans /etc/network/interfaces:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">auto lo eth0<br />
iface lo inet loopback</div></td></tr></tbody></table></div>

<p>commentez cette ligne:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#iface eth0 inet dhcp<br />
auto br0<br />
iface br0 inet dhcp<br />
bridge_ports eth0<br />
bridge_stp off<br />
bridge_maxwait 5<br />
&lt;/code<br />
ATTENTION: vos VMs vont communiquer sur le réseau physique avec une adresse MAC virtuelle ! Celà peut ne pas fonctionner si vos switchs restreignent les adresses MAC.<br />
<br />
On relance ensuite le réseau de cette façon :<br />
&lt;code&gt;<br />
/etc/init.d/networking restart</div></td></tr></tbody></table></div>

<p>Si plus rien ne marche, c&#8217;est que vous devez adapter le fichier interfaces en fonction de votre réseau <img src='http://wlallemand.irq6.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>Nous allons ensuite configurer le script de démarrage de kvm, de façon à ce qu&#8217;il associe le tunnel que nous allons créer en le lançant, avec le bridge, pour celà il faut juste modifier le fichier /etc/kvm/kvm-ifup:</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; #!/bin/sh<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; switch=$(ip route ls | awk '/^default / { for(i=0;i&amp;lt;NF;i++) { if ($(i) == &quot;dev&quot;) print $(i+1) }}')<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; sudo /sbin/ifconfig $1 0.0.0.0 up<br />
&nbsp; &nbsp; sudo /usr/sbin/brctl addif ${switch} $1<br />
&nbsp; &nbsp; exit 0</div></td></tr></tbody></table></div>

<p>vous pouvez ensuite lancer votre VM de cette façon :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; kvm -m 512 &nbsp;-net nic,vlan=0 \<br />
&nbsp; &nbsp; -net tap,vlan=0,ifname=`sudo tunctl -b -u $USER` file.qcow2</div></td></tr></tbody></table></div>

<p>Lorsque vous l&#8217;aurez quitté, je vous conseille de supprimer les interfaces tap que tuncl a créé, à coup de :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; $ sudo tunectl -d tap0</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2008/04/10/la-virtualisation-avec-kvm-sous-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation d’OpenWRT sur un ASUS WL-500GP</title>
		<link>http://wlallemand.irq6.net/2007/02/16/installation-dopenwrt-sur-un-asus-wl-500gp/</link>
		<comments>http://wlallemand.irq6.net/2007/02/16/installation-dopenwrt-sur-un-asus-wl-500gp/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 16:25:55 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://wlallemand.info/blog/?p=83</guid>
		<description><![CDATA[J&#8217;ai acquis récemment un routeur wifi ASUS WL-500GP, tout geek que je suis, je me suis empressé de le passer sous OpenWRT. Voici donc la procédure que j&#8217;ai suivi ! Inspiré notamment de la documentation officielle d&#8217;OpenWRT. Installation par TFTP &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2007/02/16/installation-dopenwrt-sur-un-asus-wl-500gp/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai acquis récemment un routeur wifi ASUS WL-500GP, tout geek que je suis, je me suis empressé de le passer sous OpenWRT. Voici donc la procédure que j&#8217;ai suivi ! Inspiré notamment de la <a href="http://wiki.openwrt.org/OpenWrtDocs/Hardware/Asus/WL500GP">documentation officielle </a>d&#8217;OpenWRT.</p>

<h3>Installation par TFTP</h3>

<ul>
    <li>Téléchargez le firmware pour Broadcom BCM947XX, pour ma part j&#8217;ai choisi un <a href="http://xwrt.kicks-ass.org/xwrt/firmware_images/whiterussian/0.9/milestone-2.73/default/openwrt-brcm-2.4-squashfs.trx">firmware xwrt</a> afin de ne pas avoir à installer l&#8217;interface de gestion web</li>
    <li>Configurez votre carte réseau en 192.168.1.2 netmask 255.255.255.0 et branchez  le sur une des prises LAN</li>
    <li>Retirez le cordon d&#8217;alimentation</li>
    <li>Restez appuyé sur le bouton noir &#8220;Restore&#8221;</li>
    <li>Remettre le cordon d&#8217;alimentation</li>
    <li>Attendre que la LED POWER clignote pour pouvoir arrêter d&#8217;appuyez , vous êtes alors en &#8220;diag mode&#8221;</li>
    <li>On upload alors le firmware par TFTP

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#tftp 192.168.1.1<br />
binary<br />
rexmt 1<br />
timeout 60<br />
trace<br />
Packet tracing on.<br />
tftp&amp;gt; put openwrt-xxx-x.x-xxx.bin</div></td></tr></tbody></table></div>

</li>
    <li>Lorsque le transfert est terminé on attend 6 minutes (je ne sais pas vraiment à quoi ça sert mais il parait que si on attends pas assez on casse le routeur)</li>
    <li>On peut alors débrancher/rebrancher le routeur pour le rebooter (celui ci ne reboot pas automatiquement après changement de firmware)</li>
    <li>On accède alors au routeur par telnet, ssh, ou par l&#8217;interface web selon le firmware.</li>
    <li>On active ensuite les 32MB de RAM sous telnet ou ssh (uniquement sur les versions PREMIUM, sinon celà casse votre routeur)

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nvram set sdram_init=0x0009<br />
nvram set sdram_ncdl=0x208<br />
nvram commit<br />
reboot</div></td></tr></tbody></table></div>

</li>
</ul>

<h3>La machine</h3>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root@OpenWrt:~$ cat /proc/cpuinfo<br />
system type &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : Broadcom BCM947XX<br />
processor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 0<br />
cpu model &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : BCM3302 V0.6<br />
BogoMIPS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: 263.78<br />
wait instruction &nbsp; &nbsp; &nbsp; &nbsp;: no<br />
microsecond timers &nbsp; &nbsp; &nbsp;: yes<br />
tlb_entries &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : 32<br />
extra interrupt vector &nbsp;: no<br />
hardware watchpoint &nbsp; &nbsp; : no<br />
VCED exceptions &nbsp; &nbsp; &nbsp; &nbsp; : not available<br />
VCEI exceptions &nbsp; &nbsp; &nbsp; &nbsp; : not available</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root@OpenWrt:~$ cat /proc/meminfo<br />
total: &nbsp; &nbsp;used: &nbsp; &nbsp;free: &nbsp;shared: buffers: &nbsp;cached:<br />
Mem: &nbsp;31248384 13135872 18112512 &nbsp; &nbsp; &nbsp; &nbsp;0 &nbsp;1323008 &nbsp;5079040</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2007/02/16/installation-dopenwrt-sur-un-asus-wl-500gp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How-To Debian Sarge: Postfix + SASL + MySQL + PostfixAdmin + Courier + VirtualDomain</title>
		<link>http://wlallemand.irq6.net/2006/11/18/how-to-debian-sarge-postfix-mysql-postfixadmin-courier-virtualdomain/</link>
		<comments>http://wlallemand.irq6.net/2006/11/18/how-to-debian-sarge-postfix-mysql-postfixadmin-courier-virtualdomain/#comments</comments>
		<pubDate>Sat, 18 Nov 2006 00:34:50 +0000</pubDate>
		<dc:creator>sekh</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[courier]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://wlallemand.info/blog/?p=68</guid>
		<description><![CDATA[Le problème est le suivant, nous souhaitons héberger de nombreux domaines sur une machine que nous nommerons ici serveur.domaine.com, cette machine doit servir de serveur SMTP pour ces domaines, ainsi que de serveur IMAP, le tout administré à l&#8217;aide de &#8230;<p class="read-more"><a href="http://wlallemand.irq6.net/2006/11/18/how-to-debian-sarge-postfix-mysql-postfixadmin-courier-virtualdomain/">Read more &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Le problème est le suivant, nous souhaitons héberger de nombreux domaines sur une machine que nous nommerons ici serveur.domaine.com, cette machine doit servir de serveur SMTP pour ces domaines, ainsi que de serveur IMAP, le tout administré à l&#8217;aide de PostfixAdmin. Cependant postfix doit être un minimum sécurisé : mots de passe md5 dans la bdd et chroot.</p>

<h3>Mise en place de MySQL</h3>

<p>Nous allons d&#8217;abord installer les bases MySQL qui nous permettrons de stocker les comptes utilisateurs et les domaines ! Pour celà il suffit de suivre l&#8217;installation de postfixadmin, téléchargeons donc les sources de postfixadmin.</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /var/www/<br />
tar -zxvf postfixadmin-2.1.0.tgz<br />
cd postfixadmin-2.1.0<br />
mysql -u root -p &amp;lt; DATABASE_MYSQL.TXT</div></td></tr></tbody></table></div>

<p>Voilà à présent vous avez installé la base de donnée MySQL postfix, à savoir que l&#8217;utilisateur postfix aura comme mot de passe postfix, n&#8217;oubliez pas de le changer par la suite ! Vous pouvez également installer cette base sur un serveur MySQL distant ! Cependant pour des questions de sécurité, il sera judicieux d&#8217;utiliser un socket unix en local.</p>

<h3>Installation de postfixadmin</h3>

<p>On édite alors le fichier de configuration de postfixadmin :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mv config.inc.php.sample config.inc.php</div></td></tr></tbody></table></div>

<p>editor config.inc.phpOn modifie alors les variables pour le serveur local. Sans oublier :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$CONF['encrypt'] = 'md5crypt';<br />
$CONF['domain_path'] = 'YES';<br />
$CONF['domain_in_mailbox'] = 'YES';</div></td></tr></tbody></table></div>

<p>Se référer ensuite au fichier INSTALL.TXT !</p>

<p>On modifiera aussi le fichier /var/www/postfixadmin/admin/.htaccess</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AuthUserFile /var/www/postfixadmin/admin/.htpasswd<br />
AuthGroupFile /dev/null<br />
AuthName &quot;Postfix Admin&quot;<br />
AuthType Basic</div></td></tr></tbody></table></div>

<p>require valid-userPuis on redéfinit le mot de passe à l&#8217;aide de la commande</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># htpasswd -b /var/www/postfixadmin/admin/.htpasswd admin motdepasse</div></td></tr></tbody></table></div>

<p>Vérifiez que le fichier .htaccess est interprété  ! Si ce n&#8217;est pas le cas, vérifiez la variable AllowOverride  dans votre configuration apache !</p>

<h3>Installation et configuration de postfix</h3>

<p>On install postfix et son extension postfix-mysql à l&#8217;aide d&#8217;un</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#apt-get install postfix postfix-mysql</div></td></tr></tbody></table></div>

<p>On indiquera lors de la configuration automatique, une configuration &#8220;Site Internet&#8221;.</p>

<p>On crée d&#8217;abord le dossier où seront stocké les maildirs :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mkdir /var/mail/virtual<br />
# chown -R 1001:1001 /var/mail/virtual<br />
# chmod -R 771 /var/mail/virtual</div></td></tr></tbody></table></div>

<p>On modifie ensuite la configuration de postfix en ajoutant ceci au /etc/postfix/main.cf</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf<br />
virtual_gid_maps = static:1001<br />
virtual_mailbox_base = /var/mail/virtual<br />
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf<br />
virtual_mailbox_limit = 51200000<br />
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf<br />
virtual_minimum_uid = 1001<br />
virtual_transport = virtual<br />
virtual_uid_maps = static:1001<br />
# Additional for quota support<br />
virtual_create_maildirsize = yes<br />
virtual_mailbox_extended = yes<br />
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_limit_maps.cf<br />
virtual_mailbox_limit_override = yes<br />
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.<br />
virtual_overquota_bounce = yes</div></td></tr></tbody></table></div>

<p>On crée ensuite le dossier dans lequel sera stocké les maps :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mkdir /etc/postfix/mysql/<br />
# cd /etc/postfix/mysql/</div></td></tr></tbody></table></div>

<p>et on crée ensuite les fichiers :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql_virtual_alias_maps.cf</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = postfix<br />
hosts = 127.0.0.1<br />
dbname = postfix<br />
table = alias<br />
select_field = goto<br />
where_field = address<br />
<br />
mysql_virtual_domains_maps.cf<br />
<br />
user = postfix<br />
password = postfix<br />
hosts = 127.0.0.1<br />
dbname = postfix<br />
table = domain<br />
select_field = domain<br />
where_field = domain<br />
#additional_conditions = and backupmx = '0' and active = '1'<br />
<br />
mysql_virtual_mailbox_maps.cf<br />
<br />
user = postfix<br />
password = postfix<br />
hosts = 127.0.0.1<br />
dbname = postfix<br />
table = mailbox<br />
select_field = maildir<br />
where_field = username<br />
#additional_conditions = and active = '1'<br />
<br />
mysql_virtual_mailbox_limit_maps.cf</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">user = postfix<br />
password = postfix<br />
hosts = 127.0.0.1<br />
dbname = postfix<br />
table = mailbox<br />
select_field = quota<br />
where_field = username<br />
#additional_conditions = and active = '1'</div></td></tr></tbody></table></div>

<p>Les valeurs de l&#8217;hosts ont été mises à 127.0.0.1 et non pas à localhost pour contrer un problème dû au chroot !</p>

<p>Par ailleurs, il faut modifier les droits d&#8217;accés de l&#8217;utilisateur postfix pour ne pas avoir d&#8217;erreur !</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mysql -u root -p<br />
GRANT SELECT , INSERT , UPDATE , DELETE ON `postfix` . * TO 'postfix'@'%';</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># chmod -R 755 mysql/<br />
# chown -R root:root mysql/</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># /etc/init.d/postfix restart</div></td></tr></tbody></table></div>

<p>On devrait à partir de là obtenir un postfix qui fonctionne !</p>

<p>Pour tester : On crée un utilisateur avec postfixadmin, puis on crée une boite mail. Si tout se passe bien, la boite est crée dans /var/mail/virtual &#8230; sinon on observe les logs dans /var/log/mail.log</p>

<p>A partir de là nous avons un postfix configuré pour recevoir les mails fonctionnel</p>

<h3>Installation de Courier-IMAP Courier-POP !</h3>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">apt-get install courier-authmysql courier-imap courier-pop courier-authdaemon</div></td></tr></tbody></table></div>

<p>Nous allons maintenant configurer courier pour l&#8217;authentification avec la base MySQL de postfix !</p>

<p>On modifie pour celà le fichier /etc/courier/authdaemonrc</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">authmodulelist=&quot;authmysql&quot;</div></td></tr></tbody></table></div>

<p>Puis on édite la configuration de l&#8217;identification MySQL :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vim /etc/courier/authmysqlrc<br />
MYSQL_SERVER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;127.0.0.1<br />
MYSQL_USERNAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postfix<br />
MYSQL_PASSWORD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postfix</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MYSQL_OPT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0<br />
<br />
MYSQL_DATABASE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postfix<br />
MYSQL_USER_TABLE &nbsp; &nbsp; &nbsp; &nbsp;mailbox<br />
MYSQL_CRYPT_PWFIELD &nbsp; &nbsp; password<br />
<br />
MYSQL_UID_FIELD &nbsp; &nbsp; &nbsp; &nbsp; '1001'<br />
MYSQL_GID_FIELD &nbsp; &nbsp; &nbsp; &nbsp; '1001'<br />
MYSQL_LOGIN_FIELD &nbsp; &nbsp; &nbsp; username</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MYSQL_HOME_FIELD &nbsp; &nbsp; &nbsp; &nbsp;'/var/mail/virtual/'<br />
MYSQL_NAME_FIEL &nbsp; &nbsp; &nbsp; &nbsp; name<br />
MYSQL_MAILDIR_FIELD &nbsp; &nbsp; maildir</div></td></tr></tbody></table></div>

<p>Attention: N&#8217;utilisez que des tabulations, les espaces provoquent des erreurs d&#8217;identification ! cf /var/log/mail.log</p>

<p>on lance ensuite les services désirés :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/init.d/courier-authdaemon restart<br />
/etc/init.d/courier-imap restart<br />
/etc/init.d/courier-pop restart</div></td></tr></tbody></table></div>

<p>On teste ensuite la récupération des mails, en principe, ça marche.</p>

<h3>Authentification SASL SMTP</h3>

<p>Il existe plusieurs méthodes d&#8217;identification SASL avec postfix, mais notre problème est que nous voulons utiliser les mots de passe cryptés dans la base de donnée, et que nous ne voulons pas patché les packages par soucis de maintenance.</p>

<p>La meilleure solution que j&#8217;ai trouvé, est d&#8217;utiliser le daemon d&#8217;authentification de courier !</p>

<p>Pour celà on procéde d&#8217;abord à l&#8217;installation de SASL2</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#apt-get install postfix-tls &nbsp;sasl2-bin libsasl2 libsasl2-modules</div></td></tr></tbody></table></div>

<p>On doit ensuite permettre à postfix de voir le socket du daemon authdaemond, celui-ci étant dans un chroot, on va lier le socket dans le chroot</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mkdir -p /var/spool/postfix/var/run/courier/authdaemon/<br />
# ln /var/run/courier/authdaemon/socket /var/spool/postfix/var/run/courier/authdaemon/socket</div></td></tr></tbody></table></div>

<p>On crée ici un hard link du socket de authdaemon dans le chroot, cependant à chaque relance authdaemon il faudra refaire ce hard link, je vous recommande de modifier vos scripts d&#8217;init pour celà !</p>

<p>Maintenant on configure postfix pour l&#8217;authentification SASL, on crée d&#8217;abord un fichier /etc/postfix/sasl/smtpd.conf :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pwcheck_method: authdaemond<br />
log_level: 3<br />
mech_list: PLAIN LOGIN<br />
authdaemond_path:/var/run/courier/authdaemon/socket<br />
# ( en réalité /var/spool/postfix/var/run/courier/authdaemon/socket )</div></td></tr></tbody></table></div>

<p>et on ajoute à /etc/postfix/main.cf :</p>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination<br />
smtpd_sasl_auth_enable = yes<br />
smtpd_sasl_local_domain = $myhostname<br />
smtpd_sasl_security_options = noanonymous</div></td></tr></tbody></table></div>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/init.d/postfix restart</div></td></tr></tbody></table></div>

<p>Voilà, nous avons donc effectué une configuration rudimentaire, sachez que cette configuration n&#8217;est PAS SÉCURISÉE ! En effet, les mots de passes transitent en clair, et les restrictions laissent à désirer, dans un prochain article, je vous expliquerais comment améliorer tout ça !</p>

<p>N&#8217;oubliez pas de changer tous les mots de passe par défaut !</p>
]]></content:encoded>
			<wfw:commentRss>http://wlallemand.irq6.net/2006/11/18/how-to-debian-sarge-postfix-mysql-postfixadmin-courier-virtualdomain/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

