Simple script to email log file (or whatever)

This is a simple method of emailing a log file, or any sort of text file, automatically (just add a line like this to cron) – and, obviously, you might not want to use this for any sort of very large file:

30 1 * * * cat /var/log/vsftpd.log | mail -s "VSFTPD_LOG" my_email@mydomain.net

Leave a Reply

Your email address will not be published.