/go/sasltop finds the IP addresses with the most failed mail logins (SASL LOGIN authentication failures) and, in block mode, blocks the persistent offenders. It: No setup is needed. GoAdmio's default cron jobs already run sasltop block every hour. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Show the top SASL failure sources (changes nothing)
/go/sasltop
# Show them and block every IP over the limit
/go/sasltop block
Arguments
| Argument | Effect |
|---|---|
| (none) | Report only. Nothing is blocked and no alert is sent. |
block |
Report, then block each qualifying IP and send the alert. Takes the lock. |
robot |
Takes the lock and reports, but never blocks. |
underattack |
Takes the lock and reports, but never blocks. |
| Anything else | Treated like no argument: report only. |
Only the first argument is read.
Examples
# See who is failing mail logins right now
/go/sasltop
# Block every source over the limit, as the hourly cron job does
/go/sasltop block
# Review the log of past runs
tail -n 20 /var/log/go/sasltop.log
Output
The command prints one table, sorted by failures, highest first. It is printed in every mode, including block.
| Column | Meaning |
|---|---|
IP |
Source address of the failed logins. |
VISITS |
Number of SASL LOGIN authentication failed lines from that IP in /var/log/maillog. |
COUNTRY |
Country of the IP. |
CITY |
City of the IP. May be empty. |
COMPANY |
Owner or network name of the IP. |
Example (addresses are placeholders):
IP VISITS COUNTRY CITY COMPANY
203.0.113.45 8120 NL Amsterdam Example Hosting B.V.
198.51.100.7 1304 US Dallas Sample Networks LLC
192.0.2.19 212 DE Frankfurt Demo Cloud GmbH
Alerts
When at least one IP is blocked, the command sends the same message by email and WhatsApp with /go/sendmail and /go/sendwhatsapp.
| Item | Value |
|---|---|
| Subject | Urgent: SASL LOGIN Authentication Failure (<N> IPs) |
| Body | A greeting, one line per blocked IP, a closing note, and a "do not reply" notice. |
| Line format | SASL Failed <IP> (<visits> Visits) - Country: <country>, Company: <company>. |
| Sent when | At least one IP was blocked in this run. |
The alert text notes that repeated failures can come from misconfigured email clients as well as attacks.
Exit status
| Situation | Result |
|---|---|
| Normal run | Prints the table and exits. |
Another block, robot, or underattack run is active |
Prints Instance (<name>) already running. and exits with status 1. |
See the full reference at /go/sasltop 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.
