/go/subjecttop helps you spot bulk or spam mail by showing which email subjects appear most often in the Postfix mail log. It reads /var/log/maillog, pulls out the subject of each logged message, and counts them. Typical uses: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
/go/subjecttop
Examples
# The 25 most common subjects
/go/subjecttop
# Every subject, searched for a word
/go/subjecttop all | grep -i invoice
# Check that the log contains any subjects at all
grep -c "Subject:" /var/log/maillog
Output
Without an argument, each line shows how many times a subject was logged, then the subject:
842 Make Money Fast
120 Invoice 12345
63 Your order has shipped
| Detail | Behavior |
|---|---|
| Number of lines | At most 25, the most common first. |
| Subject length | Cut to the first 75 characters. |
| Case | Counted without regard to case, but see Troubleshooting. |
| Period covered | Everything in the current /var/log/maillog, which is what has been logged since the last log rotation. |
With an argument the output has no counts and can be very long.
Logging
Every run is appended to /var/log/go/subjecttop.log.
See the full reference at /go/subjecttop 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.
