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.

changing nobody when emailing through php

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

  1. epanagio

    epanagio Well-Known Member

    Joined:
    May 26, 2012
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,709
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. epanagio

    epanagio Well-Known Member

    Joined:
    May 26, 2012
    Messages:
    50
    Likes Received:
    1
    Trophy Points:
    8
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,709
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page