Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

use /usr/sbin/sendmail in php exec()

Discussion in 'E-mail Discussion' started by endelwar, Sep 27, 2006.

  1. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    when I use /usr/sbin/sendmail directly in a php exec() this error is reported: "sendmail cannot be called directly from a shell with the current user id".

    I've already tried /scripts/eximup --force that changed permissions from -rwsr-sr-t to -rwxr-sr-x but didn't worked; I've also upgraded from 4.52 to 4.62 (downloaded from diff.cpanel.net) but no results again.
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    Firstly, why do you want to use exec() to send mail via sendmail - can't the mail() function be used?

    Secondly, check that you don't have the SMTP tweak enabled in WHM > Tweak Security
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    Well, Mailwatch asks for it, so I must follow his rules ;)

    I've disabled the SMTP tweak, but it doesn't work. It reports the same error.
     
  4. avijit

    avijit Well-Known Member

    Joined:
    Jul 26, 2004
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    India
    Try checking the permission of the /usr/sbin/sendmail binary .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    now they are set in this way:
    Code:
    -rwxr-sr-x    1 root     mailtrap     8599 Aug 16  2005 sendmail*
    How should I set them?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice