Skip to main content

Tool for monitoring IMAP mailboxes and retransmitting received emails via alternative channels

Project description

IMAP Mon

PyPI - License 🐍 CI PyPI - Implementation PyPI - Python Version PyPI - Wheel GitHub last commit

Tool for monitoring IMAP mailboxes and retransmitting received emails via alternative channels

Quick start

  1. Create a file docker-compose.override.yml or update docker-compose.yml with environment variables defined below.
  2. Start the app with:
    docker-compose up
    

Settings

Some options can be set via an environment variable (real or dotenv) or a command line flag.

Environment variable name Command line flag Required Description
IMAP_HOSTNAME --hostname/-h ☑️ IMAP server hostname
IMAP_USERNAME --username/-u ☑️ IMAP username
IMAP_PASSWORD --password/-p ☑️ IMAP password/key/token
CHANNELS --channel/-c ☑️ Channel to retransmit messages
TELEGRAM_BOT_TOKEN --telegram-bot-token ☑️/✖️ Telegram Bot Token
TELEGRAM_CHAT_ID --telegram-chat-id ☑️/✖️ Telegram Chat ID (channel ID, group ID or @username)
SENTRY_DSN --sentry-dsn ✖️ Sentry DSN
LOG_LEVEL --log-level/-l ✖️ Log level for console messages

Examples

  1. Get help:
    imapmon --help
    
  2. Passing parameters via a command-line:
    imapmon --hostname imap.example.com -u user@example.com -p qwerty123 -c telegram --telegram-bot-token "1234567890:EtneWwZtnEibpH6WZVsnZimbPXZLRurw" --telegram-chat-id "12345678"
    
  3. Passing parameters via environment variables:
    export IMAP_HOSTNAME=imap.example.com
    export IMAP_USERNAME=user@example.com
    export IMAP_PASSWORD=qwerty123
    CHANNELS=telegram TELEGRAM_BOT_TOKEN=xxx TELEGRAM_CHAT_ID=123 imapmon
    
  4. Run using a pre-built Docker image:
    docker run --rm -it \
        docker.pkg.github.com/soar/imapmon/imapmon:latest \
        --hostname imap.example.com \
        -u user@example.com \
        -p qwerty123 \
        ...
    

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

imapmon-0.6.70.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

imapmon-0.6.70-py3-none-any.whl (4.5 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