Sign inSign up

azmodan2k/smtp2pushover

By azmodan2k

•Updated over 1 year ago

smtp to pushover mail server with complete env or config implementation

Image
Internet of things
1

1.7K

azmodan2k/smtp2pushover repository overview

⁠smtp-pushover

smtp to pushover mail server with complete env or config implementation pushover⁠

  • The destination email domain doesn't matter, smtppushover will forward all emails to passed appToken
  • The subject of the email becomes the title of the push notification
  • The contents of the email become the text of the push notification (html enabled if it is html)

⁠Overview

⁠How do I use it?

Docker images are available at Docker Hub⁠.

To use it with docker compose, you could configure it like with

⁠env configuration
services:
  smtppushover:
    container_name: smtppushover
    hostname: smtppushover
    restart: always
    image: azmodan2k/smtp2pushover
    ports:
      - "25:25"
    environment:
      - pushover_usertoken=xxx
      - smtp_port=25 # optional, defaults to 25
      - smtp_authOptional=true # optional, defaults to true
      - smtp_secure=false # optional, defaults to false
      - smtp_allowInsecureAuth=false # optional, defaults to false
      - smtp_disabledCommands=xxx,yyy # optional, defaults to []
      - smtp_logger=true # optional, defaults to true
    cap_add:
        - NET_ADMIN
⁠bind mount

create a json config file

{
    "smtpConfig": {
      "port": 25,
      "authOptional": true,
      "secure": false,
      "allowInsecureAuth": false,
      "logger": true
    },
    "pushoverConfig": {
      "userToken": "xxx"
    }
}

and bind mount it to docker container

services:
  smtppushover:
    container_name: smtppushover
    hostname: smtppushover
    restart: always
    image: azmodan2k/smtp2pushover
    ports:
      - "25:25"
    volumes:
      - ./data/config.json:/app/config/config.json
      - /etc/localtime:/etc/localtime:ro      
    cap_add:
        - NET_ADMIN

start it with

docker compose up

Now, if you configure a smtp client to use localhost:25, you can send notifications with:

printf "To: [email protected]\nTo: [email protected]\nSubject: subject\n\n<b>text</b>\n" | msmtp -v --host localhost --port 25 --from [email protected] -t

Tag summary

Content type

Image

Digest

sha256:ae8b78e90…

Size

45.2 MB

Last updated

over 1 year ago

docker pull azmodan2k/smtp2pushover