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.

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

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

  1. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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:
    36
    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
     
  3. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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:
    16
    Location:
    India
    Try checking the permission of the /usr/sbin/sendmail binary .
     
  5. endelwar

    endelwar Member

    Joined:
    May 2, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    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...
Similar Threads - usr sbin sendmail
  1. zuronam
    Replies:
    2
    Views:
    184

Share This Page