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)
Installation Method 1: APT Repository (Recommended)¶
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¶
Step 3: 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:
The setup script will:
- Database Configuration
- Create
mailborderdatabase - Create database user with secure password
- Import schema and initial data
-
Run database migrations
-
Service Configuration
- Generate encryption keys
- Create Unix sockets
- Set file permissions
-
Configure SystemD services
-
Admin Account Creation
- Prompt for administrator email
- Prompt for administrator password
- Create admin user record
-
Set initial permissions
-
Start Services
- Enable services for auto-start
- Start all Mailborder daemons
- 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:
Expected output shows all services active (running).
Check service health:
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:
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:
Step 2: Install Package¶
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:
The --offline flag skips Internet-dependent checks and uses defaults for signature updates.
Step 5: Offline License Activation¶
Generate activation request:
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:
Post-Installation Configuration¶
After successful installation, complete these configuration steps:
1. SSL Certificate (Optional but Recommended)¶
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:
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:
PTR Record (Reverse DNS):
MX Record (update when ready to go live):
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:
Output should show:
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:
Solution:
Reset MariaDB root password:
In MySQL prompt:
FLUSH PRIVILEGES;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new-password';
FLUSH PRIVILEGES;
EXIT;
Issue: Service Fails to Start¶
Symptoms:
Solution:
Check detailed error:
Common causes:
- Port/socket already in use: Check for conflicting processes
- Permission denied: Verify
mailborderuser 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:
-
Verify Nginx is running:
-
Check if Nginx is listening:
-
Test locally:
-
Check firewall:
-
Review Nginx logs:
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:
- Complete Initial Configuration
- Initial Configuration Guide
- Configure relay host
- Set spam/virus thresholds
-
Test email flow
-
First Login
- First Login Guide
- Familiarize yourself with the interface
-
Review dashboard
-
Quick Start
- Quick Start Guide
- Send test emails
- Configure basic policies
-
Go live
-
Review Configuration Options
- System Configuration
- Email Processing Settings
- Spam Filter Configuration