DEV Community

Remigus Tochukwu
Remigus Tochukwu

Posted on

How to setup Billionmail and host it on AWS.

How I setup Billionmail, Hosted It on AWS, and Sent My First Email: A Step-by-Step Journey

Building your own email server from scratch isn’t easy — but it’s incredibly rewarding. In this article, I’ll walk you through how I created Billionmail, hosted it on Amazon Web Services (AWS), and successfully sent my first custom email.

From domain registration to server configuration, SMTP setup, troubleshooting, and that final moment of success — this is a transparent, honest account of every step, including the challenges I faced and how I overcame them.

I also want to dedicate this journey to my mentor, Paschal Ogu, whose immense support and guidance helped make this possible.

Step 1: Registering a Domain on Whogohost

To begin, I purchased a domain name — the foundation of any custom email server.

  • I went to Whogohost and searched for a suitable and cheap domain for my brand.
  • After payment, I gained access to the domain management dashboard.
  • I took note of the DNS settings, which I’d later need to configure Billionmail properly.
  • Prepared to point my domain to my AWS server

Outcome: Domain registered and ready to connect to a mail server.

Step 2: Downloading Billionmail from the Official Website

Next, I headed to the Billionmail website to get the actual codebase.

  • Located and copied the download link or source code.
  • Went to my AWS Live Server and used terminal commands to download Billionmail directly.
  • Extracted and reviewed the downloaded files to understand the configuration.

cd /opt && git clone https://github.com/aaPanel/BillionMail && cd BillionMail && bash install.sh

Outcome: Billionmail codebase downloaded and ready for deployment.

Step 3: Hosting Billionmail on AWS EC2 and Configuring Domain

To host Billionmail, I launched an EC2 instance (Ubuntu Server) on AWS.

a. EC2 Setup

  • Created a new EC2 instance.
  • Chose security groups to open required ports:
    • 22 (SSH), 80 (HTTP), 443 (HTTPS), 25, 587, and 465 (SMTP).
  • Logged in via SSH to set up the environment.

ssh -i mykey.pem ubuntu@

b. Linking My Domain to AWS

  • Went back to Whogohost DNS settings.
  • Added:
    • An A Record pointing to the EC2 public IP.
    • An MX Record for mail delivery.
    • SPF, DKIM, and DMARC records for email verification and spam protection.
  • Waited for DNS propagation to complete.

Outcome: Billionmail was publicly accessible under my domain name. The server was now live.

Step 4: Setting Up SMTP with Gmail (and Why It Failed)

With the server up, I attempted to set up SMTP using my Gmail account to send emails.

  • Input Gmail SMTP credentials in the Billionmail settings.
  • Tried sending a test email.

Issue: The email failed to send.

Root Cause:

  • Postfix, the core mail transfer agent on my server, wasn’t properly configured.
  • Gmail SMTP is also restrictive when used outside authorized apps.

Step 5: Troubleshooting Billionmail and Updating the Server

To fix the issue, I returned to the EC2 instance for troubleshooting and do system updates.

Actions Taken:

  1. Opened my server terminal and switch to root or sudo enabled user (sudo -i)
  2. Enter Billionmail Mgt console directory (adjust if installed elsewhere) cd /opt/Billionmail
  3. Pull latest code and update (bm update)
  4. Restarted the server and services: bm restart
  5. Check the upgrade status of mail services: bm status
  6. Updated Billionmail to the latest version (2.1):
    • Used provided update scripts or downloaded the latest version from the official source.
    • Replaced core files while keeping existing configs intact.
  7. Edited configuration files:
  8. Opened the HTTP configuration file:
  9. sudo nano /etc/apache2/sites-available/000-default.conf
  10. Verified the domain, mail routes, and authentication setup.

Outcome: All core services were updated and running on Billionmail v2.1.

Step 6: Creating a Sample Email and Sending My First Message

Since Gmail SMTP didn’t work, I decided to bypass it completely and create a sample custom email account directly on the Billionmail server.

What I Did:

  • Created noreply@billionmail.com.ng within Billionmail's user management.
  • Set up internal routing via Postfix.
  • Sent a test email from my new address.

Success! My first email was sent directly from the Billionmail server, using my domain and custom SMTP.

🙏 A Special Thank You

None of this would have been possible without the immense help and mentorship of Paschal Ogu. His guidance through the configuration issues, mail server best practices, and troubleshooting techniques helped me overcome every roadblock.

Thank you, Paschal, for your support and patience throughout this journey!

Key Takeaways

  • Buying a domain is just the beginning — DNS setup and record management are just as important.
  • AWS EC2 gives you full control over your server environment.
  • Postfix is essential for sending mail, and its configuration requires attention to detail.
  • Using Gmail SMTP for custom mail servers is not always ideal — a native setup is more flexible.
  • Persistence and mentorship are your greatest assets during setup and troubleshooting.

Tools Used

Tool Purpose
Whogohost Domain registration
AWS EC2 Server hosting
Billionmail Email platform
Postfix Mail transfer agent
Apache Web server
SSH/Nano Server access and file editing

At first I thought it was an impossible task but I had to challenge myself. Building your own mail server might sound tough but with patience, the right tools, and good mentorship, you can achieve it. 100%.

Top comments (0)