Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default Set PHP to send mail as webmaster@domain?

    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!

    Cheers,

    Jon

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    529

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 05-04-2011, 11:10 AM
  2. PHP Form Mail script does not send mail
    By fr0gman in forum New User Questions
    Replies: 11
    Last Post: 12-08-2007, 10:48 PM
  3. How do I set Cpanel to send mail without disclosing IP address?
    By wrighteq in forum New User Questions
    Replies: 1
    Last Post: 03-29-2007, 10:08 PM
  4. Cannot send outgoing mail when I set default address to :fail:
    By zaggs in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-28-2006, 09:18 AM
  5. how to set up webmaster?
    By rupertpearson in forum Database Discussions
    Replies: 1
    Last Post: 06-11-2006, 02:55 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube