junk with the /go/junk Command

/go/junk generates two Sieve filter scripts that doveconf wires into Dovecot when the junk filter is enabled: one general ruleset (.sieve) and one sender-IP blocklist (.ip). It can also just toggle the feature on or off. The call is appended to /var/log/go/junk.log. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# Build (or rebuild) the filter rules
/go/junk

# Then turn the feature on
/go/junk enable

Options

None.

Examples

# First-time setup: build the rules, then turn the feature on
/go/junk
/go/junk enable

# Refresh the rules later (new spam phrases, new blocked IPs) and recompile them
/go/junk

# Turn it off
/go/junk disable

# Add an IP to the per-server blocklist the main path reads from
sudo sqlite3 /var/lib/sqlite/junk.db "INSERT INTO Junk (Domain, IP) VALUES ('example.com', '203.0.113.5')"
/go/junk

Output

Configuring IP Filter...

is the only line the main (no-argument) path prints. enable/disable print nothing of their own.

See the full reference at /go/junk 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 *