You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Carlo Strub 7004bac777
2 weeks ago
docs add slides 2 years ago
sisyphus Add dry run mode that does not move mails after classification (fixes #8) 2 years ago
test/Maildir Only accept large unicode characters as individual words 3 years ago
.coveralls.yml add coveralls 3 years ago
.gitignore ignore coverage file 10 months ago
.travis.yml only build with latest released go version 10 months ago changelog for dep change 2 years ago Create 3 years ago Create 3 years ago
LICENSE Welcome 2018 2 years ago
Makefile move to go mod 10 months ago Update 2 weeks ago
appveyor.yaml add line above appveyor.yaml 3 years ago
classify.go please gometalinter 2 years ago
classify_test.go if word list is too long, only take a random subsample (fixes #11) 2 years ago
database.go Use path/filepath for cleaner and safer path generation 2 years ago
database_test.go make gometalinter happier 3 years ago
go.mod move to go mod 10 months ago
go.sum move to go mod 10 months ago
info.go move info into the library 2 years ago
learn.go please gometalinter 3 years ago
learn_test.go fix tests 3 years ago
mail.go if word list is too long, only take a random subsample (fixes #11) 2 years ago
mail_test.go improve memory footprint 3 years ago
mkdocs.yaml update initial docs 3 years ago
sisyphus_suite_test.go separate out command and package 3 years ago add properties file 10 months ago

Sisyphus: Intelligent Junk Mail Handler

As we all know too well, many mails we receive are undesired for various reasons. Sometimes, we just do not want to be part of a scam, sometimes we really prefer no to have this latest joke mail sent by our beloved friends -- even though we are happy to exchange serious messages with them.

Sisyphus is a junk mail handler of the latest generation. It has the following features:

  • requires zero configuration, neither on the server nor on the client
  • works with any MTA and any client
  • learns about your preferences based on all messages in your inbox and your junk folder
  • can handle multiple mail accounts with independant junk mail preferences
  • requires minimal resources, e.g. learning over 50000 mails and keeping track of roughly 90000 words requires only 10MB of storage

Build Status Go Report Card GoDoc Documentation Codebeat Coverage Quality Gate Status

How it works

Sisyphus analyzes each mail in the inbox and the junk folder and uses its subject and text to improve the learning algorithm. Whenever a new mail arrives in the Maildir/new directory, Sisyphus classifies this mail based on its content. Junk mails are then moved automatically to the Maildir/.Junk directory, while good mails are left untouched. See the following blog post on a rather non-technical explanation.

Technically, Sisyphus applies a classic Bayesian Update algorithm to classify mails. However, in contrast to many traditional junk mail filters, classification is based on all mails ever received. This includes mails that are classified by the user as junk by moving them manually into the junk folder, or mails that have been correctly classified by Sisyphus previously. This is only possible with limited resources by applying the HyperLogLog algorithm to store the learned mails.

The learned information is stored in a local database called sisyphus.db which is located in each Maildir directory.


Sisyphus can be installed by downloading the released binary package.

To build from source, you can

  1. Clone this repository into $GOPATH/src/ and change directory into it
  2. Run make build

This will leave you with ./sisyphus in the sisyphus directory, which you can put in your $PATH. (You can also take a look at make install to install for you.)


First, set the environment variable necessary for operation:




or for Windows


For all other configuration options, please consult the help. It can be started by running

$ sisyphus help

To start sisyphus, do

$ sisyphus run

To display various statistics, do

$ sisyphus stats

(caveat: run at least one learning cycle)

See the help for more details.


Sisyphus is licensed under the 3-Clause BSD license. See the LICENSE file for detailed information.