The next step to creating my lab is enabling email services. I decided to create my own email server by installing the open source email server iRedMail on an Ubuntu LXC. I chose iRedMail because of its simplicity to install, configure, and operate. This allows me to add email capabilities to the domain without purchasing software and without adding too much complexity to the build. I chose an LXC to minimize resource use.

Create My Own Email Server on an LXC

Prerequisites:

I used the same process as the Pi-Hole install to create the LXC in Proxmox. The specifications for the Email server are:

  • Name: mx
  • Template: Ubuntu 20.04 standard
  • Disk: 20GB
  • CPU Cores: 1
  • Memory: 1024MB / Swap: 1024MB
  • Network: DMZ-net with static IP address and MTU of 1450
  • DNS: DMZ Pi-Hole IP

After installing I ran the commands below to update, upgrade, confirm the hostname, and install dependencies.

# apt update && apt upgrade -y
# hostname -f
# apt install gzip dialog

Next, I downloaded iRedMail, renamed the file, uncompressed it, and ran the shell installer with these commands.

# wget https://github.com/iredmail/iRedMail/archive/tags/1.6.2.tar.gz
# mv 1.6.2.tar.gz iRedMail-1.6.2.tar.gz
# tar zxf iRedMail-1.6.2.tar.gz
# cd ./iRedMail-1.6.2.tar.gz
# bash iRedMail.sh

After running these commands, the installer will start.

iRedMail installer screen
iRedMail installer screen

When installing iRedMail I selected the following options:

  • Mailbox store: /var/vmail
  • Web server: Nginx
  • Backend: Postgres
  • Mail domain name: globomantics.local
  • Optional components:
    • Roundcube
    • netdata
    • iRedAdmin
    • Fail2ban

Then I just had to confirm the settings to install it.

Confirming the options and installing
Confirming options and installing

After the install finishes, I got a screen with the admin web page addresses and postmaster login information. I chose the next recommended option of reading the /root/iRedMail-x.y.z/iRedMail.tips file for more information. After that I just rebooted the server to enable email. The next step is to configure DNS for email services on my domain and login to test the email. That is the topic for my next post.