Giter Club home page Giter Club logo

resilab.mailfilter's Introduction

ResiLab MailFilter

This program is used to filter imap mail boxes based on various rules.

Rules are auto generated by learning from your already qualified spam messages, the algorithim learns itself over time and there is also a configuration to add custom rules. The custom rules are very handy to auto move newsletters, etc. out of your inbox to keep it clean.

Install

Download the source code and compile it with your preferred .NET compiler.

Install the windows service with

ResiLab.MailFilter.exe install

on linux you have to do this yourself.

Configure

The config.json can contain multiple mail boxes. Every mailbox needs server, username and password to connect. At the moment only imap servers are supported. Pop3 is not planned.

To enctypt the password the .NET data protection with local machine scope is used, so you have to run the command to encrypt your password on the target machine.

ResiLab.MailFilter.exe crypt <YOUR PASSWORD>

copy the output string (without the spaces) to the config file.

Spam Protection

To enable the spam protection simply add this to your configuration:

"Spam": {
    "EnableSpamProtection": true,
    "Target": "Spam"
}

The target folder is used as the source folder for the learning process and also as the target for detected spam messages.

You can also configure a folder as whitelist. Addresses of messages in this folder are not moved to spam target folder, even if they are detected as spam based on previously learned rules.

"Spam": {
    "EnableSpamProtection": true,
    "Target": "Spam",
    "Whitelist": {
        "Folder": "Done"
    }
}

Custom Rules

Custom rules are configured like this in the Rules array of the configuration file:

{
    "Type": "SubjectStartsWith",
    "Value": "Hey, I am spam",
    "Destination": "Spam"
}

Following rule types are implemented:

  • SenderEquals

  • SenderContains

  • SenderEndsWith

  • SenderNameEquals

  • SendernameContains

  • SenderNameBeginsWith

  • SenderNameEndsWith

  • SubjectEquals

  • SubjectContains

  • SubjectBeginsWith

  • SubjectEndsWith

How the spam protection feature works

An analyzer scans the spam folder in your mail box periodically and uses this learning data to generate new rules at runtime in the mailbox processor. At the moment the sender address and subject of these mails are used. Some other data is also gathered but not used yet.

This mechanism is self learning, cause when the analyzer matches a message with an already known subject it registeres all the other metadata of the mail and generates rules based on them - so for example later mails from the same address or with the same fishing urls are also detected as spam.

To ensure that this mechanism is not removing mails from your inbox which are by persons you trust it will later (not fully implemented yet) generate a whitelist based on the already read and send mails of your mail box. So persons you stay in contact with are not blocked by the spam filter.

resilab.mailfilter's People

Contributors

linuxdoku avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.