I have 2 scripts in crontab -e:
0 0 */3 * * /bin/bash /home/user/scripts/3day-san-backup.sh >> /var/log/3day-san-backup.log2>&1
0 0 */1 * * /bin/bash /home/user/scripts/1day-pny-backup.sh >> /var/log/1day-pny-backup.log 2>&1
They dont work, so I check cron logs. Also, the custom log files I made are empty.
Jun 21 08:09:01 goofy-server CRON[55054]: (user) CMD (/bin/bash /home/user/scripts/1day-pny-backup.sh >> /var/log/1day-pny-backup.log 2>&1)
Jun 21 08:09:01 goofy-server CRON[55052]: (user) MAIL (mailed 74 bytes of output but got status 0x004b from MTA#012)
So the mail doesn't work so I try to download something:
I ran sudo apt-get install postfix
, then cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
, then I added inet_interfaces = loopback-only
in the new file. I just want to setup the mail system locally so I can read the cron logs. But when I type mail
, it just says Cannot open mailbox /var/mail/user: No such file or directory.
I do have /var/spool/mail
though, but that directory is empty. Though, when I check the cron logs again, I don't get that error that says something about the mail. Where is the mail, and why are my custom logs empty?