LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-06-2010, 11:20 AM   #1
mkoco
Member
 
Registered: Feb 2008
Location: US, New Jersey
Distribution: Slackware
Posts: 88

Rep: Reputation: 17
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
Which does check my mail every 5 minutes fine. But I get the command-line output mailed to me every 5 minutes as well. So I get a message in my mail spool every 5 minutes containing something like:
Code:
Fetchmail: no mail for me@there.who at pop.whatever.net
Fetchmail: 2 messages for metoo@nohere.themoon at pop.megadeuce.pillow
reading messages for metoo@nohere.themoon....

..etc
This doesn't happen when I run fetchmail by hand.

Any clue?
 
Old 01-06-2010, 11:24 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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
 
Old 01-06-2010, 03:39 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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."

 
Old 01-06-2010, 03:52 PM   #4
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 572

Rep: Reputation: 120Reputation: 120
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.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Evolution mail with Exchange server only sends mail.(don't recieve/download) knockout_artist Linux - Newbie 5 05-03-2012 03:42 PM
spam_buttons move from /var/spool/mail/user to $HOME/mail/Junk paul_mat Linux - Software 0 05-25-2006 02:07 AM
/dev/ht0 is writing output to /var/spool/mail/root getza1 Linux - Software 0 04-09-2006 03:00 PM
Import Mail from /var/spool/mail (sendmail) to a MailDir Format in Postfix shawnbishop Linux - Software 0 04-06-2006 10:44 AM
sendmail error Fetching mail could not lock /var/spool/mail/username sukhdev50 Linux - Networking 0 05-04-2005 03:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration