Skip to content

mailrise mailrise

mailrise is my primary notification system, centralizing credentials and supporting various notification types. Its ease of use with curl or smtp tools makes it highly effective.

๐Ÿ›  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
  all:
    urls:
      - !env_var EMAIL_URL
      - !env_var NTFY_URL
      - !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 sensitive configuration files using SOPS.
* default:           List all available tasks.
* encrypt:           Encrypt sensitive configuration files using SOPS.
* export:            Export the task list to `task-list.txt`.
* init:              Initialize the application's environment and configuration files.
* mklinks:           Create symbolic links for configuration files.
* restart:           Restart the application's Docker containers.
* status:            Check the status of the application's service or Docker containers.
* stop:              Stop the application's Docker containers.
* test:              Send a test email
* test-remote:       Send a test email to remote address
* up:                Run Docker Compose in the foreground.
* up-d:              Run Docker Compose in the background.
* update:            Update the application or its running containers.
* upgrade:           Upgrade the application by pulling the latest changes and updating.
* watch:             Watch the application's Docker container logs.

๐Ÿ”— References