Install your Own-Mailbox on your RaspberryPi

Reading time ~3 minutes

Install your Own-Mailbox on your RaspberryPi

Install your Own-Mailbox on your RaspberryPi

Own-Mailbox is a personal email server you can run in your own home, with strong privacy protection measures integrated at its core. It provides self-hosted email addresses, and allows you to protect the content of your emails, and the meta-data, from mass surveillance. I will describe here how I installed it on RPi3 with Docker.

1 Install Linux on RPi3

First of all we need to install some version of Linux on our RPi. I tried Ubuntu MATE and it was great. Instructions for downloading and writing it on microSDHC are here: I preferred the terminal way:

sudo apt-get install gddrescue xz-utils
unxz ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img.xz
sudo ddrescue -D --force ubuntu-mate-16.04-desktop-armhf-raspberry-pi.img /dev/sdx

Once the microSDHC is ready, we can put it on RPi3 and power it on. Of course, we also need to attach a keyboard, mouse and TV display to it. Once it is booted, it will start the configuration of the system (asking for a username and password, etc.). When this is done, we should also resize the partition in order to make full use of the microSHDC card capacity, as described on the page above. I did it from the terminal:

sudo su
echo 'd,2,n,p,2,,,w' | tr ',' '\n' | fdisk /dev/mmcblk0

The next thing to do is to update/upgrade the system, since there may be any security patches:

sudo su
apt-get update
apt-get upgrade

I also install vim and aptitude on every new system:

apt-get install vim aptitude

2 Make the box headless

A headless computer is one that does not have a monitor and is accessed and managed from the network. For this to work, it needs to have a fixed IP address (instead of a random one given by a DHCP server), so that we know where to access it. Besides this it also needs a SSH server and a VNC server, which allow us to access it remotely.

This article shows how to edit the network connections in order to set a fixed IP: On the tab IPv4 Settings you should also set a manual fixed IP, like, instead of the dynamic configuration.

From the GUI you can also set a fixed IP for the wired connection. But I prefer to do it from the terminal. I edit the file /etc/network/interfaces and append lines like these:

auto enxb827eb3c62f4
iface enxb827eb3c62f4 inet static
iface enxb827eb3c62f4 inet static

Here enxb827eb3c62f4 is the name of the network interface, which has changed on ubuntu 16.04 (it was something like eth0 previously).

Let's install also openssh-server and tightvncserver.

apt-get install openssh-server
apt-get install tightvncserver

After rebooting, we can access the box through wifi or a cable like this: ssh user@ (wifi), or ssh user@ or ssh user@

For a headless box (as RPi usually is) we should also disable the GUI: graphical disable and reboot. Dispite this, we can still access its GUI desktop remotely through VNC. This can be done by starting first a vnc server (and setting a password) with the command: vncserver. We can access the vnc desktop with a command like this: vncviewer (We may need to install it with aptitude install vncviewer, in case it is not installed.)

3 Install Docker

I installed Docker following the instructions from this article:

echo "overlay" | sudo tee -a /etc/modules
sudo apt-get install -y apt-transport-https
wget -q -O - | sudo apt-key add -
echo 'deb wheezy main' | sudo tee /etc/apt/sources.list.d/hypriot.list
sudo apt-get update
sudo apt-get install -y docker-hypriot
sudo systemctl enable docker

Checking the version of docker:

# docker version
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.4.3
 Git commit:   5604cbe
 Built:        Mon May  9 00:50:14 2016
 OS/Arch:      linux/arm

 Version:      1.11.1
 API version:  1.23
 Go version:   go1.4.3
 Git commit:   5604cbe
 Built:        Mon May  9 00:50:14 2016
 OS/Arch:      linux/arm

4 Install Own-Mailbox

git clone omb
cd omb/
./ build
./ create
./ install

Then you can access the web interface at the address

Date: 2016-10-15

Author: Dashamir Hoxha

Created: 2019-01-24 Thu 05:13

Emacs 25.1.1 (Org mode 8.2.10)


OpenPGP Web Key Directory

OpenPGP Web Key DirectoryOpenPGP Web Key DirectoryTable of Contents1. Introduction2. How WKD works3. Building a WKD3.1. Create the direct...… Continue reading

SMTP Server with LDAP Authentication

Published on April 17, 2021

Using WireGuard VPN

Published on November 09, 2020