Skip to content

mailrise mailrise

mailrise An SMTP gateway for Apprise notifications.

๐Ÿ›  Installation

Default Port: 8025

homelab/docker/mailrise

task up
docker compose up

โš™ Config

homelab/docker/mailrise/.env

EMAIL_URL=mailto://user:[email protected]
NFTY_URL=ntfy://ntfy.l.nicholaswilde.io/topic
GOTIFY_URL=gotify://gotify.l.nicholaswilde.io/token
homelab/docker/mailrise/compose.yaml
---
services:
  mailrise:
    image: yoryan/mailrise:latest
    container_name: mailrise
    env_file:
      - .env
    ports:
      - "8025:8025"  # Map container port 8025 to host port 8025
    volumes:
      - ./mailrise.yaml:/etc/mailrise.conf  # Mount your config file
    command: -vvv /etc/mailrise.conf
    restart: unless-stopped
homelab/docker/mailrise/mailrise.yaml
---
configs:
  email:
    urls:
      - !env_var EMAIL_URL
    mailrise:
      title_template: "${subject}"
      body_template: "${body}"
      body_format: text
  ntfy:
    urls:
      - !env_var NTFY_URL
    mailrise:
      title_template: "${subject}"
      body_template: "${body}"
      body_format: text
  gotify:
    urls:
      - !env_var GOTIFY_URL
    mailrise:
      title_template: "${subject}"
      body_template: "${body}"
      body_format: text

# smtp:
#   auth:
#     basic:
#       username: password

๐Ÿงช Test

Code

curl \
    --url 'smtp://smtp.l.nicholaswilde.io:8025' \
    --mail-from '[email protected]' \
    --mail-rcpt '[email protected]' \
    --upload-file - <<EOF
From: Test Sender <[email protected]>
To: [email protected]
Subject: This is a test email

This is the body of the test email from curl.
EOF
swaks \
    --to [email protected] \
    --server smtp.l.nicholaswilde.io:8025 \
    --body "this is the body" \
    --header "Subject: subject"'

Traefik

homelab/pve/traefik/conf.d/mailrise.yaml
# ---
# tcp:
 # #region routers
  # routers:
    # mailrise:
      # entryPoints:
        # - "mailsecure"
      # rule: "HostSNI(`smtp.l.nicholaswilde.io`)"
      # service: mailrise
      # tls:
        # passthrough: true
# #endregion
# #region services
  # services:
    # mailrise:
      # loadBalancer:
        # servers:
          # - address: "192.168.2.62:8025"
# #endregion

Task List

task: Available tasks for this project:
* decrypt:           Decrypt .env using SOPS
* encrypt:           Encrypt .env using SOPS
* export:            Export the task list
* init:              Init
* mklinks:           Make client symlinks
* restart:           Restart Docker containers
* status:            Status
* stop:              Stop registry container
* test:              Send a test email
* test-remote:       Send a test email to remote address
* up:                Tun Docker compose in the foreground.
* up-d:              Run Docker compose in the background.
* update:            Update running containers
* upgrade:           Upgrade running containers

๐Ÿ”— References