The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mail: command not found

Discussion in 'E-mail Discussions' started by celliott, Oct 3, 2008.

  1. celliott

    celliott Well-Known Member

    Joined:
    Jan 2, 2006
    Messages:
    460
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Hi,

    You used to be able to have a short script to notify you via email when someone logs in as root, however on some CentOS 5 + cPanel servers this isnt working, it's returning:

    mail: command not found

    Any ideas?
     
  2. Ghulam Yaseen

    Ghulam Yaseen Well-Known Member

    Joined:
    Mar 14, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Karachi,Pakistan
    Yaseen

    Hello :),

    If you are using the internet on your server then please try this
    ------------------
    yum install mail
    ------------------
    :cool:
     
  3. kampret

    kampret Member

    Joined:
    Jun 21, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    yum install mail --> No package mail available.
    you should run :

    ----------------------------
    yum install mailx
    ----------------------------
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    kampret is correct. The mail command should be present by default on CentOS 5. It is provided by the mailx package.

    Code:
    # which mail
    /bin/mail
    # rpm -q --whatprovides /bin/mail
    mailx-8.1.1-44.2.2
    Installing mailx using yum will make the mail command available.
     
  5. goldy_rocky

    goldy_rocky Member

    Joined:
    Jul 16, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, Works like a charm..............

    Thanks,
     
Loading...

Share This Page