Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/genuinetools/1up

A custom Gmail spam filter bot.
https://github.com/genuinetools/1up

Last synced: 3 months ago
JSON representation

A custom Gmail spam filter bot.

Awesome Lists containing this project

README

        

# 1up

[![make-all](https://github.com/genuinetools/1up/workflows/make%20all/badge.svg)](https://github.com/genuinetools/1up/actions?query=workflow%3A%22make+all%22)
[![make-image](https://github.com/genuinetools/1up/workflows/make%20image/badge.svg)](https://github.com/genuinetools/1up/actions?query=workflow%3A%22make+image%22)
[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge)](https://godoc.org/github.com/genuinetools/1up)
[![Github All Releases](https://img.shields.io/github/downloads/genuinetools/1up/total.svg?style=for-the-badge)](https://github.com/genuinetools/1up/releases)

A custom Gmail spam filter bot.

**Table of Contents**

- [How it works](#how-it-works)
- [Installation](#installation)
- [Binaries](#binaries)
- [Via Go](#via-go)
- [Via Docker](#via-docker)
- [Usage](#usage)

## How it works

The bot will create 3 labels in your Gmail:

- `1up/good`: where you label emails that are "good"
- `1up/bad`: where you label emails that are "bad"
- `1up/quarantine`: where the bot will place emails that it thinks are "bad"
based off the results of the Bayes classifier

Thanks to [@brendandburns](https://github.com/brendandburns) for pointing me at
Bayes classifiers.

## Installation

#### Binaries

For installation instructions from binaries please visit the [Releases Page](https://github.com/genuinetools/1up/releases).

You will want to follow the steps [here](https://developers.google.com/gmail/api/quickstart/go#step_1_turn_on_the) to turn on the Gmail API and get a credentials file.

#### Via Go

```console
$ go get github.com/genuinetools/1up
```

#### Via Docker

```console
$ docker run --rm -it -v ~/configs/1up:/1up:ro \
--tmpfs /tmp \
r.j3ss.co/1up -f /1up/credentials.json
```

## Usage

```console
$ 1up -h
1up - A custom Gmail spam filter bot.

Usage: 1up

Flags:

-d, --debug enable debug logging (default: false)
-f, --creds-file Gmail credential file (or env var GMAIL_CREDENTIAL_FILE) (default: )
-i, --interval update interval (ex. 5ms, 10s, 1m, 3h) (default: 5m0s)
--once run once and exit, do not run as a daemon (default: false)

Commands:

version Show the version information.
```