User:Paul/sandbox/Install Mail-in-a-Box to local server on residential ISP

The Mail-in-a-Box (MiaB) project automatically installs and configures a robust and modern mail server while remaining very easy to configure for users already familiar with the command line and Ubuntu Server. The project is most commonly used in a VPS server, and can be used on local hardware, which this article covers.

Hardware can be very light. This admin has installed MiaB to an Atom D510 with 4GB RAM.

Download Ubuntu Server 18.04 and write the ISO to your preferred install media and boot to the target hardware.

Since the server will be used exclusively for MiaB, using the default options suggested by Ubuntu will be suitable for most applications.

The server name should not include any domains (e.g., just, not  ).

Since the Ubuntu project now prefers users download the 'Live' installation ISO, be sure the server is connected to the Internet, but make sure it is securely behind a firewall.

Near the end of the options selection, the installer offers the option to install SSH public keys from Launchpad or GitHub user profiles by entering the username.

Update packages: user@servername:~$ sudo apt update && sudo apt upgrade user@servername:~$ sudo reboot

Enable SSH password login: user@servername:~$ sudo nano /etc/ssh/sshd_config

Uncomment:

PasswordAuthentication yes

Log into Ubuntu using the password login.

Follow the instructions to configure SSH in the article Initialize VPS UNPM Server - Change login method section. It is not necessary to add a public key if that was performed during installation.

The  package currently generates an enormous number of log entries to the point of nearly being a malware. Check  for   entries:

user@servername:~$ grep ureadahead /var/log/syslog Jan 19 22:10:18 servername systemd[1]: Starting Stop ureadahead data collection... Jan 19 22:10:18 servername systemd[1]: Stopping Read required files in advance... Jan 19 22:10:18 servername systemd[1]: Started Stop ureadahead data collection. Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:dev: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:etc: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:modules-load.d: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:run: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:usr: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:local: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:lib: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:usr: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:lib: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:modules-load.d: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:lib: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:modules-load.d: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:sys: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:module: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:thermal: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:sys: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:module: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:r8169: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:sys: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:module: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:cpuidle: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:sys: Ignored relative path Jan 19 22:10:18 servername ureadahead[391]: ureadahead:module: Ignored relative path

If something similar to the above is printed, run the following:

user@servername:~$ sudo systemctl stop ureadahead.service user@servername:~$ sudo systemctl disable ureadahead.service user@servername:~$ sudo apt-get purge ureadahead.service user@servername:~$ sudo reboot

The  package is default installed though used for support cloud-related services. It can generate log noise and removing does not impact MiaB.

user@servername:~$ sudo touch /etc/cloud/cloud-init.disabled

Download and install MiaB. Note that the DH parameter, currently set for 2048 bits by the MiaB project, may take a while to calculate depending on hardware, though it is performed as the final step in the installation.

user@servername:~$ curl -s https://mailinabox.email/setup.sh | sudo -E bash

Set the email address as user@example.net, rather than whatever it recommends. Due to a bug, only use the letter, number, right arrow, left arrow, and backspace keys or else the installation will crash. If a subdomain besides box is preferred, be sure to change that in the hostname option.

Run  to