<?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>Ciaran&#039;s Random Writings &#187; XMPP</title>
	<atom:link href="http://ciarang.com/posts/category/software/xmpp/feed" rel="self" type="application/rss+xml" />
	<link>http://ciarang.com</link>
	<description>Random things I&#039;ve written about stuff</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:46:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Facebook, XMPP and a privacy leak</title>
		<link>http://ciarang.com/posts/facebook-xmpp-and-a-privacy-leak</link>
		<comments>http://ciarang.com/posts/facebook-xmpp-and-a-privacy-leak#comments</comments>
		<pubDate>Thu, 11 Feb 2010 21:35:10 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=873</guid>
		<description><![CDATA[It&#8217;s been in the works a long time, but Facebook have finally switched on their XMPP functionality. Suddenly something like 400m users inside the Facebook walled garden are contactable from the outside world. I don&#8217;t know if this makes it the largest single deployment of XMPP &#8211; Google may be in a position to argue [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been in the works a long time, but Facebook have finally switched on their XMPP functionality. Suddenly something like 400m users inside the Facebook walled garden are contactable from the outside world. I don&#8217;t know if this makes it the largest single deployment of XMPP &#8211; Google may be in a position to argue there, although I&#8217;ve sometimes been inclined to call their implementation almost-but-not-quite-XMPP.
<p><span id="more-873"></span></p>
<p>Connecting to Facebook&#8217;s server is as simple as adding a new account in your favourite client, with chat.facebook.com as the server and your Facebook username as the user. Obviously then, they&#8217;re only contactable from the outside world by people who have an account within the walled garden already, but it&#8217;s a start. Anyway, it&#8217;s handy for people like me who have an account there but, for reasons of taste, common sense, downright dislike of having adverts stuck in their face, etc., don&#8217;t ever log in to it.</p>
<p>My first impressions are that their implementation is solid and well thought out. This is to be expected &#8211; despite any other criticisms I might have, Facebook have always struck me as a very technically capable organisation. Only one small problem is apparent to me so far, and it&#8217;s this: Say Bob is on the Facebook web site and Alice is using her XMPP client. Bob is browsing through the messages on the &#8216;I Dress Up As A Goat and Eat My Wife&#8217;s Underwear&#8217; page, something he does regularly but (uncharacteristically, for a Facebook user) doesn&#8217;t want to tell the world about. At this point, Alice uses XMPP to send Bob a link to something on her web site. Bob clicks the link, and blam &#8211; his goat/underwear fetish is revealed in Alice&#8217;s server logs as the HTTP Referrer.</p>
<p>While I&#8217;m thinking of Facebook, something I&#8217;ve mentioned elsewhere but is worth repeating, is in relation to <a href="http://www.dailymail.co.uk/news/article-1244351/Police-probe-baby-cigarette-photo-posted-Facebook.html">this story</a>. Read the story, then look at the two images &#8211; in particular the copyright notice on those images. Do Facebook really claim copyright on those images, or have the Daily Mail got it wrong? Either way, it&#8217;s definitely something that should be making you go hmmmmm.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/facebook-xmpp-and-a-privacy-leak/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Microblog as an Information Hub</title>
		<link>http://ciarang.com/posts/the-microblog-as-an-information-hub</link>
		<comments>http://ciarang.com/posts/the-microblog-as-an-information-hub#comments</comments>
		<pubDate>Tue, 31 Mar 2009 16:22:59 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Laconica]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[StatusNet]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://ciarang.com/?p=655</guid>
		<description><![CDATA[Something that&#8217;s becoming obvious to me lately is the unintended suitability of a microblog to act as an information hub. To clarify the term microblog here, many may understand that as Twitter, but that would be a bad example because a) it&#8217;s both a single public instance of a microblog, and b) it doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Something that&#8217;s becoming obvious to me lately is the unintended suitability of a microblog to act as an information hub. To clarify the term microblog here, many may understand that as Twitter, but that would be a bad example because a) it&#8217;s both a single public instance of a microblog, and b) it doesn&#8217;t have all the capabilities that make this so interesting.</p>
<p>Therefore a good example of what I&#8217;m talking about would be a private instance of <a href="http://laconi.ca" class="broken_link">Laconica</a> running on a local network, or perhaps in a private setup on the public internet. I say private because some of the examples I&#8217;m going to give are most appropriate for a private setup.</p>
<p><span id="more-655"></span></p>
<p>So let&#8217;s consider some examples of information you might push to a microblog on a home network, each going to a different user account:
<ul>
<li>Security camera events</li>
<li>Music played</li>
<li><a href="http://projects.ciarang.com/p/toothspy">Bluetooth device presence monitoring</a> &#8211; i.e. who&#8217;s at home?</li>
<li>TV recording information &#8211; <a href="http://opensource.blogs.weloveit.info/?p=13" class="broken_link">e.g. from MythTV</a></li>
</ul>
<p>Some of the above would also apply to an internal company network. These ones definitely do: (my examples are biased towards a software development company)</p>
<ul>
<li>General news and announcements</li>
<li>Automated build process status</li>
<li>Bug tracker issues opened/closed/commented &#8211; <a href="http://micro.ciarang.com/laconicatrac">example</a></li>
<li>Automated QA test results</li>
<li>Version control commits</li>
<li>Birthdays, social events</li>
<li>Network/IT status &#8211; <a href="http://identi.ca/shstatus">example</a></li>
<li>Wiki/intranet changes</li>
<li>Local traffic/transport updates &#8211; <a href="http://identi.ca/traffichouston">example</a></li>
</ul>
<p>With these examples in mind why does a microblog, not designed for this purpose, lend itself so well to being a hub for all this information. And why have such a hub at all?</p>
<p>Firstly, from the user perspective, there are a wide variety of friendly ways of accessing all this information either in real time, on demand, or retrospectively, and all of these can be mixed and matched easily and simply. For example, subscribe via XMPP to things you need to know about in real time, grab RSS/Atom feeds for important but not real-time stuff, browse the via the web interface for others, and <a href="http://ciarang.com/posts/lacon-ical">integrate some into your calendar</a>. All kinds of other useful machine-readable information also come for free &#8211; microformats, RDF, FOAF, for example.</p>
<p>In addition to these methods, an ever expanding range of <a href="http://laconi.ca/trac/wiki/Apps" class="broken_link">desktop and mobile device clients</a> is available.</p>
<p>On the publishing side things are easy too because as well as a simple <a href="http://laconi.ca/trac/wiki/API" class="broken_link">API</a> for posting notices, there is already a range of ready-made tools for doing so. For example, many information sources already produce an RSS and/or Atom feed &#8211; these can be easily hooked up using <a href="http://ciarang.com/posts/feed2omb">feed2omb</a>. For sources that produce output in the form of emails, Laconica will accept those directly, and various solutions exist for SMS.</p>
<p>Amongst all the above machine generated data, you can intersperse the obligatory microblogging-style &#8220;Jill in accounts is eating an egg sandwich&#8221; trivia, or more seriously the &#8220;Jack is heading back from a meeting where the terms of the new contract with Acme Widgets were finalised&#8221;.</p>
<p>I think so far this is just scraping the surface of what&#8217;s possible. If you want to join in, the <a href="http://laconi.ca" class="broken_link">Laconica</a> software is Open Source and has deliberately low install dependencies to allow it to work on the widest range of possible platforms. Also of interest is the recently announced <a href="http://status.net/">status.net</a> which will soon be providing turnkey hosted Laconica instances, both public and private.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/the-microblog-as-an-information-hub/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compiling ejabberd 2.0 on Debian (Etch)</title>
		<link>http://ciarang.com/posts/compiling-ejabberd-20-on-debian-etch</link>
		<comments>http://ciarang.com/posts/compiling-ejabberd-20-on-debian-etch#comments</comments>
		<pubDate>Sat, 12 Jul 2008 17:57:21 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/?p=235</guid>
		<description><![CDATA[Etch has ejabberd 1.1 packaged but if you&#8217;re like me you&#8217;ll want to play with the new features in 2.0, in which case you&#8217;ll need to build from source. Etch&#8217;s packaged version of Erlang is apparently not up to date enough to support it (it compiles fine, but I couldn&#8217;t get TLS to work) so [...]]]></description>
			<content:encoded><![CDATA[<p>Etch has ejabberd 1.1 <a href="http://packages.debian.org/etch/ejabberd">packaged</a> but if you&#8217;re like me you&#8217;ll want to play with the new features in 2.0, in which case you&#8217;ll need to build from source. Etch&#8217;s packaged version of Erlang is apparently not up to date enough to support it (it compiles fine, but I couldn&#8217;t get TLS to work) so you&#8217;ll need to build a newer version of that as well. Luckly it&#8217;s all easy. This following is all from your home directory on a fresh install of Debian:</p>
<p><span id="more-235"></span></p>
<p>Stuff you need:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo apt-get install build-essential
sudo apt-get install libexpat1-dev zlib1g-dev libssl-dev
sudo apt-get install m4 libncurses5-dev</pre></div></div>

<p>Erlang:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">wget http://www.erlang.org/download/otp_src_R12B-3.tar.gz
tar -xzf otp_src_R12B-3.tar.gz
cd otp_src_R12B-3
./configure
make
sudo make install</pre></div></div>

<p>Ejabberd:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">wget http://www.process-one.net/downloads/ejabberd/2.0.1/ejabberd-2.0.1_2.tar.gz
tar -xzf ejabberd-2.0.1_2.tar.gz
cd ejabberd-2.0.1/src
./configure
make
sudo make install</pre></div></div>

<p>With that done just edit the config in /etc/ejabberd as required, generate or otherwise obtain an SSL certificate, and you&#8217;re ready to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/compiling-ejabberd-20-on-debian-etch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Debian test/dev setup</title>
		<link>http://ciarang.com/posts/virtual-debian-testdev-setup</link>
		<comments>http://ciarang.com/posts/virtual-debian-testdev-setup#comments</comments>
		<pubDate>Sat, 08 Sep 2007 07:47:43 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[ErlyWeb]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>
		<category><![CDATA[YAWS]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/index.php/archives/103</guid>
		<description><![CDATA[I decided to switch my multi-virtual machine test/dev setup over to a minimal Debian install, not least because I couldn&#8217;t keep my mind off the fact that I was carting around a full desktop installation along with various &#8216;pretty&#8217; desktop backgrounds, system administration for GUI-monkeys applications, and god knows what else. One batch of this [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to switch my multi-virtual machine test/dev setup over to a minimal Debian install, not least because I couldn&#8217;t keep my mind off the fact that I was carting around a full desktop installation along with various &#8216;pretty&#8217; desktop backgrounds, system administration for GUI-monkeys applications, and god knows what else. One batch of this stuff is bad enough, but repeated N times it&#8217;s too much for me to handle.</p>
<p><span id="more-103"></span></p>
<p>I also can&#8217;t help viewing those VMware &#8216;appliance&#8217; things with suspicion, and I&#8217;m starting to put real data on these things now, so I went for a clean install from debian-40r1-i386-netinst.iso. Doing the initial setup via the VMware Server console, viewed via VNC, is unbelievably painful but all that was needed after the actual install was to reconfigure the networking and install sshd before getting back to a nice clean SSH login.</p>
<p>I&#8217;m slightly cross with myself for not having scripted the rest of the setup yet, but on the other hand I&#8217;m pleased I was anal enough to document it all in the first place, because all I had to do was copy the commands out of my previous posts here and paste them into the SSH window to get back to where I was. I also set up Debian to use sudo, because I prefer that to using su.</p>
<p>The only differences in all the setup steps from the previous &#8216;doing X on Ubuntu&#8217; posts due to the change of distribution were:</p>
<ul>
<li>The m4 package was already installed.</li>
<li>Instead of libssl-dev, I needed openssl.</li>
<li>I left out the detail of how to fix ejabberdctl. (added as a comment to <a href="http://ciarang.com/index.php/archives/94">that post</a>)</li>
</ul>
<p>I didn&#8217;t go as far as the Mnesia data import stage, stopping instead after installing and testing Erlyweb, for reasons that will become apparent later. For the record, the steps were:</p>
<ul>
<li><a href="http://ciarang.com/index.php/archives/93">Erlang</a></li>
<li><a href="http://ciarang.com/index.php/archives/94">Ejabberd</a></li>
<li><a href="http://ciarang.com/index.php/archives/95">Jabberlang</a></li>
<li><a href="http://ciarang.com/index.php/archives/96">YAWS</a></li>
<li><a href="http://ciarang.com/index.php/archives/97">ErlyWeb</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/virtual-debian-testdev-setup/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adventures in Jabberlang</title>
		<link>http://ciarang.com/posts/adventures-in-jabberlang</link>
		<comments>http://ciarang.com/posts/adventures-in-jabberlang#comments</comments>
		<pubDate>Fri, 31 Aug 2007 23:35:33 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/index.php/archives/95</guid>
		<description><![CDATA[For part 3 of this &#8216;exciting&#8217; series, I&#8217;m adding Jabberlang onto the existing setup to provide easy access to two-way XMPP messaging. If I was just sending, I would have restricted myself to tinkering with the code that Sam Ruby kindly piped up with the other day. Similarly, if I was more serious about this [...]]]></description>
			<content:encoded><![CDATA[<p>For part 3 of this &#8216;exciting&#8217; <a href="http://ciarang.com/index.php/archives/94">series</a>, I&#8217;m adding <a href="http://support.process-one.net/doc/display/CONTRIBS/Jabberlang">Jabberlang</a> onto the existing setup to provide easy access to two-way XMPP messaging. If I was just sending, I would have restricted myself to tinkering with the code that <a href="http://intertwingly.net/blog/2007/08/27/XHTML-IM-over-TLS-via-Erlang">Sam Ruby</a> kindly piped up with the other day.</p>
<p><span id="more-95"></span></p>
<p>Similarly, if I was more serious about this I&#8217;d probably be writing my own XMPP client library, since Jabberlang currently leaves more than a bit to be desired. However, this is strictly a half-hour here and there evening hobby project &#8211; a refreshing interlude from the daily grind of watching an egg-timer float in front of Visual Studio 2005. As such, I don&#8217;t mind (for now) treading carefully around horrors such as this:</p>

<div class="wp_syntax"><div class="code"><pre class="erlang" style="font-family:monospace;"><span style="color: #45b3e6;">Message</span> <span style="color: #014ea4;">=</span> <span style="color: #ff4e18;">io_lib</span>:<span style="color: #ff3c00;">format</span><span style="color: #109ab8;">&#40;</span><span style="color: #ff7800;">&quot;&amp;lt;message to='~s' type='~s'&amp;gt;
  &amp;lt;body&amp;gt;~s&amp;lt;/body&amp;gt;&amp;lt;/message&amp;gt;&quot;</span><span style="color: #6bb810;">,</span><span style="color: #109ab8;">&#91;</span><span style="color: #45b3e6;">To</span><span style="color: #6bb810;">,</span> <span style="color: #45b3e6;">Type</span><span style="color: #6bb810;">,</span> <span style="color: #45b3e6;">Body</span><span style="color: #109ab8;">&#93;</span><span style="color: #109ab8;">&#41;</span></pre></div></div>

<p>By the way, if it hadn&#8217;t become obvious already, the purpose behind documenting all this is so I can go back and script it when I need to set up an array of identical machines.</p>
<p>So, back to the task at hand. It&#8217;s not easy to find a version of Jabberlang that works. I got fed up of trying to patch various problems in 0.2 caused by API changes in ejabberd (on which jabberlang depends), and moved on to trying to fix the broken build system in more recent SVN version. In the end though, I found a sweet-ish spot at revision 5:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #660033;">-r</span> <span style="color: #000000;">5</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.process-one.net<span style="color: #000000; font-weight: bold;">/</span>jabberlang<span style="color: #000000; font-weight: bold;">/</span>trunk jabberlang
<span style="color: #7a0874; font-weight: bold;">cd</span> jabberlang
erl <span style="color: #660033;">-pa</span> ebin <span style="color: #660033;">-make</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..</pre></div></div>

<p>Starting up Erlang to use this requires the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">EJABBERD_SO_PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ejabberd<span style="color: #000000; font-weight: bold;">/</span>priv<span style="color: #000000; font-weight: bold;">/</span>lib
erl <span style="color: #660033;">-pa</span> ..<span style="color: #000000; font-weight: bold;">/</span>jabberlang<span style="color: #000000; font-weight: bold;">/</span>ebin <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>ejabberd<span style="color: #000000; font-weight: bold;">/</span>ebin</pre></div></div>

<p>And just to prove it&#8217;s all working, a quick test program:</p>

<div class="wp_syntax"><div class="code"><pre class="erlang" style="font-family:monospace;"><span style="color: #014ea4;">-</span><span style="color: #5400b3;">module</span><span style="color: #109ab8;">&#40;</span>jerltest<span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">.</span>
<span style="color: #014ea4;">-</span><span style="color: #5400b3;">export</span><span style="color: #109ab8;">&#40;</span><span style="color: #109ab8;">&#91;</span>main<span style="color: #014ea4;">/</span><span style="color: #ff9600;">0</span><span style="color: #109ab8;">&#93;</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">.</span>
&nbsp;
<span style="color: #ff3c00;">main</span><span style="color: #109ab8;">&#40;</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">-&gt;</span>
   <span style="color: #109ab8;">&#123;</span>ok<span style="color: #6bb810;">,</span><span style="color: #45b3e6;">X</span><span style="color: #109ab8;">&#125;</span><span style="color: #014ea4;">=</span>xmpp:<span style="color: #ff3c00;">start</span><span style="color: #109ab8;">&#40;</span><span style="color: #ff7800;">&quot;ubuntu01&quot;</span><span style="color: #6bb810;">,</span><span style="color: #ff9600;">5222</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">,</span>
   xmpp:<span style="color: #ff3c00;">set_login_information</span><span style="color: #109ab8;">&#40;</span><span style="color: #45b3e6;">X</span><span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;test&quot;</span><span style="color: #6bb810;">,</span><span style="color: #109ab8;">&#123;</span>password<span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;pwd&quot;</span><span style="color: #109ab8;">&#125;</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">,</span>
   xmpp:<span style="color: #ff3c00;">connect</span><span style="color: #109ab8;">&#40;</span><span style="color: #45b3e6;">X</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">,</span>
   xmpp:<span style="color: #ff3c00;">subscribe</span><span style="color: #109ab8;">&#40;</span><span style="color: #45b3e6;">X</span><span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;ciaran@a.remote.server&quot;</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">,</span>
   xmpp:<span style="color: #ff3c00;">message</span><span style="color: #109ab8;">&#40;</span><span style="color: #45b3e6;">X</span><span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;ciaran@a.remote.server&quot;</span><span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;chat&quot;</span><span style="color: #6bb810;">,</span><span style="color: #ff7800;">&quot;Hello!&quot;</span><span style="color: #109ab8;">&#41;</span><span style="color: #6bb810;">.</span></pre></div></div>

<p>There was a fair amount of head-scratching involved in getting the XMPP Server to Server communication going, but it turned out to be just a question of some bad inbound routing on my firewall, which would have been obvious if it wasn&#8217;t for Erlang&#8217;s sometimes cryptic error handling and reporting. Everything is working nicely now though, and I&#8217;m nearly approaching the point where I can write some code instead of criticising someone else&#8217;s.</p>
<p>One more thing &#8211; why am I setting up an XMPP server on each machine when I&#8217;m sending the messages elsewhere? One reason is for fault tolerance. I want to deliver messages to the local server, free from potential network woes, and rely on that to deal with getting the message to the destination. I haven&#8217;t actually checked if ejabberd will do that in case of a network outage &#8211; it may well just spit the message straight back as a delivery failure &#8211; but it seems to me that it should work that way. I&#8217;ll find out soon enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/adventures-in-jabberlang/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Compiling ejabberd on Ubuntu</title>
		<link>http://ciarang.com/posts/compiling-ejabberd-on-ubuntu</link>
		<comments>http://ciarang.com/posts/compiling-ejabberd-on-ubuntu#comments</comments>
		<pubDate>Fri, 31 Aug 2007 19:31:26 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Erlang]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/index.php/archives/94</guid>
		<description><![CDATA[Following on my previous post, the next stage is to add an XMPP server to the setup, in the form of ejabberd. As before, all the commands given are executing from our home directory, and in every case ubuntu01 should be substituted with the hostname (fully qualified) of the machine. Before we start, a couple [...]]]></description>
			<content:encoded><![CDATA[<p>Following on my <a href="http://ciarang.com/index.php/archives/93">previous post</a>, the next stage is to add an XMPP server to the setup, in the form of <a href="http://www.process-one.net/en/ejabberd/">ejabberd</a>. As before, all the commands given are executing from our home directory, and in every case ubuntu01 should be substituted with the hostname (fully qualified) of the machine.</p>
<p><span id="more-94"></span></p>
<p>Before we start, a couple more pre-requisites in addition to the stuff we installed last time:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> subversion
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libexpat1-dev</pre></div></div>

<p>The next step is getting and compiling ejabberd. For reproducability, I&#8217;m grabbing a specific revision of the source from SVN, which at the time of writing is the current one anyway.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> <span style="color: #660033;">-r</span> <span style="color: #000000;">905</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.process-one.net<span style="color: #000000; font-weight: bold;">/</span>ejabberd<span style="color: #000000; font-weight: bold;">/</span>trunk
<span style="color: #c20cb9; font-weight: bold;">mv</span> trunk ejabberd
<span style="color: #7a0874; font-weight: bold;">cd</span> ejabberd<span style="color: #000000; font-weight: bold;">/</span>src
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..</pre></div></div>

<p>Generating and installing an SSL certificate:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-newkey</span> rsa:<span style="color: #000000;">1024</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">3650</span> \
   <span style="color: #660033;">-keyout</span> privkey.pem <span style="color: #660033;">-out</span> server.pem
openssl rsa <span style="color: #660033;">-in</span> privkey.pem <span style="color: #660033;">-out</span> privkey.pem
<span style="color: #c20cb9; font-weight: bold;">cat</span> privkey.pem <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> server.pem
<span style="color: #c20cb9; font-weight: bold;">rm</span> privkey.pem
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> server.pem <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ejabberd<span style="color: #000000; font-weight: bold;">/</span>ssl.pem</pre></div></div>

<p>Now we can configure and starting ejabberd. Before doing this, some of tinkering is required in /sbin/ejabberdctl to account for some issues in the Makefile. Specifically there is some confusion with the ROOTDIR variable, which I just removed completely. Some editing of ejabberd.cfg in /etc/ejabberd is also required, mainly to set the hostname and configure the S2S settings. Once this is done:

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> ejabberdctl start
ejabberdctl register admin ubuntu01 password</pre></div></div>

<p>Obviously replace <i>password</i> with an appropriate password. Next, edit ejabberd.cfg again and add a line to grant admin rights to the new admin user (it&#8217;s documented in the file), and restart ejabberd to allow the change to take effect:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ejabberdctl restart</pre></div></div>

<p>You can now test the web interface by going to http://ubuntu01:5280/admin in a browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/compiling-ejabberd-on-ubuntu/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>IMified</title>
		<link>http://ciarang.com/posts/imified</link>
		<comments>http://ciarang.com/posts/imified#comments</comments>
		<pubDate>Tue, 01 May 2007 08:02:00 +0000</pubDate>
		<dc:creator>CiaranG</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://blog.ciarang.com/index.php/archives/61</guid>
		<description><![CDATA[I&#8217;m testing an interesting service called IMified at the moment. It&#8217;s basically an Instant Messaging bot that provides access to various functionality by sending and receiving messages via your usual client. It works on all the major networks, although I&#8217;m only really interested in XMPP (Jabber). IMified provides a framework where new &#8216;Widgets&#8217; (essentially bot [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m testing an interesting service called <a href="http://www.imified.com">IMified</a> at the moment. It&#8217;s basically an Instant Messaging bot that provides access to various functionality by sending and receiving messages via your usual client. It works on all the major networks, although I&#8217;m only really interested in XMPP (Jabber).</p>
<p>IMified provides a framework where new &#8216;Widgets&#8217; (essentially bot applications) can be plugged in. There are a range of Widgets already available, covering things such as reminders and todo lists, as well as support for blog posting to a range of different platforms such as Wordpress and Livejournal (which I used to post this message).</p>
]]></content:encoded>
			<wfw:commentRss>http://ciarang.com/posts/imified/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

