Skip to main content

This tool gets the Untroubled spam mails

Project description

PyPI version

untroubled-spam-getter

Overview

This tool gets the Untroubled spam mails. You can use this tool as daemon or not.

Description

This tool gets the Untroubled spam mails and saves them on filesystem. You can set the followings variables to change the defaults:

"UNTROUBLED_TIMEOUT": 20,
"UNTROUBLED_CACHE_PATH": "/var/tmp",
"UNTROUBLED_STORE_PATH": "/tmp/untroubled_mails",
"UNTROUBLED_WAIT_TIME": 3600,
"UNTROUBLED_MONTHS": 0,

UNTROUBLED_TIMEOUT: timeout HTTP connections. UNTROUBLED_CACHE_PATH: path where store the cache files useful to get only mails delta. UNTROUBLED_STORE_PATH: path where store the mails. UNTROUBLED_WAIT_TIME: if daemon is enabled wait time seconds before gets new mails. UNTROUBLED_MONTHS: how many months archive you want get. 0 means only last month.

You can set environment variables or change them from command line. Command line has the priority.

 $ untroubled-spam-fetcher -h
usage: fetcher.py [-h] [-l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}]
                  [-c UNTROUBLED_CACHE_PATH] [-s UNTROUBLED_STORE_PATH]
                  [-m UNTROUBLED_MONTHS] [-d] [-w UNTROUBLED_WAIT_TIME]
                  [-t UNTROUBLED_TIMEOUT] [-v]

Untroubled Fetcher

optional arguments:
  -h, --help            show this help message and exit
  -l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}, --log {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}
                        Log level (default: INFO)
  -c UNTROUBLED_CACHE_PATH, --cache-path UNTROUBLED_CACHE_PATH
                        Cache path to store downloaded history (default: None)
  -s UNTROUBLED_STORE_PATH, --store-path UNTROUBLED_STORE_PATH
                        Store path to store emails (default: None)
  -m UNTROUBLED_MONTHS, --months UNTROUBLED_MONTHS
                        Months mails archive to get (no more 12) (default:
                        None)
  -d, --daemon          Start in daemon mode (default: False)
  -w UNTROUBLED_WAIT_TIME, --wait-time UNTROUBLED_WAIT_TIME
                        Seconds to wait between two fetch (default: None)
  -t UNTROUBLED_TIMEOUT, --timeout UNTROUBLED_TIMEOUT
                        HTTP timeout connection in seconds (default: None)
  -v, --version         show program's version number and exit

Authors

Main Author

Fedele Mantuano (Linkedin: https://www.linkedin.com/in/fmantuano/)

Installation

$ git clone https://github.com/SpamScope/untroubled-spam-fetcher.git
$ cd virtualenv -p python3 venv
$ source venv/bin/activate
$ python setup.py install

Usage

untroubled-spam-fetcher only works with Python 3.

$ untroubled-spam-fetcher -l DEBUG -c /tmp/cache -s /tmp/mails -d

In this case runs as daemon, with logging in debug mode, uses /tmp/cache as cache folder and /tmp/mails as folder where stores the mails.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

untroubled-spam-fetcher-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file untroubled-spam-fetcher-0.2.1.tar.gz.

File metadata

File hashes

Hashes for untroubled-spam-fetcher-0.2.1.tar.gz
Algorithm Hash digest
SHA256 416f31e9d8bac58e0e3bebfc5bbfb52e63b6d93b3330c023589131b6ce96a1ef
MD5 b6411a196e70d514a06d0f8e3eae1d3d
BLAKE2b-256 fe123edb5176e20bbf1ac9d6f38be5c6263fc2f85394c1df0f3afd2432bfe243

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page