{"id":284,"date":"2023-08-26T22:11:20","date_gmt":"2023-08-26T20:11:20","guid":{"rendered":"https:\/\/it4home.dk\/?p=284"},"modified":"2023-08-26T22:15:25","modified_gmt":"2023-08-26T20:15:25","slug":"setting-up-smtp-mail-to-pushover-notification-with-docker-on-raspberry-pi","status":"publish","type":"post","link":"https:\/\/it4home.dk\/index.php\/2023\/08\/26\/setting-up-smtp-mail-to-pushover-notification-with-docker-on-raspberry-pi\/","title":{"rendered":"Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-top-right\"><a href=\"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/284?print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\" ><\/a><a href=\"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/284?print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\" ><img decoding=\"async\" src=\"https:\/\/it4home.dk\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p class=\"wp-block-paragraph\"><strong>Setting Up SMTP Mail to Pushover Notification with Docker on Raspberry Pi<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 <code>smtp-pushover<\/code> image by <code>mattbun<\/code>, you can set up a simple solution that allows you to send emails to your Raspberry Pi&#8217;s port 25 and have the messages forwarded to your Pushover account. In this guide, we&#8217;ll walk you through the process step by step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisites:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Raspberry Pi with Docker installed.<\/li>\n\n\n\n<li>Basic understanding of Docker and Docker Compose.<\/li>\n\n\n\n<li>Pushover account with User Key and API Token.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: Pull the Docker Image<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first step is to pull the <code>smtp-pushover<\/code> Docker image from the GitHub Container Registry. Open a terminal on your Raspberry Pi and execute the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker pull ghcr.io\/mattbun\/smtp-pushover:main@sha256:bb4a333892e612edbff843c0a8c79112ff0e61a2e605ebcce4755701513f5f38<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Configure Docker Compose<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create a <code>docker-compose.yml<\/code> file in a directory of your choice. Copy and paste the following configuration into the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '3'\n\nservices:\n  smtp-pushover:\n    restart: unless-stopped\n    container_name: smtp-pushover\n    image: ghcr.io\/mattbun\/smtp-pushover\n    ports:\n      - \"25:25\"\n    environment:\n      - PORT=25\n      - PUSHOVER_USER=\"YOUR_PUSHOVER_USER_KEY\"\n      - PUSHOVER_TOKEN=\"YOUR_PUSHOVER_API_TOKEN\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>YOUR_PUSHOVER_USER_KEY<\/code> and <code>YOUR_PUSHOVER_API_TOKEN<\/code> with your actual Pushover User Key and API Token.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Start the Service<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the same directory where you created the <code>docker-compose.yml<\/code> file, open a terminal and run the following command to start the Docker container:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker-compose up -d smtp-pushover<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>-d<\/code> flag stands for &#8220;detached mode,&#8221; which will run the container in the background.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 4: Sending Emails to Port 25<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With just a few simple steps, you&#8217;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!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more information and options, you can refer to the <a href=\"https:\/\/github.com\/mattbun\/smtp-pushover\/pkgs\/container\/smtp-pushover\">official <code>smtp-pushover<\/code> repository<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":286,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-pfsense"],"_links":{"self":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/comments?post=284"}],"version-history":[{"count":1,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/284\/revisions"}],"predecessor-version":[{"id":285,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/posts\/284\/revisions\/285"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/media\/286"}],"wp:attachment":[{"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/media?parent=284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/categories?post=284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it4home.dk\/index.php\/wp-json\/wp\/v2\/tags?post=284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}