[Solved] Email from Command Line
When I try to send an email via the command line though, I get
mail: command not found
I'm not sure how Postfix works, but is there another tool I should be installing to make this work, or is it something I can configure within Postfix?
Here's the script I'm running btw:
#!/bin/sh
( rkhunter --versioncheck
rkhunter --update
rkhunter --cronjob --report-warnings-only
) | mail -s "Rkhunter Output" michael@problogdesign.com
Really appreciate any ideas on what to try, thanks!
3 Replies
e.g., for CentOS:
yum install mailx
It may be in /usr/lib or /usr/sbin (or both!)
eg
#!/bin/sh
(
echo To: michael@problogdesign.com
echo Subject: Rkhunter Output
echo
rkhunter --versioncheck
rkhunter --update
rkhunter --cronjob --report-warnings-only
) | /usr/lib/sendmail -t
Sweh - That worked perfectly, thanks so much! Using it now