/antispam

:construction: :rocket: Spam Database and Classifiers for automated usage :construction:

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0

antispam

This project is my attempt to fix the spam problem.

Currently this repository reflects the spam that I or my customers receive on a daily basis, whereas it also includes providers that refuse to abide with the abuse report policies because they have a conflict of interest to their paying customers (obviously).

screenshot

Usage

The usage of this tool is intended to be used via cronjobs or via exec on event.

# View usage help
antispam;

# View an email and check for spam indicators
antispam view path/to/mail.eml;

# If an email is spam, return exit code 1
antispam classify path/to/mail.eml;

# Mark an email as spam, output new spammer ready for pull-request
antispam mark --json path/to/mail.eml;

Building

The build toolchain is implemented in go, so you only need to install go first.

# Install go compiler/framework
sudo pacman -S go;

# Build binary
cd /path/to/antispam/toolchain;
go run build.go;

# Execute binary
cd /path/to/antispam/build;
./antispam-linux-amd64;

Postfix Configuration

The Postfix configuration is documented in POSTFIX.md and uses external postmap blocklists to block network prefixes and domains.

cd /path/to/antispam/toolchain;

# Upload and install postmap files
go run postfix.go install root@your.server.tld:2222;

Pull Requests

Pull Requests are certainly welcome! I don't like spam, and so do you, I guess? So let's fight spam together!

If you want to contribute a new Spammer entry (generated via antispam mark --json <file>, please make sure to use the same naming scheme for the files.

Each spammer organization has a separate JSON file, containing an Array of structs.Spammer. For example, Amazon contains the structs.Spammer instances for Amazon US, Amazon EU, Amazon JP etc.

License

AGPL-3