Skip to main content

PyPI version Build Status image2

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

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

or

$ cd /opt
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install untroubled-spam-fetcher

To install untroubled systemd service:

$ cp systemd/untroubled.service /lib/systemd/system
$ systemctl enable untroubled.service
$ systemctl start untroubled.service

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.

Docker

In the folder docker there are a Dockerfile and a docker-compose.

Example to fetch mail with Docker image:

$ docker run --rm --name fetcher -ti fmantuano/spamscope-untroubled-spam-fetcher -l DEBUG

If you want run a Docker image as daemon use docker-compose:

$ docker-compose up -d

Metadata

Release files for untroubled-spam-fetcher 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for untroubled-spam-fetcher 0.3.0
File Size Uploaded Provenance
untroubled-spam-fetcher-0.3.0.tar.gz 6.9 kB Without provenance Details

Release files / untroubled-spam-fetcher-0.3.0.tar.gz

Download URL untroubled-spam-fetcher-0.3.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11e62d1038f25b9d8955c4d2b6392820e5d69abe0a2ed263ee5937d3ec1d8b7a
BLAKE2b-256 checksum
How to use checksums
2f23a643f7d9b6f6d5c4bba437f2a3bc190ae42b8ff644c31eefb9019b0790f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for untroubled-spam-fetcher 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page