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!

changing nobody when emailing through php

Discussion in 'E-mail Discussion' started by epanagio, Oct 24, 2013.

  1. epanagio

    epanagio Well-Known Member

    Joined:
    May 26, 2012
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Website Owner
    I am using php to send emails to myself when my users take take certain actions. Those emails used to come to me via nobody@hostname.

    After reading cpanel documentation about making my server more secure I disabled emails from user nobody. Is there a way to change php's way of determining the user ID?

    In the php code to send the email I specify:
    but the exim_mainlog says
    Thanks,
    Evan
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,532
    Likes Received:
    1,966
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Do you have root access to this system? If so, you can update your PHP handler to suPHP so that email is sent as the account username rather than the "nobody" username. The other alternative is to modify your script to use SMTP authentication to send out email.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. epanagio

    epanagio Well-Known Member

    Joined:
    May 26, 2012
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    58
    cPanel Access Level:
    Website Owner
    I do have root access but I can't figure out the "suPHP" part. Where do I change this?

    I looked in the "php configuration editor" and I didn't see anything of interest there.

     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,532
    Likes Received:
    1,966
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can change your PHP handler via:

    "WHM Home » Service Configuration » Configure PHP and suEXEC"

    Here are the considerations you should take into account before switching to suPHP:

    cPanel - suPHP Considerations

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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