[ale] crontab forward remove e-mail

Jerry Z. Yu z.yu at voicecom.com
Wed Sep 25 13:11:44 EDT 2002


possibly I missed something here... that said, 
---------------------------------------------
Any output (stdout or stderr) from cron jobs will be mailed to owner of 
the cron, be it root or a regular user on the system. You can simply 
define an alias for that user in /etc/aliases so that those cron mails 
be forwarded to the aliased account Alternatively and less favorably, you 
can use $HOME/.forward file for that user to forward all his/her mail to a 
different account.


On Wed, 25 Sep 2002 moisey.g.oysgelt at mail.sprint.com wrote:

#Thank you for responses
#this is the solution
#
##!/usr/bin/ksh
## read Mail from mailbox and forward it to ..
## adopted for Linux 
## Created by moisey Oysgelt 11/21/01 8:21AM
#
#TMPFILE=~/monitors/logs/tmp_mail.log
#
#while [[ 1 -eq 1 ]] ; do
# echo p |  mail > $TMPFILE 2>&1
#  if [[ $? -ne 0 ]] ; then
#    exit;
#  fi
#  if [[ -s $TMPFILE ]] ; then
#    mail moisey.g.oysgelt at mail.sprint.com  -s `hostname` < $TMPFILE
#  fi
#
#done
#
#
#
#-----Original Message-----
#From: moisey.g.oysgelt [mailto:moisey.g.oysgelt at mail.sprint.com]
#Sent: Tuesday, September 24, 2002 9:17 AM
#To: ale
#Subject: [ale] crontab forward remove e-mail
#
#
#Hello experts!!
#I created ,for monitoring purposes , a process   forward e-mail created 
#by crontjob to my windows account, and delete the same mail from UNIX 
#box.
#
#I wrote and tested  a KORN script  :
#
##!/usr/bin/ksh
#keeplooping=1;
#
#while [[ $keeplooping -eq 1 ]] ; do
#  echo m moisey at sprint.com| /usr/bin/mail >/dev/null
#  if [[ $> -ne 0 ]] ; then
#    break;
#  fi
#done
# 
#This script successfully runs in OS Solaris , but I could not make it 
#run under Linux Suse, I have installed korn shell in the Linux box.
#
#
#My question is  :  Do you have a similar script for Linux  or Is there 
#better way to do the same task in the Linux environment ? 
#
#
#
#Moisey Oysgelt 
#      Proposal, Engineering & Pricing Software 
#      Sprint->NIS->OSPI->ADM->PEPS 
#      Business Phone: 404.649.5374 
#      Business Fax:  404.649.5437 
#      3100 Cumberland Circle 
#      Atlanta GA 30339 
#      Mailstop: GAATLN0515
#
#
#      Moisey.G.Oysgelt at mail.sprint.com 
#
#
#
#---
#Outgoing mail is certified Virus Free.
#Checked by AVG anti-virus system (http://www.grisoft.com).
#Version: 6.0.391 / Virus Database: 222 - Release Date: 09/19/02
# 
#
#
#---
#This message has been sent through the ALE general discussion list.
#See http://www.ale.org/mailing-lists.shtml for more info. Problems 
#should be 
#sent to listmaster at ale dot org.
#
#
#---
#Incoming mail is certified Virus Free.
#Checked by AVG anti-virus system (http://www.grisoft.com).
#Version: 6.0.391 / Virus Database: 222 - Release Date: 09/19/02
#
#---
#Outgoing mail is certified Virus Free.
#Checked by AVG anti-virus system (http://www.grisoft.com).
#Version: 6.0.391 / Virus Database: 222 - Release Date: 09/19/02
# 
#
#
#---
#This message has been sent through the ALE general discussion list.
#See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
#sent to listmaster at ale dot org.
#

Jerry Z. Yu				+1-404-487-8544 (O)
systems engineer			z.yu at voicecom.com
is support, voicecom, llc		www.voicecom.com


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list