LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-10-2005, 03:20 AM   #1
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Rep: Reputation: 15
How to change the mail address of cron messages


Hi.

I've got a cron process asigned to 'john' Linux user. And every error message generated by the process is sent to 'john@myserver.com'.

Since the process runs every hour, John receives 5-6 mails per day with error messages.

How can I make 'cron' not to send the messages to 'john@myserver.com'? It's necessary that the cron process is asigned to 'john' Linux user.

Thank you very much. Regards.
 
Old 06-10-2005, 03:43 AM   #2
trevelluk
Member
 
Registered: Nov 2003
Location: Bristol, UK
Distribution: Debian Lenny, Gentoo (at work)
Posts: 388

Rep: Reputation: 32
You need to alter the MAILTO environment variable for the user concerned. From the crontab (5) manpage:

Quote:
In addition to LOGNAME, HOME, and SHELL, cron(8) will look at MAILTO if it has any reason to send mail as a result of running commands in ``this'' crontab. If MAILTO is defined (and non-empty), mail is sent to the user so named. If MAILTO is defined but empty (MAILTO=""), no mail will be sent. Otherwise mail is sent to the owner of the crontab.
 
Old 06-10-2005, 04:42 AM   #3
guarriman
Member
 
Registered: Nov 2004
Posts: 101

Original Poster
Rep: Reputation: 15
Thank you very much.

I only browsed man crontab(1).
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Odd Cron log messages medmedia Linux - Software 2 12-05-2005 03:22 AM
Cron mail sending using outside SMTP mail server Utah Linux - Software 6 08-24-2005 07:44 PM
redirecting cron messages jomy General 1 12-29-2004 02:35 AM
No More Cron Mail, Cron Error? Xhost Linux - General 3 07-26-2004 04:28 PM
cron daily error messages lhoff Linux - Software 3 03-30-2002 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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