惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
博客园 - 聂微东
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
M
MIT News - Artificial intelligence
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
L
LangChain Blog
I
InfoQ
T
Tailwind CSS Blog
博客园 - 【当耐特】
V
V2EX
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
Vercel News
Vercel News
雷峰网
雷峰网
量子位
A
About on SuperTechFans
Martin Fowler
Martin Fowler
H
Help Net Security

Leo's Field

Don't nuke my docker network, nftables.service! - Leo's Field Sending Emails, with netcat - Leo's Field Have fun with ZFS: Maintenance and Error Recovery - Leo's Field Have fun with ZFS: Tuning - Leo's Field Have fun with ZFS: Setting up storage pool - Leo's Field 2021 Recap: Seek - Leo's Field Deploying this site on CloudFlare Pages - Leo's Field Redesigning this blog - Leo's Field Homelab Project: 6 months in - Leo's Field Fix incompatible bytes library for actix-web and tokio - Leo's Field A Breif Look at Linux's Audio System - Leo's Field Record to MiniDisc with correct Track Marker on Linux - Leo's Field Build Fcitx5 IM module for proprietary software with its Qt library - Leo's Field Way to AOSC OS Maintainer: Advanced Techniques - Leo's Field Way to AOSC OS Maintainer: Basics - Leo's Field Have fun with ZFS: Introduction - Leo's Field Fix clipboard permission on Android 10 - Leo's Field MDR-7506 Detachable Cable Mod - Leo's Field Update firmware of a Crucial SSD with systemd-boot - Leo's Field Install Arch Linux, using a Sony Walkman - Leo's Field Coreboot, me_cleaner, Tianocore, ThinkPad X220 - Leo's Field Dark mode! - Leo's Field Links - Leo's Field Some notes about the creation of this blog - Leo's Field Hello, world! - Leo's Field About - Leo's Field
Use ZED with msmtp on Debian - Leo's Field
Leo Shen · 2022-06-22 · via Leo's Field

More Notes

Send email notification when things go wrong

Install msmtp and its mta.

1
apt install msmtp msmtp-mta mailutils

Edit /root/.msmtprc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        ~/.msmtp.log

aliases        /etc/aliases

account        alerts
host           SMTP_ADDRESS
port           587
from           SENDER_EMAIL_ADDRESS
user           SMTP_ACCOUNT
password       SMTP_PASSWORD 

account default : alerts

Edit /etc/zfs/zed.d/zed.rc:

  • Change ZED_EMAIL_ADDR to your desired mailbox
  • Uncomment ZED_EMAIL_PROG=mail
  • Uncomment ZED_EMAIL_OPTS and edit value: "-s '@SUBJECT@' @ADDRESS@ -r [email protected]"
  • Uncomment ZED_NOTIFY_VERBOSE=1

    • For testing only, change to 0 to ignore events on healthy pools

Scrub a pool and wait till finish to send a test email.

Published on Jun 22, 2022