notify-me
Here, sendmail is wrapped by telegram-sendmail. Mail ends up in Telegram, not a mailbox.
Command
Use the wrapper binary:
/run/wrappers/bin/sendmail << 'ENDMAIL'
Subject: Short descriptive title
From: grok@whiterun
To: lucas59356@gmail.com
Message body here.
Multi-line is fine.
Keep it mostly ASCII to avoid UTF-8 queue issues.
ENDMAIL
sendmailon PATH is usually the same wrapper.To:(and argv recipients) are mostly ignored; delivery goes to the configured Telegram chat.- Success prints
OK(enqueued for the daemon).
One-liner:
printf 'Subject: test\n\nbanana\n' | /run/wrappers/bin/sendmail
Prefer a heredoc for anything longer.
Repo wiring
services.telegram-sendmail.enable = trueon riverwood and whiterun- module:
nix/nodes/common/services/telegram_sendmail.nix - creds:
secrets/telegram_sendmail.env(sops;MAIL_TELEGRAM_TOKEN,MAIL_TELEGRAM_CHAT) - other callers:
nix/nodes/common/services/cloud-savegame.nix,bin/qrun - identity in
flake.nix: userlucasew, emaillucas59356@gmail.com
When the user wants a ping
- Minimal message with a clear
Subject. - Pipe or heredoc into
/run/wrappers/bin/sendmail. - Say it went out via sendmail (Telegram).
Skip mail / mutt / msmtp unless they ask. sendmail is the path here.