This discussion is archived
11 Replies Latest reply: Oct 3, 2012 12:58 PM by Dude! RSS

can we make "mailx" work on Oralce linux

946717 Newbie
Currently Being Moderated
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?

Thanks!
  • 1. Re: can we make "mailx" work on Oralce linux
    964667 Newbie
    Currently Being Moderated
    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
    /bin/mailx
    [user@localhost ~]$ rpm -q --whatprovides /bin/mailx
    mailx-12.4-6.el6.x86_64


    You may need to make sure that the flags in your legacy scripts are compatible with the version of mailx installed.

    -Brian
  • 2. Re: can we make "mailx" work on Oralce linux
    946717 Newbie
    Currently Being Moderated
    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
  • 3. Re: can we make "mailx" work on Oralce linux
    964667 Newbie
    Currently Being Moderated
    #rpm -qa | grep mailx

    let us know what that returns.

    -Brian
  • 4. Re: can we make "mailx" work on Oralce linux
    Dude! Guru
    Currently Being Moderated
    As far as I know, Oralce linux doesn't have "mailx"
    /bin/mailx is installed by default and part of the core operating system.

    <pre>
    # yum list mailx
    Installed Packages
    mailx.x86_64 12.4-6.el6 @anaconda-OracleLinuxServer-201206261930.x86_64/6.3

    # which mailx
    /bin/mailx

    # mailx -V
    12.4 7/29/08

    </pre>

    If /bin/mailx was deleted by accident, you can reinstall it. However, it may not be the only binary missing.

    <pre>
    # yum -y reinstall mailx
    </pre>
  • 5. Re: can we make "mailx" work on Oralce linux
    964667 Newbie
    Currently Being Moderated
    See if /bin/mail exists /bin/mailx should be a symlink to /bin/mail.
  • 6. Re: can we make "mailx" work on Oralce linux
    Dude! Guru
    Currently Being Moderated
    Depends on the system:

    Oracle Linux 6

    <pre>
    # lsb_release -d
    Description:     Oracle Linux Server release 6.3
    # ls -l /bin/mailx
    -rwxr-xr-x. 1 root root 378784 Jul 6 2010 /bin/mailx
    # ls -l /bin/mail
    lrwxrwxrwx. 1 root root 5 Aug 11 21:58 /bin/mail -> mailx
    </pre>

    Oracle Linux 5:

    <pre>
    # lsb_release -d
    Description:     Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
    # ls -l /bin/mail
    -rwxr-xr-x 1 root mail 84856 Jun 6 2007 /bin/mail
    # ls -l /bin/mailx
    lrwxrwxrwx 1 root root 4 Jul 14 16:48 /bin/mailx -> mail
    </pre>

    Edited by: Dude on Oct 3, 2012 9:28 AM
  • 7. Re: can we make "mailx" work on Oralce linux
    946717 Newbie
    Currently Being Moderated
    the following is my answers to all questions that you guys have raisied:


    # yum list mailx
    Installed Packages
    mailx.x86_64 8.1.1-44.2.2 installed

    # rpm -qa | grep mailx
    mailx-8.1.1-44.2.2

    # ls -l /bin/mail
    -rwxr-xr-x 1 root mail 84856 Jun 6 2007 /bin/mail

    #yum -y reinstall mailx
    Setting up Reinstall Process
    Installed package mailx-8.1.1-44.2.2.x86_64 not available.
    Nothing to do

    I searched entire server, no mailx or links to exist.

    It's wared...
  • 8. Re: can we make "mailx" work on Oralce linux
    bobthesungeek76036 Pro
    Currently Being Moderated
    It's a little "brute force" but you could do:

    <pre>
    cd /bin
    ln -s mail mailx
    </pre>

    maybe?
  • 9. Re: can we make "mailx" work on Oralce linux
    Dude! Guru
    Currently Being Moderated
    Installed package mailx-8.1.1-44.2.2.x86_64 not available.
    Looks like you are using OL 5. Not available means you do not have yum configured.
    To install from the Internet, see http://public-yum.oracle.com

    Edited by: Dude on Oct 3, 2012 12:47 PM
  • 10. Re: can we make "mailx" work on Oralce linux
    964667 Newbie
    Currently Being Moderated
    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.

    -Brian

    Edited by: 961664 on Oct 3, 2012 2:49 PM
  • 11. Re: can we make "mailx" work on Oralce linux
    Dude! Guru
    Currently Being Moderated
    I just noticed.

    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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points