LinuxQuestions.org
Review your favorite Linux distribution.
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 02-02-2004, 12:59 PM   #1
jecoltrin
LQ Newbie
 
Registered: Apr 2002
Posts: 6

Rep: Reputation: 0
Suppress mail notification of cron event?


Hi all, I've got a cron event running every minute to have smail check mail on our Exchange server. The line that runs the event is:

/opt/otrs/bin/./PostMasterPOP3.pl

This produces the following mail message:

From root@foo.com Tue Jan 27 10:26:02 2004
Date: Tue, 27 Jan 2004 10:26:02 +0100 (CET)
From: root@foo.com (Cron Daemon)
To: root@foo.com
Subject: Cron <root@foo> /opt/otrs/bin/./PostMasterPOP3.pl
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>

No messages (domain_name\otrs/foo@172.25.25.25)
Connection to 172.25.25.25 closed.

The problem is that every time the command runs, it produces a mail message, leaving me with 8500 emails after a four day weekend, and I usually just delete them from smail manually:

"/var/mail/root": 8616 messages 12 new 8616 unread
>N8605 root@foo.com Mon Feb 2 09:45 20/605 Cron <root@foo> /opt/
N8606 root@foo.com Mon Feb 2 09:46 20/605 Cron <root@foo>

Is there a switch I can add to the end of the command to suppress the emails from being generated?

Thanks,
Jason
 
Old 02-02-2004, 01:30 PM   #2
Gnuru
Member
 
Registered: Jan 2004
Posts: 53

Rep: Reputation: 15
Putting MAILTO="" at the top of the crontab normally suppresses output. But may be you don't want that. It's probably better just to redirect output to dev/null thus:

/opt/otrs/bin/./PostMasterPOP3.pl > /dev/null
 
Old 02-02-2004, 01:37 PM   #3
jecoltrin
LQ Newbie
 
Registered: Apr 2002
Posts: 6

Original Poster
Rep: Reputation: 0
Cool thanks! works fine

Redirecting output > /dev/null works fine, thanks for your help!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cron e-mail notification adm1329 Linux - Newbie 1 06-20-2004 08:27 PM
Suppress startup notification in Gnome? Jimmy_C Linux - General 1 12-21-2003 01:38 PM
event notification for resolution change?? pndhana General 6 09-22-2002 06:10 PM
event notification for resolution change?? pndhana Linux - Newbie 1 09-22-2002 06:04 AM
event notification for resolution change?? pndhana Programming 0 09-22-2002 12:49 AM


All times are GMT -5. The time now is 01:23 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration