crontab - fetchmail sends output to mail spool
Hi all,
I'm new to mail via the CLI, so bear with me. I have this line in my crontab: Code:
*/5 * * * * fetchmail Code:
Fetchmail: no mail for me@there.who at pop.whatever.net Any clue? |
cron sends output to you by default. I'm not sure whether you can change it, but the simple solution is just to redirect the output to /dev/null. This is what I do:
*/1 * * * * /usr/bin/fetchmail -K > /dev/null 2>&1 |
From the stock crontab for root:
"If you don't want the output of a cron job mailed to you, you have to direct any output to /dev/null." :) |
Just for info, I set fetchmail up by create an rc.fetchmail file in /etc/rc.d and then linking to that in rc.local. It isn't recommended that you run as root however I found this to be the way I preferred to have it running. It allows me to stop, start and restart whenever I want just as you do with any other daemon.
|
All times are GMT -5. The time now is 06:54 PM. |