LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-16-2007, 01:17 PM   #1
fyr3
LQ Newbie
 
Registered: Sep 2005
Distribution: Slackware 12.2
Posts: 19

Rep: Reputation: 0
cron e-mail output


so, im new to linux, but im confused on where exactly the cron mail notifications go. If i want it to go to a certain e-mail address what do i do. And what mail program does cron use by default?!? Thanks.
 
Old 07-16-2007, 02:51 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
If a cron job has output, and only if it has output, this output is mailed to the cron job owner. So, look for the user's e-mail. The system e-mails are stored at /var/spool/mail.
Cron does not use a mail program like thunderbird or evolution, if it is what you mean. It uses whatever is listening on SMTP port (25/TCP) on localhost. Theses programs are called MTA (Mail Transport Agent) and commom MTAs are sendmail or postfix.

You can configure a program like evolution to read e-mails on a local system. Specify a file at /var/spool/mail as source.

You can use a program like "mail" in command line to read e-mails in text mode, but I don't advice you to do this if you is a newbie.
Code:
[root@agente86 nagios]# ls -l /var/spool/mail
total 1888
...
-rw-rw---- 1 nagios    mail 1758440 2007-06-13 09:46 nagios
...
[root@agente86 nagios]# mail -f /var/spool/mail/nagios
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/nagios": 697 messages 697 new
>N  1 MAILER-DAEMON@agente  Mon Jun 11 17:28  67/2592  "Warning: could not send message for past 4 hours"
 N  2 MAILER-DAEMON@agente  Mon Jun 11 17:28  67/2597  "Warning: could not send message for past 4 hours"
 N  3 MAILER-DAEMON@agente  Mon Jun 11 17:28  67/2599  "Warning: could not send message for past 4 hours"
 ...
& x
[root@agente86 nagios]#

Last edited by marozsas; 07-16-2007 at 02:57 PM.
 
  


Reply



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
cron output nelamvr6 Linux - Newbie 3 10-18-2005 07:11 PM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
Sending output to mail account through cron. gian2oo1 Slackware 2 01-18-2005 12:54 PM
No More Cron Mail, Cron Error? Xhost Linux - General 3 07-26-2004 04:28 PM
cron output? sk8guitar Linux - General 4 08-15-2003 01:55 PM

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

All times are GMT -5. The time now is 04:27 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