passing text to sendmail


Recommended Posts

I don't have much sendmail experience so this may be a stupid question. I'm trying to figure out how to have logs emailed to me using sendmail at a certain time. I know I would use cron for the latter, but as for emailing logs, e.g. /var/log/syslog, what would I do? Would I just pass the log to sendmail and is this even possible? Could I do something like:

cat /var/log/syslog | mail -s "subject about logs" myemail@address.com

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.