Home » RDBMS Server » Server Administration » Mailx: command not found
Mailx: command not found [message #269113] Thu, 20 September 2007 13:32 Go to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
Hi Gurus

OS:-RHEL 4
DB:-10.2.0.1

I'm trying to send mail through a script at OS level.

mailx -s "testing" xyz@vamu.com < temp.tmp

The error I get is -bash: mailx: command not found

Also I have the mailx package installed.
[ora_usr@oracle-dev SCRIPTS]$ rpm -q mailx
mailx-8.1.1-31.EL3


Can somebody help me to troubleshoot this problem

Regards
Re: Mailx: command not found [message #269115 is a reply to message #269113] Thu, 20 September 2007 13:46 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Obviously mailx is NOT found in the PATH.
Alternatively use fully qualified pathname to mailx.
Re: Mailx: command not found [message #269117 is a reply to message #269113] Thu, 20 September 2007 14:00 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
Thanks for your reply

Can you tell me how can I find the right path..

Regards
Re: Mailx: command not found [message #269118 is a reply to message #269113] Thu, 20 September 2007 14:06 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Can you tell me how can I find the right path..
I don't know where mailx resides on YOUR system.
Don't you know how to use "find" or "which"?
Re: Mailx: command not found [message #269119 is a reply to message #269118] Thu, 20 September 2007 14:37 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
[ora_usr@oracle-dev bin]$ which -a sendmail
/usr/bin/which: no sendmail in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
:/usr/local/oracle/product/10.2.0/Db_1/bin:/home/ora_usr/bin)


I didn't find the file named mailx in these paths.

regards
Re: Mailx: command not found [message #269120 is a reply to message #269119] Thu, 20 September 2007 14:48 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
I think I'm almost there...need your help at this point

I find in /home/ora_usr a file named mail.x ....

[ora_usr@oracle-dev ora_usr]$ more mail.x
  dba=dba@gmail.com
send_mail () {

        mailx -s "OTFCheck from host $(hostname) ad $(date)" $dba < $ORACLE_SID

}


but still I cannot send mail from this directory even.
Re: Mailx: command not found [message #269173 is a reply to message #269120] Thu, 20 September 2007 23:03 Go to previous messageGo to next message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello harry07,


  • use "find" command to search for files...
  • use "which" command to search for executables...


Run:
which mailx

You will find the exact location of this program.

In my case (fedora7)... I find at "/bin/mailx"
Then... "/bin" should be part of $PATH string (in my case).

Regards,


mson77
Re: Mailx: command not found [message #269279 is a reply to message #269120] Fri, 21 September 2007 08:05 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Harry:

I am not sure what you are doing. You were asked to search for mailx yet you have done a which command on sendmail and did a more of mail.x.
Re: Mailx: command not found [message #269298 is a reply to message #269279] Fri, 21 September 2007 09:53 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
[ora_usr@oracle-dev ora_usr]$ which mailx
/usr/bin/which: no mailx in (/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/oracle/product/10.2.0/Db_1/bin:/home/ora_usr/bin)


I did not find any mailx file in /usr/bin.

Thanks for being concerned.

Regards
Re: Mailx: command not found [message #269323 is a reply to message #269298] Fri, 21 September 2007 12:34 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
You have been told twice already to do a find for it.
Re: Mailx: command not found [message #269333 is a reply to message #269323] Fri, 21 September 2007 13:36 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
Yes I tried to find mailx file using

FIND Command but did not succeed( no file found in all directories and subdirectories).However if run
[root@oracle-dev /]# rpm -q mailx
mailx-8.1.1-31.EL3


I see the package mailx is installed.

Regards
Re: Mailx: command not found [message #270079 is a reply to message #269333] Tue, 25 September 2007 11:21 Go to previous messageGo to next message
harry07
Messages: 61
Registered: June 2007
Location: now york
Member
Hi

I do su - root/password

[root@oracle-dev root]# cd /
[root@oracle-dev /]# find -name mailx
I find no file returned as a result of the above command.

So can somebody suggest me.. what to do..

Regards
Re: Mailx: command not found [message #270081 is a reply to message #269113] Tue, 25 September 2007 11:33 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>So can somebody suggest me.. what to do..
use the "mail" utility instead or install mailx on your system
Previous Topic: database upgrade from 9i
Next Topic: Trace.log in directory $ORACLE_BASE/admin/SID/core
Goto Forum:
  


Current Time: Thu Sep 19 18:49:40 CDT 2024