Purpose
This document is intended for email infrastructure engineers, system administrators, DevOps team members, network engineers, and others who support secure email routing using the Virtru Gateway on-premise. It serves both as a live troubleshooting guide and a knowledge base reference to help remediate incidents.
If you have an SMTP proxy in place or suspect there might be an issue with the SMTP proxy, this document will be extremely helpful. You can also follow these additional resources:
- Virtru Self-Hosted Gateway: Split Java and Postfix logs into separate files
- Virtru Self-Hosted Gateway: Behind a Proxy
- Virtru Self-Hosted Gateway: Docker Reference
1. Verify SMTP Proxy Process & Supervisor Status
A. Check if Supervisor is Installed
which supervisorctl || apt update && apt install supervisor -y
B. Check SMTP Proxy Status
supervisorctl status smtp-proxy
C. If Needed:
supervisorctl reread supervisorctl update supervisorctl restart smtp-proxy
D. If Not Running:
supervisorctl start smtp-proxy
2. Inspect Mail Queue
| Task | Command |
|---|---|
| Find .env files | find / -name "*.env" |
| Inspect Podman containers |
podman or docker ps -a + podman inspect <container-id>
|
| Enter container | podman or docker exec -it <container-id> /bin/bash |
Once inside the container, use the commands below to inspect, flush or clear the mail queue.
postqueue -p # or mailq
Type exit to leave the mail queue.
3. Flush or Clear the Mail Queue
Flush:
postqueue -f
Delete All (use caution):
postsuper -d ALL
Delete Deferred Only:
postsuper -d ALL deferred
4. Extract and Inspect Logs
SMTP Proxy Logs:
tail -f /var/log/supervisor/smtp-proxy.out.log
Postfix Logs:
grep postfix /var/log/syslog
If Logs Aren't Present, Check Configuration:
cat /etc/supervisor/conf.d/smtp-proxy.conf
Ensure these lines are present:
stdout_logfile=/proc/self/fd/1 stderr_logfile=/proc/self/fd/2
Alternative Postfix Logging Command:
journalctl -u postfix -e
5. Check What's Listening on Port 10025
netstat -tulnp | grep 10025 # or ss -ltnp | grep 10025
6. Inspect Config Files
Virtru Config:
cat /usr/local/smtp-proxy/smtp-proxy/config/virtru-config.json
Environment File:
cat /var/virtru/vg/env/dlp-out-*.env
Look for and verify mode, topology, organizationDomain, and encryption settings.
7. Supervisor Commands
supervisorctl status supervisorctl restart smtp-proxy supervisorctl restart postfix
8. Inspect SMTP Proxy Container (Docker or Podman)
A. List Running Containers:
podman ps # or docker ps
B. Inspect the Container:
podman inspect <container-id> # or docker inspect <container-id>
Look for:
- Entrypoint: Java launch parameters
- Environment Variables: GATEWAY_* configs
- Volume Mounts: /usr/local/smtp-proxy/ path
- Ports: Ensure port 10025 is mapped
C. Example Command to View Env Variables:
docker inspect <container-id> | jq '.[0].Config.Env' podman inspect <container-id> | jq '.[0].Config.Env'
9. Optional: Test Local Delivery
echo "Test Email" | mail -s "Test Subject" recipient@example.com
Then confirm the message appears in logs or queues.
Summary
By following the outlined steps, teams can:
Identify common causes of deferred or undelivered messages
Ensure the SMTP Proxy is correctly configured and managed by Supervisor
Maintain visibility into log output and queue status
Minimize downtime and message delivery delays
Use this guide as both a rapid response tool during incidents and a baseline checklist for ongoing health checks of your secure email infrastructure.