From 1b48caf52cf1597b6e5028cd3388f31920c2e88b Mon Sep 17 00:00:00 2001 From: Mario Alegre Date: Sun, 13 Dec 2020 03:07:09 -0500 Subject: [PATCH] added instructions for setting up auto emails --- linux/mail/msmtp.md | 33 +++++++++++++++++++++++++++++++++ linux/zfs/send-email.md | 5 +++++ 2 files changed, 38 insertions(+) create mode 100644 linux/mail/msmtp.md create mode 100644 linux/zfs/send-email.md diff --git a/linux/mail/msmtp.md b/linux/mail/msmtp.md new file mode 100644 index 0000000..82f07c7 --- /dev/null +++ b/linux/mail/msmtp.md @@ -0,0 +1,33 @@ +# lightweight email client + +## install +``` +sudo apt install msmtp-mta mailutils +``` + +## configure +edit `/etc/msmtprc`: +``` +# A system wide configuration file is optional. +# If it exists, it usually defines a default account. +# This allows msmtp to be used like /usr/sbin/sendmail. + +defaults +# Use TLS on port 465 +port 465 +tls on +tls_starttls off + +account default +host $server +# Envelope-from address +from root@hostname +# Authentication +auth on +user $user +password $password +``` +since you will be putting a plaintext password in this config file, make sure it's only readable by root: +``` +chmod og-r /etc/msmtprc +``` diff --git a/linux/zfs/send-email.md b/linux/zfs/send-email.md new file mode 100644 index 0000000..17521a6 --- /dev/null +++ b/linux/zfs/send-email.md @@ -0,0 +1,5 @@ +# config zfs to send emails + +edit `/etc/zfs/zed.d/zed.rc` + +file is pretty self-explanatory