Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 02-02-2004, 12:59 PM   #1
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:


This produces the following mail message:

From Tue Jan 27 10:26:02 2004
Date: Tue, 27 Jan 2004 10:26:02 +0100 (CET)
From: (Cron Daemon)
Subject: Cron <root@foo> /opt/otrs/bin/./
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@
Connection to 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 Mon Feb 2 09:45 20/605 Cron <root@foo> /opt/
N8606 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?

Old 02-02-2004, 01:30 PM   #2
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/./ > /dev/null
Old 02-02-2004, 01:37 PM   #3
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!


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 09:13 AM.

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