RE: Email alerts - Commands

"Joe Leone" <[email protected]>
Newsgroups gmane.network.netsaint.user
Message-ID <[email protected]>
This is what has puzzled me about the netsaint setup. I am running netsaint in daemon mode. It appears that netsaint the mail process as root!  I have check the file permissions for sticky bits etc.  There are none. 
I have setup an account and group called netsaint and set them in the netsaint.cfg

/usr/local/netsaint/etc/netsaint.cfg
netsaint_user=netsaint
netsaint_group=netsaint



ps -eaf | grep netsaint
netsaint 10955     1  0   Jul 02 ?        0:00 ssh-agent -s
netsaint  5525     1  0 13:43:10 ?        0:00 /usr/local/netsaint/bin/netsaint -d /usr/local/netsaint/etc/netsaint.cfg


-----Original Message-----
From: Karl DeBisschop [mailto:[email protected]]
Sent: Thursday, 15 August 2002 7:19
To: Bishop, Dean
Cc: Joe Leone; [email protected]
Subject: RE: [netsaint] Email alerts - Commands


On Wed, 2002-08-14 at 08:01, Bishop, Dean wrote:
> try using "echo -e" in place of printf.
> 
> this solved a weird, but similar problem i was having.

1) echo -e is not POSIX compliant, printf is.

2) that will not solve the problem -- the single quote before TEST
closes the command sring, as I read it. Try escaping your quotes. Better
yet, run in daemon mode as netsaint, and netsaint should automatically
be the mail sender.

> 
> hth,
> dean
> 
> -----Original Message-----
> From: Joe Leone [mailto:[email protected]]
> Sent: Wednesday, August 14, 2002 12:43 AM
> To: [email protected]
> Subject: [netsaint] Email alerts - Commands
> 
> 
> Hi, I am trying to run a command as a specific user (eg netsaint).  In the
> commands.cfg file I have the following definition.  
> 
> command[email_user]='/usr/bin/su - netsaint -c "/usr/bin/printf 'TEST
> NETSAINT test from commands file  $HOSTADDRESS$*' | /usr/ucb/mail -s "TEST
> $HOSTNAME$" [email protected]"'
> 
> However netsaint puts out the following error message. 
> 
> sh: /usr/bin/su - netsaint -c "/usr/bin/printf TEST: not found
> The command does run from the prompt. I have also tried with a variety of
> different quote combinations
> 
> The ultimate aim is to have mail being send out from user netsaint not root.
> (I asked this question before, but did not solve it) 
> 
> Thanks Joe
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: Dice - The leading online job board
> for high-tech professionals. Search and apply for tech jobs today!
> http://seeker.dice.com/seeker.epl?rel_code1
> _______________________________________________
> Netsaint-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/netsaint-users
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: Dice - The leading online job board
> for high-tech professionals. Search and apply for tech jobs today!
> http://seeker.dice.com/seeker.epl?rel_code=31
> _______________________________________________
> Netsaint-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/netsaint-users




-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.