Skip to main content

Fetch mails from IMAP servers and deliver them to a local user

Project description

mettmail

Get mail from IMAP server with IDLE extension and deliver to LMTP server, nothing else.

Requirements

  • python >=3.8
  • poetry (pip install --user poetry)

Install

Install mettmail python package and CLI command.

poetry install --no-root

Run

Create configuration file based on the example:

cp mettmail.example.yaml mettmail.yaml

Edit it with your IMAP/LMTP connection details. You can override most of DeliverLMTP and FetchIMAP constructor parameters.

Run parameters:

poetry run mettmail --help

Development

Build Dependencies

  • nox as test-runner
  • pyenv (recommended) to manage python versions

Install dependencies and pre-commit hooks:

# you may need to install the following tools outside of your virtualenv, too:
pip install nox poetry pre-commit
poetry install --no-root
poetry run pre-commit install

Test/Coverage setup

Quickly

You can quickly run tests with:

# using your default interpreter
poetry run pytest

# using nox (add -r for the following runs)
nox -p 3.8

Thoroughly

Note: Python 3.10 support is currently broken because of a bug in aioimaplib.

Use nox to run tests and other useful things automatically for all supported python versions.

Initial setup for all interpreters and environments:

pyenv install 3.8.12
pyenv install 3.9.9
pyenv install 3.10.1
pyenv local 3.8.12 3.9.9 3.10.1
nox

After that it runs much more quickly reusing the created virtualenvs:

nox -r

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

mettmail-0.1.1.tar.gz (22.5 kB view hashes)

Uploaded Source

Built Distribution

mettmail-0.1.1-py3-none-any.whl (38.9 kB view hashes)

Uploaded Python 3

Supported by

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