/go/mailtop reads the mail log (/var/log/maillog) and counts how many emails the server sent. It then: The last part is the reason to know this command well. It is an automatic defence against a hacked mailbox or website that starts sending spam. Read The daily limit before changing anything. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Today's report
/go/mailtop
# Yesterday's report
/go/mailtop 1
Options
| Argument | Notes |
|---|---|
<days-ago> |
A whole number as the first argument. 0 or no number means today. A past day only works while that day is still in /var/log/maillog. |
--cron |
For scheduled runs. If the number of emails is the same as in the previous run, the command ends without printing anything (exit status 1). |
--force |
Needed when more than 5,000 emails were sent. Without it, the command stops with Too many emails (RUN: /go/mailtop --force). Counting is slow, because the log is searched once for every email. |
The lock that prevents two runs at the same time is skipped only when both --cron and --force are given. See Locking.
Examples
# Today's busiest accounts
/go/mailtop
# Yesterday's report
/go/mailtop 1
# Count a very busy day
/go/mailtop --force
# Look at the report saved when the limit was exceeded
cat /var/log/go/mail/mailtop-2026-11-20.log
Output
------------------------------------------
Queue Count (12)
------------------------------------------
Friday, November 20 (386 Emails)
------------------------------------------
Sent Today Email Domain
---------- ----- ------
214 info@example.com example.com
97 sales@example.org example.org
------------------------------------------
45 www-data@server.example.com
30 noreply@example.net
------------------------------------------
| Part | Meaning |
|---|---|
Queue Count (n) |
Emails waiting in the mail queue. Not shown when the queue is empty. |
<date> (n Emails) |
The number of outgoing delivery log lines for that day. |
| Table | The accounts known to GoAdmio that sent mail, busiest first. |
| Second list | Shown only when the table’s total is different from the count above. It lists the 10 most frequent sender addresses in the log, including senders that aren’t GoAdmio mailboxes, such as website scripts. |
Counting rules
The count isn’t the number of messages. It is the number of delivery lines in the log, so:
- a message sent to 10 recipients counts as 10
- every delivery retry counts again
- mail that was addressed to the administrator’s email (from the server settings) is left out of the total
Exit status
| Situation | Message | Exit status |
|---|---|---|
| Normal run | The report. | 0 |
| Another run is in progress | Instance (mailtop) already running. |
1 |
--cron and nothing changed |
No output. | 1 |
More than 5,000 emails and no --force |
Too many emails (RUN: /go/mailtop --force) |
1 |
See the full reference at /go/mailtop and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
