Mutt is a sophisticated email client for linux terminal. It supports MIME, GPG, PGP and threading. In this tutorial I wont expand to report full use of the software because the whole point is to show you how to setup a basic but promising email notification system for your servers, so you can customize it as much as you want and without waiting some other software to do the job automatically.
Install mutt
Open your terminal and connect with ssh or just type
1 |
sudo apt-get install mutt |
Period.
Send an email from mutt
type :
1 |
echo "test" | mutt -s This-is-my-subject test@whatever.com |
so simple right?
Send command output via email from muttTips
1 |
whois google.com | mutt -s Whois-google test@whatever.com |
or (this shows who rebooted the machine)
1 |
last | grep reboot | mutt -s Last-Reboot-Poweroff-Notification test@whatever.com |
or (this shows who’s currently logged in)
1 |
w | mutt -s Last-Reboot-Poweroff-Notification test@whatever.com |
Period again.
Keep in mind this tutorial. Will be updated with more tips for notifications.
thnx a lot,
Specktator