Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi

image_print

Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi

Are you looking for a way to easily push SMTP emails to your Pushover notifications using your Raspberry Pi? With the power of Docker and the smtp-pushover image by mattbun, you can set up a simple solution that allows you to send emails to your Raspberry Pi’s port 25 and have the messages forwarded to your Pushover account. In this guide, we’ll walk you through the process step by step.

Prerequisites:

  1. Raspberry Pi with Docker installed.
  2. Basic understanding of Docker and Docker Compose.
  3. Pushover account with User Key and API Token.

Step 1: Pull the Docker Image

The first step is to pull the smtp-pushover Docker image from the GitHub Container Registry. Open a terminal on your Raspberry Pi and execute the following command:

docker pull ghcr.io/mattbun/smtp-pushover:main@sha256:bb4a333892e612edbff843c0a8c79112ff0e61a2e605ebcce4755701513f5f38

Step 2: Configure Docker Compose

Create a docker-compose.yml file in a directory of your choice. Copy and paste the following configuration into the file:

version: '3'

services:
  smtp-pushover:
    restart: unless-stopped
    container_name: smtp-pushover
    image: ghcr.io/mattbun/smtp-pushover
    ports:
      - "25:25"
    environment:
      - PORT=25
      - PUSHOVER_USER="YOUR_PUSHOVER_USER_KEY"
      - PUSHOVER_TOKEN="YOUR_PUSHOVER_API_TOKEN"

Replace YOUR_PUSHOVER_USER_KEY and YOUR_PUSHOVER_API_TOKEN with your actual Pushover User Key and API Token.

Step 3: Start the Service

In the same directory where you created the docker-compose.yml file, open a terminal and run the following command to start the Docker container:

docker-compose up -d smtp-pushover

The -d flag stands for “detached mode,” which will run the container in the background.

Step 4: Sending Emails to Port 25

You’re all set! You can now send emails to the port 25 on your Raspberry Pi. Any emails sent to this port will be forwarded to your Pushover account as notifications.

Conclusion

With just a few simple steps, you’ve set up your own SMTP server using Docker on your Raspberry Pi and configured it to forward emails to your Pushover notifications. This can be a convenient way to receive important alerts and messages directly on your mobile device. Remember to keep your Pushover User Key and API Token secure and never share them publicly. Happy notifying!

For more information and options, you can refer to the official smtp-pushover repository.

You may also like...