Skip to main content

Checks if a configured email forwarding is working

Project description

Email Forwarding Checker

A small programm that periodically checks if a configured email forwarding for different addresses is working by sending test emails. Purpose is that you will get a notification via MQTT if forwarding stops working and it does not go unnoticed.

How it works

Configure a list of email addresses that should be checked. For those addresses there should be a forwarding configured. Then test emails will be sent periodically to those email adresses via a configurable SMTP server.

Lastly, it will be checked if the test emails arrived at the destination by looking into a configurable IMAP postbox. If the test emails do not arrive there within a specific amount of time, then the forwarding is considered to be not working.

Hot to use it

Install the Python package via pip, install it from source or use the docker image:

docker pull ghcr.io/verybadsoldier/email_forwarding_checker

Docker

Example docker-compose.yml:

version: '3'
services:
  email_forwarding_checker:
    image: ghcr.io/verybadsoldier/email_forwarding_checker:0.2.2
    container_name: email_forwarding_checker
    volumes:
      - ./config.yml:/config.yml
    restart: always
    environment:
      - TZ=Europe/Berlin

Configuration

Example config:

smtp:
  host: smtp.zoho.com
  username: myuser
  password: mypasswd
  sender: checker@check.com

imap:
  host: imap.zoho.com
  username: myimapuser
  password: myimappw

mqtt:
  host: 192.168.2.33
  topic_base: home/email_forwarding_checker

daemon:
  check_interval_hours: 1
  run_now: true  # run once instantly upon startup, then every check_interval_hours hours

email_timeout: 2400  # if the test email does not arrive with this time in seconds, then the forwarding is considered to have failed
repeat_interval: 5  # within email_timeout, check every n seconds for the test email
delete_emails: false  # delete the test emails from the IMAP postbox after arrival
emails:
        - address1@gmail.com
        - address2@gmail.com
        - address3@gmail.com

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

email_forwarding_checker-0.3.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

email_forwarding_checker-0.3.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file email_forwarding_checker-0.3.3.tar.gz.

File metadata

File hashes

Hashes for email_forwarding_checker-0.3.3.tar.gz
Algorithm Hash digest
SHA256 3de97eabbba3f1cfa6d5c05acd16aedff4a5c5dc087bfec5320fde73dd8f7d53
MD5 5e07161c3adde8d429a99da5ede5928c
BLAKE2b-256 87afee6a1190a052e3a947a51ef2c0ac435a8f67be3f7c7dcb911852df50a381

See more details on using hashes here.

File details

Details for the file email_forwarding_checker-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for email_forwarding_checker-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 80cef44b920fdc4da6ff4c3c1eae81e1a5c97cca59e8a957aa6097d2f3472ace
MD5 0eb745d44bdf1347a51b79fbd7370850
BLAKE2b-256 13158d16c16e9aaa51c3846bbf51c28b73352973f5376d34fae9cf4b990041c9

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