Proxmox Mail Gateway
Email security gateway protecting against spam, viruses and email threats
Getting started
Proxmox Mail Gateway (PMG) is the leading open-source email security solution that helps you protect your mail server against all email threats including spam, viruses, trojans, and phishing attacks. It works as a mail proxy between your firewall and internal mail servers.
- Go to https://my.cubepath.com/deploy
- Select a VPS plan (recommended: gp.starter or higher)
- Under Operating System, choose "Proxmox Mail Gateway"
- Click Deploy
Once deployment is complete (approximately 10-15 minutes), access the web interface at https://YOUR-IP:8006 and use credentials root@pam with your VPS root password.
Deploy via CubePath Cloud API
Via CubeCLI
cubecli vps create \
--name pmg-server \
--plan gp.starter \
--template "Proxmox Mail Gateway" \
--location us-mia-1 \
--project <project-id>
Via API
curl -X POST https://api.cubepath.com/vps \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "pmg-server",
"plan": "gp.starter",
"template": "Proxmox Mail Gateway",
"location": "us-mia-1",
"project_id": "YOUR_PROJECT_ID"
}'
Technical information
Initial access:
- URL: https://YOUR-IP:8006
- User: root@pam
- Password: Your VPS root password
Operating system:
- Debian 13 (Trixie)
Installed software:
- Proxmox Mail Gateway 9.0
- ClamAV Antivirus Engine
- SpamAssassin
- Postfix MTA
- PostgreSQL Database
- Kernel 6.14.11
- ZFS 2.3.4
Ports used:
- 22: SSH
- 25: SMTP (incoming/outgoing mail)
- 8006: PMG web interface (HTTPS)
Main features:
- Multi-layered spam and virus protection
- ClamAV antivirus integration
- SpamAssassin spam filtering
- Greylisting and DNS-based blacklists
- Message tracking and quarantine management
- High Availability (HA) clustering support
- Multi-domain support with unlimited domains
- Full TLS/SSL encryption support
- LDAP and Active Directory integration
- Detailed statistics and reporting
- Web-based administration interface
File locations:
- Configuration: /etc/pmg/
- Logs: /var/log/pmg/
- Quarantine: /var/spool/pmg/
System requirements:
- Minimum RAM: 4 GB
- Recommended RAM: 8 GB or more (plan gp.starter or higher)
- Disk space: Minimum 20 GB
- Processor: 2+ cores recommended
Useful commands
# Check PMG services status
systemctl status pmg-api
systemctl status postfix
systemctl status clamav-daemon
# Restart PMG services
systemctl restart pmg-api
systemctl restart postfix
# View mail logs
journalctl -u postfix -f
# View PMG tracking logs
pmgsh tracking list
# Update PMG to latest version
apt update
apt upgrade proxmox-mailgateway
# Check mail queue
pmgsh queue list
# Flush quarantine
pmgsh quarantine flush
# Reload configuration
pmgsh reload
Initial configuration
After accessing the web interface:
- Configure mail relay:
- Navigate to Configuration > Mail Proxy > Relaying
- Add your internal mail server as a relay domain
-
Configure relay settings for your mail infrastructure
-
Set up spam filtering:
- Go to Configuration > Spam Detector
- Adjust spam score thresholds
-
Configure whitelists and blacklists
-
Configure antivirus:
- Navigate to Configuration > Antivirus
-
Ensure ClamAV is enabled and updating regularly
-
Set up user authentication:
- Go to Configuration > User Management
- Configure LDAP/AD integration if needed
-
Set up user access to quarantine
-
Configure email routing:
- Navigate to Configuration > Mail Proxy > Transports
- Define how emails should be routed to your internal mail servers