Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (32 loc) · 1008 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 1008 Bytes

mailqtt

Receive emails via SMTP and publish to MQTT.

My usecase is a standard way of fetching events out of IP cameras that don't support ONVIF events, Reolink, in particular.

Even though you might not see a recent release, this piece of software is maintained since I run it in my homelab and I rely on it.

Run it

  1. Create venv and activate it.

  2. pip install -r requirements.txt.

  3. Env vars and defaults:

    • SMTP_PORT=1025
    • MQTT_HOST=localhost
    • MQTT_PORT=1883
    • MQTT_USERNAME=""
    • MQTT_PASSWORD=""
    • MQTT_TOPIC=mailqtt
    • MQTT_RESET_TIME=300
    • MQTT_RESET_PAYLOAD=OFF
    • SAVE_ATTACHMENTS=True
    • SAVE_ATTACHMENTS_DURING_RESET_TIME=False
    • ATTACHMENTS_DIR=/attachments
    • DEBUG=False

Run it in docker

$ docker run -d \
    --name mailqtt \
    --net host \
    --restart always \
    -e "MQTT_USERNAME=mqtt" \
    -e "MQTT_PASSWORD=mqtt" \
    -e "DEBUG=True" \
    -v $PWD/attachments:/mailqtt/attachments \
    ghcr.io/0dragosh/mailqtt:latest