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.

Php Mail Function / As nobody

Discussion in 'E-mail Discussions' started by ankushdawar, Jan 9, 2004.

  1. ankushdawar

    ankushdawar Member

    Joined:
    May 11, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    Prevent the user 'nobody' from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)
    ------------------------------
    I have enabled this option.
    -----------------------------

    Then mail sent through the server : php mail function.

    Gets Bounced messages.

    theman@AOL.COM
    unrouteable mail domain "aol.com"
    Return-path: <input@abc.com.com>
    Received: from nobody by server145.xuz.com with local (Exim 4.24)
    id 1AegQW-0006Pp-Mm
    for theman@AOL.COM; Thu, 08 Jan 2004 15:06:44 -0500
    To: theman@AOL.COM
    Subject: ActivaciСn de cuenta de usuario nuevo.

    Anyone with a solution. ???
     
  2. rix

    rix Well-Known Member

    Joined:
    May 1, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    I might be late to answer this, well you could modify your script to use PEAR::Mail ;)
     
  3. ankushdawar

    ankushdawar Member

    Joined:
    May 11, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    But....


    I have 5 Cpanel Servers.
    Cant edit all scripts ... for all clients ....

    Need a server wide solution.
     
  4. rix

    rix Well-Known Member

    Joined:
    May 1, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    im sure some of them running a forum that support smtp to sendmail instead of mail(). Theres no server wide solution into it if u dont want to edit their script.

    since you've disabled uesr nobody from sending email, that means the other option is to send email using a script that communicates with localhost port 25. That means? Script editing the only way to overcome this problem
     
  5. ankushdawar

    ankushdawar Member

    Joined:
    May 11, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    Hey Phantom ! ...

    I have phpSuExec installed and compiled with php.

    What next. Still mails are bouncing.
     
    #5 ankushdawar, Jan 10, 2004
    Last edited: Jan 10, 2004
  6. draken78

    draken78 Member

    Joined:
    Jul 8, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I think what thephantom was referring to was to uncheck the 'nobody' option, with phpsuexec installed.

    Hope that helps,
    Jim
     
  7. ankushdawar

    ankushdawar Member

    Joined:
    May 11, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    No ... If I uncheck ...

    Then my own clients try to spam others by using scripts.

    And It becomes a spamming issue at Spamcop.net and heavy loads on the box.
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Nope hes not referring to that. You don't have the uncheck nobody with phpsuexec installed, whole idea is lost then.

    With phpsuexec installed, the username gets used for executing any php / cgi scripts on the server. You mite need to setup permissions at times for scripts (i had this probs on a box, setting proper permissions on php scripts worked).
     
  9. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Even then it can still become an issue. Even if you use phpsuexec, with nobody unchecked, anyone can make a script (which gets executed as his user id) and start to spam the world. You need to keep a check on the mail traffic / queue for monitoring if someone is spamming or not. Or probably use some scripts to maintain db of the mails being send by users outside the network. We do that on some boxes at present. Whm has this feature of monitoring which users are relaying from the user and how many and to whom they are sending mails. Though i think it only shows you for that particular day (not sure).

    My 2 cents.
     
  10. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    I should have answered it more sequentially, neways.

    Try this on the shell

    dig aol.com
    ping aol.com

    It should resolve and provide you with ips (just for the heck of it)

    Now lets test the mail part. On shell type the following:

    mail -v theman@aol.com
    Complete the mail and let it send it. Check if the mail is delivered or not. If not, paste the entire contents here.
     
Loading...

Share This Page