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!

Set PHP to send mail as webmaster@domain?

Discussion in 'E-mail Discussion' started by webignition, Feb 4, 2005.

  1. webignition

    webignition Well-Known Member

    Jan 22, 2005
    Likes Received:
    Trophy Points:
    I've noticed that PHP sends mail out as nobody@hostname. This, of course, is not a fantasic revelation but as I'm still rather new to running a server it came as a bit of a surprise to me.

    I would like to set things up so that PHP sends mail out as webmaster@domain for all domains hosted on my server.

    I've tried to find out how this may be done and have consequently spent a lot of time reading through threads concerning phpsuexec.

    From what I've read, I understand that enabling phpsuexec will mean that php scripts run as the relevant user instead of nobody. However what I haven't been able to determine is what mail is sent out as when phpsuexec has been enabled. Would mail be sent out as user@domain? If so, then enabling phpsuexect is not going to do what I hope.

    Is any way of setting things up so that PHP sends mail out as webmaster@domain?

    If anyone has any suggestions, I've very much appreciate them!


    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dezignguy

    dezignguy Well-Known Member

    Sep 26, 2004
    Likes Received:
    Trophy Points:
    you may want to search these forums for some exim config settings that may do what you want... the behavior you've been noticing is from a fairly recent change in cpanel... or rather in exim. Modifying those settings may get you what you want.

    You can also set the 5th variable when using the mail command (return-path) in your scripts to do the same thing... if you have control of them.

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