Posts

Showing posts with the label output

ssmtp to email cron output

ssmtp to email cron output Cron output in Ubuntu gets discarded. The default install of Ubuntu does not install a Mail Transport Agent (MTA), so cron cannot mail you the output. You can install an MTA -several are easily available in the Ubuntu repositories- but configuration is not trivial. MTAs date from before the IMAP- and SMTP-based e-mail systems we use today, which makes them highly flexible and configurable...but not necessarily the easiest solution. ssmtp is a limited-purpose MTA intended to replace the mail command and send all output to an SMTP mailserver. ssmtp is provided by the ssmtp package. Install sudo apt-get install ssmtp Configuration file #1: /etc/ssmtp/ssmpt.conf This tells ssmtp how to send email to my account. Its not the best idea to store your e-mail password in world-readable plain text. See how to protect the password properly. # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root...