[GE users] emali setup for users

Dan Gruhn Dan.Gruhn at Group-W-Inc.com
Thu Feb 24 14:56:38 GMT 2005


One thing I did to help with the execution host configuration is to
change the mailer to be my own local script.  This was to ensure that
mail would be sent to the domain email handler, rather than to the local
host as it would normally be.  The script is below.

-Dan

#! /bin/bash

# Get the type of machine we are on
ARCH="`$SGE_ROOT/util/arch`"

case $ARCH in
sol*)
	mailCmd="/bin/mailx"
	;;

lx*)
	mailCmd="/bin/mail"
	;;
esac

# Get subject and email address
subject="`echo "$@" | sed -e 's/-s \(.* \)\([^ @][^ @]*\)@[^ @][^
@]*/"\1"/'`"
emailAddress="`echo "$@" | sed -e 's/.* \([^ @][^ @]*@[^ @][^
@]*\)$/\1/'`"

# Mail sure that things to our domain go to the domain email server
case $emailAddress in

*group-w-inc.com | *localhost | *localhost.localdomain)
	emailAddress="`echo $emailAddress | sed -e
's/\([^@]*\)@.*/\1 at group-w-inc.com/'`"
	;;
esac

# Send out the mail
$mailCmd -s "$subject" $emailAddress

On Thu, 2005-02-24 at 09:47, John Hearns wrote:

> On Wed, 2005-02-23 at 19:14 -0500, Steve wrote:
> > Apologies upfront if I'm missing something totally obvious.
> > 
> > Is there a way to setup email within SGE 6 for each user, such that when 
> > a job completes/dies or is killed, they automatically get emailed.
> As Ron says, look at the  -m  option!
> 
> Also please realise that in SGE 6, the email is sent by the execution
> host. In SGE 5 the qmaster host sent the emails.
> So all your compute nodes have to have email correctly configured.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
> For additional commands, e-mail: users-help at gridengine.sunsource.net
> 



More information about the gridengine-users mailing list