Running a self-hosted mail server means you’re responsible for monitoring delivery health, tracking queue backlogs, and diagnosing bounce issues. Without proper log analysis tools, you’re flying blind — unable to see if spam is overwhelming your server, if queues are stuck, or if delivery rates are dropping.
In this guide, we compare three self-hosted mail log analysis tools: MailWatch, PFLogSumm, and Mailgraph. Each takes a different approach to post-processing Postfix (and compatible MTA) logs, giving you visibility into your email infrastructure.
Why Self-Hosted Mail Log Analysis Matters
When you manage your own mail server, you lose the built-in dashboards that SaaS email providers offer. Tools like MailWatch, PFLogSumm, and Mailgraph fill that gap by parsing /var/log/mail.log (or equivalent) and presenting actionable metrics:
- Queue depth — detect stuck messages before they bounce
- Delivery rates — track successful sends vs. deferrals vs. rejections
- Spam/virus detection — monitor how much junk your filters are catching
- Volume trends — spot unusual spikes that indicate abuse or attacks
- Top senders/recipients — identify who’s generating the most traffic
For related reading, see our guide on Postfix/Rspamd spam filtering setup and the complete email deliverability guide.
MailWatch: Full Web-Based Mail Monitoring
MailWatch is a comprehensive web-based mail log analyzer designed for Postfix and MailScanner setups. It stores parsed log data in a MySQL/MariaDB database and provides a full web interface for real-time monitoring, reporting, and quarantine management.
Key Features
- Real-time mail log parsing into a relational database
- Web dashboard with graphs, tables, and drill-down reports
- Quarantine management for spam/virus-flagged messages
- Per-user mail tracking and reporting
- Mail queue monitoring with action buttons (release, delete, defer)
- Multi-server support for monitoring multiple Postfix instances
- User/role management for team environments
Docker Compose Setup
MailWatch can be deployed using Docker Compose with MariaDB as the backend:
| |
Installation on Linux
For a bare-metal install on Debian/Ubuntu:
| |
PFLogSumm: Command-Line Postfix Log Summarizer
PFLogSumm is a Perl-based log summary tool specifically designed for Postfix. It parses Postfix log files and generates concise, readable summary reports — perfect for cron-jobs that email you daily or weekly stats.
Key Features
- Generates human-readable summary reports from Postfix logs
- Tracks deliveries, deferrals, bounces, and rejections
- Identifies top senders, recipients, and destination domains
- Calculates hourly/daily mail volume distribution
- Reports on SMTP response codes and common error patterns
- Lightweight — no database, no web server required
- Designed for automated cron execution with email delivery
Docker Usage
While PFLogSumm is a CLI tool, you can run it in a container for isolated execution:
| |
Installation and Daily Report Setup
| |
Sample Output
| |
Mailgraph: Visual Mail Traffic Graphing
Mailgraph is a simple but effective RRDtool-based mail statistics visualizer. It creates real-time graphs of sent, received, bounced, and rejected mail volumes using data from the system mail log. While it lacks the depth of MailWatch or the report detail of PFLogSumm, it excels at providing an at-a-glance view of mail traffic patterns.
Key Features
- Real-time RRDtool-based graphs of mail activity
- Tracks sent, received, bounced, rejected, and virus-tagged messages
- Supports Postfix, Sendmail, Exim, and Qmail log formats
- Extremely lightweight — minimal CPU and memory footprint
- CGI-based web interface for graph display
- Historical data retention (daily, weekly, monthly, yearly views)
- No database required — RRDtool handles time-series storage
Docker Compose Setup
| |
Bare-Metal Installation
| |
Apache Configuration for Mailgraph CGI
| |
Comparison Table
| Feature | MailWatch | PFLogSumm | Mailgraph |
|---|---|---|---|
| Interface | Web (PHP/MySQL) | CLI (Perl) | Web (CGI/RRDtool) |
| Real-time | Yes (near-real-time parsing) | No (scheduled reports) | Yes (live RRD updates) |
| Database | MySQL/MariaDB required | None required | RRDtool time-series |
| Queue management | Full (release/delete/defer) | No | No |
| Quarantine | Yes (spam/virus) | No | No |
| Per-user stats | Yes | Yes (in reports) | No |
| Historical trends | Database-backed | Log-file dependent | RRDtool (daily/weekly/monthly/yearly) |
| Multi-server | Yes | No | No |
| Resource usage | Moderate (DB + web) | Minimal (CLI only) | Very low (RRDtool) |
| Setup complexity | High | Low | Low-Medium |
| Best for | Full mail server monitoring | Automated daily/weekly reports | Quick visual traffic overview |
| GitHub stars | 500+ | Community maintained | 100+ |
| Last active | 2025 | Mature/stable | Mature/stable |
Choosing the Right Tool
Use MailWatch if:
- You need a comprehensive, web-based mail monitoring solution
- You manage a high-volume mail server and need per-user tracking
- You want quarantine management integrated with log analysis
- Multiple team members need access to mail statistics
- You need real-time queue monitoring with action capabilities
Use PFLogSumm if:
- You want simple, automated daily or weekly summary reports via email
- You prefer CLI tools without database dependencies
- You need to integrate mail stats into existing monitoring pipelines
- You want detailed breakdown of SMTP response codes and error patterns
- Your infrastructure is minimal and you don’t need a web interface
Use Mailgraph if:
- You want a quick visual overview of mail traffic patterns
- You need historical trend graphs (daily, weekly, monthly)
- You prefer a lightweight solution with minimal resource usage
- You run multiple MTAs (Postfix, Sendmail, Exim) and want unified graphs
- You want something that “just works” with near-zero configuration
Best Combination
Many administrators use PFLogSumm + Mailgraph together: PFLogSumm sends you detailed daily email reports, while Mailgraph provides a always-on dashboard for quick visual checks. For production environments requiring full queue management and per-user tracking, MailWatch is the most comprehensive option.
FAQ
Can MailWatch work with MTAs other than Postfix?
MailWatch is primarily designed for Postfix and MailScanner setups. While it can parse some Sendmail log formats, full functionality requires Postfix. For Exim or other MTAs, consider Mailgraph which supports multiple MTA log formats.
Does PFLogSumm support real-time monitoring?
No, PFLogSumm is designed for batch processing of log files. It generates summary reports from completed log entries. For real-time monitoring, use MailWatch or Mailgraph, which parse logs continuously.
How much disk space does Mailgraph’s RRDtool storage use?
RRDtool uses fixed-size circular buffers, so disk usage is predictable and bounded. A typical Mailgraph installation uses 2-5 MB of disk space regardless of how long it runs, since old data is automatically overwritten according to the RRD archive configuration.
Can I run these tools alongside a mail server on the same machine?
Yes, all three tools are designed to run on the same server as your MTA. Mailgraph and PFLogSumm are particularly lightweight. MailWatch requires a MySQL/MariaDB instance, which adds more resource overhead but is still feasible on a 1-2 GB RAM server.
How do I set up automated alerts for mail queue problems?
PFLogSumm can be combined with a wrapper script that checks for elevated bounce or defer rates and sends alerts. MailWatch includes built-in queue monitoring — you can set thresholds for queue depth and receive notifications. Mailgraph doesn’t include alerting but can be paired with external monitoring tools like Nagios or Prometheus.
Are these tools compatible with Rspamd or SpamAssassin integration?
MailWatch can display spam/virus detection statistics if your MTA is configured with SpamAssassin or Rspamd. PFLogSumm includes spam-related counters in its reports when the MTA logs tag messages. For comprehensive spam filtering management, see our Rspamd vs SpamAssassin comparison.