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.

Email Sender

Discussion in 'E-mail Discussions' started by jayme, Feb 7, 2006.

  1. jayme

    jayme Member

    Joined:
    Jan 14, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I have multiple websites on the same server, however, when sending mail it seems as if 1 domain specific domain is placed as the sender:

    Return-Path: <nobody@host.example2.com>
    Received: from host.example2.com (host.example2.com)
    by mx.gmail.com with ESMTP id 8si7274471nzn.2006.02.06.01.00.20;
    Mon, 06 Feb 2006 01:00:20 -0800 (PST)
    Received-SPF: pass (gmail.com: best guess record for domain of nobody@host.example2.com designates xxx.xxx as permitted sender)
    Received: from nobody by host.example2.com with local (Exim)
    id 1F62EH-0002pj-CM
    for xxx.xxx@gmail.com; Mon, 06 Feb 2006 04:00:13 -0500

    The FROM part is correct, but not the above values and I don't think you can change those using PHP..

    (Both these sites are hosted on the same server). example2.com is also the DNS server.

    So example.com uses example2.com for sending the email.. (Received from). Is it possible to change this as I do not want 1 unrelated domain being viewed by the receiver. (Gmail shows this)

    Thanks
     
    #1 jayme, Feb 7, 2006
    Last edited: Feb 7, 2006
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    PHP, by default, runs as the user 'nobody' and mail sent by PHP will be sent from nobody@hostname.tld.

    If you enable phpsuexec, mail from PHP will be sent from cpaneluser@hostname.tld.

    You'll never be able to remove the hostname of the sending server from emails as this has to be present.
     
  3. jayme

    jayme Member

    Joined:
    Jan 14, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
  4. rminchrist

    rminchrist Member

    Joined:
    Dec 13, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Nairobi - Kenya
    Reconnfigure your webserver (I guess Apache) or use FROM header in your PHP script.
     
  5. jayme

    jayme Member

    Joined:
    Jan 14, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    The FROM header is OK....... I didn't include it here because it is correct: info@example.com

    BUT: Received from, etc... say @host.example2.com (note example2.com)....

    Any help, thanks.
     
  6. elliotcooper

    elliotcooper Well-Known Member
    PartnerNOC

    Joined:
    May 18, 2005
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Exim is most likly using the system set hostname when it generates these headers. What you should do is to go to:

    WHM -> Server Configuration -> Basic cPanel/WHM Setup

    and set the hostname to whatever you want in there.
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Because that's not how the SMTP RFC's work. The sender should be username@hostname unless otherwise set.
     
Loading...

Share This Page