Subject: Re: Cron mail
To: yo _ <exhausted01@hotmail.com>
From: Steven M. Bellovin <smb@research.att.com>
List: port-i386
Date: 01/27/2003 16:56:16
In message <F162PNXRPmcarcR4ZDg00000024@hotmail.com>, "yo _" writes:
>Hi, this is quite the "newbie-ish" question, but i wasn't sure how else to 
>get the answer to it. I have 3 cron scripts that are ran daily, and 
>according to the cron man page, it sends the STDOUT of the script to owner 
>of the crontab each time it is ran through mail. This is very unnecessary 
>for some of the scripts i run (or actually all of them) and i was wondering 
>if there was any way i could disable this behaviour. Also, (another mail 
>related question) everytime i reboot my machine i get a message sent to 
>root, about a file edited with vi about 2 months ago, i've only recently 
>taken notice that this is the same email i get every reboot. What is causing 
>this, and what file should i delete to keep my machine from sending stray (i 
>think) emails out. thanks!

What do you want done with the output?  The easiest thing is to change 
the crontab entry to include

		>/tmp/cron-log-1 2>&1

You could set it to /dev/null to discard the output, but it's often 
nice to have some log to go back to.

As for the file -- log in as the affected user, and type

	vi -r

which will list the vi recovery files.  Then do 

	vi -r filename

to recove it, and then :q! to exit without saving.

		--Steve Bellovin, http://www.research.att.com/~smb (me)
		http://www.wilyhacker.com (2nd edition of "Firewalls" book)