Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ip_address="1.2.3.4"
- from_user="monitoring@foobar.com"
- to_user="user@foobar.com"
- smtp_host="mail.foobar.com"
- smtp_user="monitoring@foobar.com"
- smtp_password="foobar"
- df -h | grep -E "(Filesystem|sda)" | mail -S smtp-auth-user=${smtp_user} -S smtp-auth-password=${smtp_password} -S smtp=${smtp_host} -s "[LOG] ${ip_address} Disk Usage Report $(date +\%y/\%m/\%d)" -r ${from_user} -c ${to_user} ${to_user}
- # cat msg | mail -b "bcc_user@foobar.com" -s "Email" "user@foobar.com"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement