I'm trying to get my Pi to take a photo and email it to me on boot up.
I can run a python script which will do exactly as I want, the problem comes when trying to run it automatically on boot using crontab.
I have attached the boot log below. What is baffling me is references to 2 different email settings, particularly those referring to mail.btinternet.com.
I initially set the etc/msmtprc file with mail.btinternet.com settings. When that did not work, I switched to send.one.com settings, which work fine when running the python script.
The question really is about where the pi is getting that mail.btinternet.com stuff from, as it most certainly is not mentioned in my etc/msmtprc file?
Thanks,
CJ
Code: Select all
Mar 27 15:54:04 raspberrypi crontab[1568]: (root) BEGIN EDIT (root)
Mar 27 15:56:44 raspberrypi crontab[1568]: (root) REPLACE (root)
Mar 27 15:56:44 raspberrypi crontab[1568]: (root) END EDIT (root)
Mar 27 15:57:01 raspberrypi cron[394]: (CRON) INFO (pidfile fd = 3)
Mar 27 15:57:01 raspberrypi cron[394]: (CRON) INFO (Running @reboot jobs)
Mar 27 15:57:03 raspberrypi cron[601]: sendmail: cannot locate host mail.btinternet.com: Temporary failure in name resolution
Mar 27 15:57:03 raspberrypi cron[601]: sendmail: could not send mail (account default from /etc/msmtprc)
Mar 27 15:59:21 raspberrypi crontab[1379]: (root) BEGIN EDIT (root)
Mar 27 15:59:58 raspberrypi crontab[1379]: (root) REPLACE (root)
Mar 27 15:59:58 raspberrypi crontab[1379]: (root) END EDIT (root)
Mar 27 16:00:01 raspberrypi cron[394]: (root) RELOAD (crontabs/root)
Mar 27 16:02:10 raspberrypi crontab[1431]: (root) BEGIN EDIT (root)
Mar 27 16:02:15 raspberrypi crontab[1431]: (root) END EDIT (root)
Mar 27 16:02:19 raspberrypi crontab[1437]: (root) BEGIN EDIT (root)
Mar 27 16:03:34 raspberrypi crontab[1437]: (root) REPLACE (root)
Mar 27 16:03:34 raspberrypi crontab[1437]: (root) END EDIT (root)
Mar 27 16:03:48 raspberrypi cron[391]: (CRON) INFO (pidfile fd = 3)
Mar 27 16:03:48 raspberrypi cron[391]: (CRON) INFO (Running @reboot jobs)
Mar 27 16:03:55 raspberrypi cron[773]: sendmail: cannot connect to mail.btinternet.com, port 465: Network is unreachable
Mar 27 16:03:55 raspberrypi cron[773]: sendmail: could not send mail (account default from /etc/msmtprc)
Mar 27 16:17:01 raspberrypi CRON[1581]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Mar 27 16:25:51 raspberrypi cron[366]: (CRON) INFO (pidfile fd = 3)
Mar 27 16:25:51 raspberrypi cron[366]: (CRON) INFO (Running @reboot jobs)
Mar 27 16:25:58 raspberrypi cron[774]: sendmail: cannot connect to send.one.com, port 587: Network is unreachable
Mar 27 16:25:58 raspberrypi cron[774]: sendmail: could not send mail (account default from /etc/msmtprc)
Mar 27 16:33:48 raspberrypi crontab[1491]: (root) BEGIN EDIT (root)
Mar 27 16:39:16 raspberrypi cron[380]: (CRON) INFO (pidfile fd = 3)
Mar 27 16:39:16 raspberrypi cron[380]: (CRON) INFO (Running @reboot jobs)
Mar 27 16:39:24 raspberrypi cron[782]: sendmail: cannot connect to send.one.com, port 587: Network is unreachable
Mar 27 16:39:24 raspberrypi cron[782]: sendmail: could not send mail (account default from /etc/msmtprc)