GoAdmio Command Line: spam with /go/spam

A compromised mail account or website often sends spam in bulk, and the unsent messages pile up in the mail queue. /go/spam uses the size of that queue to spot the problem. It has three modes: The check mode is designed to be run on a schedule. When it acts, it: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Run the check
/go/spam

# See how many messages are in the queue
/go/spam count

Arguments

You type Mode
delete Deletes the whole queue.
count Prints the queue size.
Nothing, or any other word Runs the check.

A mistyped word does not give an error. It runs the check, which may block port 25 and delete the queue when the limits are reached.

Examples

# Run the check
/go/spam

# How many messages are waiting?
/go/spam count

# Delete everything in the queue (spam emergency only)
/go/spam delete

# Read today's sender report, written when the check took action
cat /var/log/go/mail/spam-$(date +%F).log

# Review recent calls
tail /var/log/go/spam.log

Output

Check

Queue Count: 1523
Total Emails Sent Today Nov 21: 8841

If the limits are reached, you will also see the sender report from mailtop and Port 25 is closed.

When tracking is off:

Tracking setting is disabled.

Count

Only the number, for example 1523.

Delete

Deleting mail queue...

count, delete, and the "tracking is off" case end with exit status 1. In scripts, read the output, not the exit status.

See the full reference at /go/spam 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.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *