Extra Modules for Prosody: Instant Message Chat server for Raspberry Pi / Ubuntu

prosody.png This is part 2 of a 2 part tutorial on Prosody, which will show you how to install and configure extra modules to extend prosody's functionality. Part 1, which deals with basic installation and testing of prosody, is here. Here's an overview of the important additional functionality we will add to prosody:

  • Multi user chats (XEP-0045)
  • Server side message storage (XEP-0313 Message Archive Management)
  • File and image transfer (SI File Transfer and Jingle signalling; in-band and out-of-band methods)
  • Stream Management for surviving connection interruptions and switches - particularly useful on mobile (XEP-0198 Stream Management)
  • Synchronising messages between multiple devices (XEP-0280 Message Carbons)
  • Battery Saving techniques for mobile clients (XEP-00352 Client State Indication)
  • User Blocking (XEP-0191 Blocking Command)

Not all clients support all of these XEPs. I consider the Android client Conversations (F-Droid | Google Play) to be pretty cutting edge in this respect - it's pushing forward a lot of XEPs that are required if we are going to see XMPP compete with the features of proprietary chat clients, particularly on mobile.

Installing Prosody: Instant Message Chat server for Raspberry Pi / Ubuntu

prosody.png At the end of 2013, I wrote a series of tutorials explaining how to run an email server at home on a raspberry pi, which turned out to be very popular. I'm now aiming to do the same for instant messaging. This tutorial will:

  • Introduce the Extensible Messaging and Presence Protocol (XMPP), formerly known as "Jabber"
  • Discuss some of the pros and cons of XMPP vs some other proprietary protocols
  • Give instructions for the installation and configuration of Prosody, a free and open source XMPP server.
  • Discuss various important XMPP Extension Protocols (XEPs) and how to enable them
  • Cover transport layer encryption (i.e. client-server and server-server TLS) and end-to-end encryption for clients
  • Recommend client software for different platforms

Along the way, I'll expose the underlying protocol to give you the tools you need to debug the problem yourself, instead of relying on obscured error messages from GUI applications. This is part 1 of a 2 part tutorial. Part 2 can be found here.

DNS Basics for Websites and Email Servers

DNS-signpost.jpg This article aims to explain what various DNS records are and how to use them. It is aimed at people hosting websites and email servers on a home server such as a raspberry pi.

How DNS Works

DNS stands for Domain Name System. In a nutshell, it's the system that we use to translate human readable domain names (e.g. into the Internet Protocol (IP) addresses for those services (e.g. The DNS system has a strict hierarchy, and lookups are performed recursively using a client/server model. This means that when your computer asks for the IP address for "", the DNS resolver you are using starts at the top and works backwards to find the address. The servers at the top of the pyramid (root name servers) direct clients to the name servers reponsibe for Top Level Domains (TLD, e.g. .com), and that server in turn is able to tell the client which name server is authoritative for the second level domain (e.g., and so on. Usually for small sites, the DNS records for your domain are managed by your Domain Name Registrar. The DNS resolver doesn't have to perform all these lookups every time, because each record has a Time To Live (TTL) in seconds, which tells the client how long they can cache the information for until it should be refreshed. That's Time To Live (live free), not Live (live electrical circuit), which is how I first read it! There are loads of different types of DNS record, so I've picked the most important ones you might need or want to use. These are:

  1. DNS A - used to map a host name to an IP address
  2. Mail Exchanger (MX) - used to tell clients which hostnames are used for email services
  3. Sender Policy Framework (SPF) - used to define which servers are allowed to send email from your domain name
  4. Pointer (PTR) - the opposite of DNS A, this record maps an IP address to the hostname

For a website, you only need a DNS A record. For an email server, you need at least a DNS A record and an MX record; PTR and SPF records will help you get your email through spam filters. I'll be illustrating how to set up the different types of record using Namecheap, my Domain Name Registrar, as an example. If you haven't registered a domain name yet, I'd recommend Namecheap -avoid GoDaddy if you can, since they have some pretty horrible pricing practices and consistently back the wrong side when it comes to internet censorship acts like SOPA and PIPA.

A More Secure Wordpress Setup for Raspberry Pi

In my previous tutorial for installing Wordpress on a Raspberry Pi, I showed how to do a "quick and dirty" installation, by changing ownership of the whole Wordpress installation folder to the web server process (www-data). This gets the job done, because Wordpress is able to make changes to its own configuration files, themes and plugins.

Raspberry Pi Print & Scanner Server

Got a spare RasPi knocking around? Why not hook it up to your all-in-one and use it as a handy print and scanner server? I have previously tried to get my multifunction printer/scanner working with OpenWrt, but ran into difficulty with the scanner. Having tried it with the RasPi, I'm pleased to report that it's as easy as Pi ;) Print server capability is provided by the Common Unix Printing System (CUPS), and scanner capability is provided by Scanner Access Now Easy (SANE).

Raspberry Pi Email Server Part 5: Spam Sorting with LMTP & Sieve

This is the fifth and final part of a five part tutorial that will show you how to install a full featured email server on your Raspberry Pi. This tutorial covers how to automatically sort spam emails into the spam folder using Dovecot’s Local Mail Transfer Protocol (LMTP) and Sieve rules. The parts are: The Introduction & Contents Page (read first) Raspberry Pi Email Server Part 1: Postfix Raspberry Pi Email Server Part 2: Dovecot Raspberry Pi Email Server Part 3: Squirrelmail Raspberry Pi Email Server Part 4: Spam Detection with Spamassassin Raspberry Pi Email Server Part 5: Spam Sorting with LMTP & Sieve


If you followed the previous tutorial, you currently have an email server that automatically scans incoming emails using Spamassassin. However, in its current state, Spam and Ham alike are delivered to the inbox, which is annoying. Since Spamassassin only marks emails based on their spam score, we need to use an external program to handle sorting & delivery.

Raspberry Pi Server Preparation

Raspberry Pi Server This post is essentially a list of changes to the Pi’s default configuration that I would recommend you make before you start using the Pi as a server. These apply regardless of whether you want to use it as a mail server, an Owncloud machine, or a web server running something like WordPress. I’ll run you through the steps, starting with burning Raspbian to an SD card.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer