we have quite some scripts which contain "mailx" tool that worked on HP-UX server, now we are moving them over on Oracle Linux. As far as I know, Oralce linux doesn't have "mailx", can we make it work on Oracle linux? Or do I have to use "mail" instead?
Should be installed already but if not the package name is below.
[user@localhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[user@localhost ~]$ which mailx
[user@localhost ~]$ rpm -q --whatprovides /bin/mailx
You may need to make sure that the flags in your legacy scripts are compatible with the version of mailx installed.
I am trying to use "yum" to install mailx, but it is getting " nothing to do" message. the following is the screenshot. It's not there, but could not be installed:
#yum search mailx
================================ Matched: mailx ================================
mailx.x86_64 : The /bin/mail program for sending e-mail messages.
# yum install mailx.x86_64
Setting up Install Process
Nothing to do
# ls -l /bin/mailx
ls: /bin/mailx: No such file or directory
looks like el5.X. so in that case you should have a symlink for /bin/mailx pointing at /bin/mail
[root@hostname~]# ls -l /bin/mail*
-rwxr-xr-x 1 root mail 84856 Jun 6 2007 /bin/mail
lrwxrwxrwx 1 root root 4 Sep 18 10:20 /bin/mailx -> mail
If yum or up2date can't find it for a reinstall I'd guess either you connection to your repo is hosed or the repo is. Either way if /bin/mail exists then you have what you need you can either point your scripts at /bin/mail or create the symlink by hand.
Anyway, if this is in an early installation phase I suggest to reinstall the system, because the missing symlink to mail is not normal and who knows what else is screwed up - unless the OP knows how this happened. Reinstalling will take less time than troubleshooting later.