Skip to content

Debian Package Installation

This guide provides step-by-step instructions for installing Mailborder V6 on Debian or Ubuntu Linux using the official .deb package.

Before You Begin

Ensure you have completed the Installation Overview and verified all System Requirements.

Prerequisites: - Root or sudo access - Internet connectivity (for repository installation) - System fully updated - Static IP configured - Hostname configured (FQDN)

Installing from the Mailborder APT repository provides the easiest update path and automatic security patches.

Step 1: Add Mailborder Repository

First, add the Mailborder GPG key:

# Download and add repository signing key
wget -qO - https://repo.mailborder.com/gpg.key | sudo apt-key add -

Add the repository to your sources:

# Create repository configuration
echo "deb [arch=amd64] https://repo.mailborder.com/apt stable main" | \
  sudo tee /etc/apt/sources.list.d/mailborder.list

For Ubuntu, use:

echo "deb [arch=amd64] https://repo.mailborder.com/ubuntu $(lsb_release -cs) main" | \
  sudo tee /etc/apt/sources.list.d/mailborder.list

Step 2: Update Package Lists

sudo apt update

Step 3: Install Mailborder

sudo apt install mailborder

The package manager will: - Calculate and display dependencies - Prompt for confirmation - Download and install all required packages - Run post-installation configuration scripts

Expected installation time: 5-10 minutes depending on connection speed.

Step 4: Run Initial Setup

After package installation completes, run the setup script:

sudo mb-setup

The setup script will:

  1. Database Configuration
  2. Create mailborder database
  3. Create database user with secure password
  4. Import schema and initial data
  5. Run database migrations

  6. Service Configuration

  7. Generate encryption keys
  8. Create Unix sockets
  9. Set file permissions
  10. Configure SystemD services

  11. Admin Account Creation

  12. Prompt for administrator email
  13. Prompt for administrator password
  14. Create admin user record
  15. Set initial permissions

  16. Start Services

  17. Enable services for auto-start
  18. Start all Mailborder daemons
  19. Verify service health

Example setup session:

Welcome to Mailborder V6 Setup
===============================

Checking prerequisites...
[✓] Operating system: Debian 11 (bullseye)
[✓] Database server: MariaDB 10.5.15
[✓] Web server: Nginx 1.18.0
[✓] PHP version: 8.1.12
[✓] Redis server: 6.2.7

Creating database...
[✓] Database 'mailborder' created
[✓] Database user created
[✓] Schema imported (47 tables)
[✓] Initial data loaded

Generating encryption keys...
[✓] AES-256 master key generated
[✓] HMAC signing key generated
[✓] Keys stored securely

Administrator Account Setup
---------------------------
Enter administrator email: admin@example.com
Enter administrator password: ****************
Confirm password: ****************

[✓] Admin account created

Starting services...
[✓] mb-rpcd.service started
[✓] mb-milter.service started
[✓] mb-eval.service started
[✓] mb-filter.service started
[✓] mb-virtuoso.service started
[✓] mb-scribe.service started
[✓] mb-guardian.service started

Installation complete!

Access the web interface at:
  https://YOUR-SERVER-IP/

Default credentials:
  Email: admin@example.com
  Password: (as entered above)

Important next steps:
1. Log in to the web interface
2. Change the default admin password (if needed)
3. Configure relay host for email delivery
4. Test email flow
5. Review spam/virus settings

For detailed guidance, see:
  /usr/share/mailborder/docs/getting-started/initial-configuration.md

Step 5: Verify Installation

Check that all services are running:

sudo systemctl status mb-rpcd mb-filter mb-virtuoso

Expected output shows all services active (running).

Check service health:

sudo mb-status

Expected output:

Mailborder V6 System Status
============================

Services:
  mb-rpcd       [RUNNING]  PID 1234
  mb-milter     [RUNNING]  PID 1235
  mb-eval       [RUNNING]  PID 1236
  mb-filter     [RUNNING]  PID 1237
  mb-virtuoso   [RUNNING]  PID 1238
  mb-scribe     [RUNNING]  PID 1239
  mb-cron       [RUNNING]  PID 1240
  mb-guardian   [RUNNING]  PID 1241

Dependencies:
  MariaDB       [RUNNING]  PID 987
  Redis         [RUNNING]  PID 988
  Postfix       [RUNNING]  PID 989
  Nginx         [RUNNING]  PID 990
  Rspamd        [RUNNING]  PID 991
  ClamAV        [RUNNING]  PID 992

System Health: GOOD

Step 6: Access Web Interface

Open a web browser and navigate to:

https://YOUR-SERVER-IP/

You'll see a certificate warning because Mailborder uses a self-signed SSL certificate by default. Accept the warning and proceed.

To install your own SSL certificate, see SSL/TLS Certificates.

Log in with the administrator credentials you created during setup.


Installation Method 2: Downloaded .deb Package

If you don't want to use the APT repository, you can download and install the .deb package directly.

Step 1: Download Package

Download the latest .deb package from your customer portal or provided download link:

wget https://downloads.mailborder.com/releases/mailborder_6.0.0_amd64.deb

Step 2: Install Package

sudo apt install ./mailborder_6.0.0_amd64.deb

Note

The ./ prefix is important—it tells APT to install from a local file and resolve dependencies from configured repositories.

If you encounter dependency errors:

# Install dependencies first
sudo apt --fix-broken install

# Then retry Mailborder installation
sudo apt install ./mailborder_6.0.0_amd64.deb

Step 3: Complete Setup

Follow Steps 4-6 from Method 1 above (run mb-setup, verify installation, access web interface).


Installation Method 3: Offline Installation

For air-gapped environments without Internet access.

Step 1: Prepare Offline Package Bundle

On an Internet-connected system with the same OS version:

# Create working directory
mkdir mailborder-offline
cd mailborder-offline

# Download Mailborder package
wget https://downloads.mailborder.com/releases/mailborder_6.0.0_amd64.deb

# Download dependencies
apt-get download $(apt-cache depends mailborder | grep -E 'Depends|PreDepends' | \
  cut -d: -f2 | sed 's/ //g' | grep -v '<' | tr '\n' ' ')

# Create bundle
tar czf mailborder-offline-bundle.tar.gz *.deb

Step 2: Transfer to Target Server

Transfer mailborder-offline-bundle.tar.gz to your Mailborder server via USB, SCP, or other secure method.

Step 3: Install on Target Server

# Extract bundle
tar xzf mailborder-offline-bundle.tar.gz

# Install all packages
sudo dpkg -i *.deb

# Fix any dependency issues
sudo apt --fix-broken install

Step 4: Complete Setup

Run the setup script:

sudo mb-setup --offline

The --offline flag skips Internet-dependent checks and uses defaults for signature updates.

Step 5: Offline License Activation

Generate activation request:

sudo mb-license --offline-request > activation-request.txt

Transfer activation-request.txt to an Internet-connected system and submit to the Mailborder licensing portal. Download the activation-response.txt file and transfer back to the server.

Apply activation response:

sudo mb-license --offline-response < activation-response.txt

Post-Installation Configuration

After successful installation, complete these configuration steps:

Replace the self-signed certificate:

# Copy your certificate and key
sudo cp your-cert.crt /etc/mailborder/ssl/mailborder.crt
sudo cp your-key.key /etc/mailborder/ssl/mailborder.key

# Set permissions
sudo chmod 600 /etc/mailborder/ssl/mailborder.key
sudo chown mailborder:mailborder /etc/mailborder/ssl/*

# Reload Nginx
sudo systemctl reload nginx

Or use Let's Encrypt:

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d mailborder.example.com

2. Firewall Configuration

Configure firewall to allow required ports:

Using UFW:

sudo ufw allow 25/tcp    # SMTP
sudo ufw allow 80/tcp    # HTTP (redirect to HTTPS)
sudo ufw allow 443/tcp   # HTTPS
sudo ufw allow 22/tcp    # SSH (if remote management)
sudo ufw enable

Using iptables:

# Allow SMTP
iptables -A INPUT -p tcp --dport 25 -j ACCEPT

# Allow HTTP/HTTPS
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT

# Save rules
iptables-save > /etc/iptables/rules.v4

3. DNS Configuration

Verify your DNS records are correct:

A Record:

mailborder.example.com.  300  IN  A  203.0.113.10

PTR Record (Reverse DNS):

10.113.0.203.in-addr.arpa.  300  IN  PTR  mailborder.example.com.

MX Record (update when ready to go live):

example.com.  300  IN  MX  10  mailborder.example.com.

Verify DNS:

# Check forward DNS
dig mailborder.example.com +short

# Check reverse DNS
dig -x 203.0.113.10 +short

# Check MX record
dig example.com MX +short

4. Time Synchronization

Ensure NTP is configured:

sudo timedatectl set-ntp true
sudo timedatectl status

Output should show:

System clock synchronized: yes
NTP service: active

Troubleshooting Installation Issues

Issue: Package Installation Fails with Dependency Errors

Symptoms:

The following packages have unmet dependencies:
 mailborder : Depends: php8.1-fpm but it is not installable

Solution:

Add PHP repository:

# For Debian
sudo apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | \
  sudo tee /etc/apt/sources.list.d/php.list
sudo apt update
sudo apt install mailborder

Issue: Database Creation Fails

Symptoms:

ERROR 1045 (28000): Access denied for user 'root'@'localhost'

Solution:

Reset MariaDB root password:

sudo systemctl stop mariadb
sudo mysqld_safe --skip-grant-tables &
mysql -u root

In MySQL prompt:

FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new-password';
FLUSH PRIVILEGES;
EXIT;
sudo systemctl restart mariadb
sudo mb-setup

Issue: Service Fails to Start

Symptoms:

Job for mb-rpcd.service failed because the control process exited with error code.

Solution:

Check detailed error:

journalctl -u mb-rpcd -n 50 --no-pager

Common causes:

  • Port/socket already in use: Check for conflicting processes
  • Permission denied: Verify mailborder user exists and has permissions
  • Missing dependencies: Ensure Redis and MariaDB are running
# Verify dependencies
sudo systemctl status redis mariadb

# Check socket permissions
ls -la /run/mailborder/

# Restart service
sudo systemctl restart mb-rpcd

Issue: Web Interface Not Accessible

Symptoms: Browser shows "Connection refused" or "This site can't be reached"

Solution:

  1. Verify Nginx is running:

    sudo systemctl status nginx
    

  2. Check if Nginx is listening:

    sudo netstat -tlnp | grep nginx
    

  3. Test locally:

    curl -k https://localhost/
    

  4. Check firewall:

    sudo ufw status
    sudo iptables -L -n | grep 443
    

  5. Review Nginx logs:

    sudo tail -f /var/log/nginx/error.log
    

Issue: Setup Script Hangs

Symptoms: mb-setup appears to freeze or hang indefinitely

Solution:

Press Ctrl+C to cancel and diagnose:

# Check what processes are running
ps aux | grep mb-

# Check system resources
free -h
df -h

# Check database connectivity
mysql -u root -p -e "SHOW DATABASES;"

# Run setup with debug output
sudo mb-setup --debug

Uninstalling Mailborder

If you need to uninstall Mailborder:

Complete Removal (Including Configuration and Data)

# Stop all services
sudo systemctl stop mb-*

# Remove package and configuration
sudo apt purge mailborder

# Remove database
sudo mysql -e "DROP DATABASE IF EXISTS mailborder;"
sudo mysql -e "DROP USER IF EXISTS 'mailborder'@'localhost';"

# Remove data directories
sudo rm -rf /var/lib/mailborder
sudo rm -rf /var/log/mailborder
sudo rm -rf /var/spool/mailborder
sudo rm -rf /etc/mailborder

Package Removal Only (Preserve Configuration and Data)

# Stop services
sudo systemctl stop mb-*

# Remove package but keep configuration
sudo apt remove mailborder

Configuration and data remain in place. Reinstalling the package will restore functionality with existing data.


Next Steps

After successful installation:

  1. Complete Initial Configuration
  2. Initial Configuration Guide
  3. Configure relay host
  4. Set spam/virus thresholds
  5. Test email flow

  6. First Login

  7. First Login Guide
  8. Familiarize yourself with the interface
  9. Review dashboard

  10. Quick Start

  11. Quick Start Guide
  12. Send test emails
  13. Configure basic policies
  14. Go live

  15. Review Configuration Options

  16. System Configuration
  17. Email Processing Settings
  18. Spam Filter Configuration