Cron Job email system log files?

General support questions including new installations
Post Reply
rencya6
Posts: 1
Joined: 2016/03/03 08:00:55

Cron Job email system log files?

Post by rencya6 » 2016/03/03 08:07:16

I'm new here and I've tried searching for the answer here and through google. Course the terms mail and logs, brings up tons of hits for email logs. Anyways, I'd like to setup a cron job that will email me certain log files every morning. How do I get started.

Thanks

Ren
cong ty thông cống nghẹt gia re, dich vu rut ham cau chuyen nghiep

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Cron Job email system log files?

Post by aks » 2016/03/03 17:56:39

You can use the mailx program to send mail (assuming you've already setup your postfix to act as a relay or whatever you require) and then use something like mailx -s '<subject>' -a <file_to_attach> <address_to_send_it>
man mailx lists the (lots of) options.

Post Reply