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.

How to add PHP mail script path into the email headers

Discussion in 'E-mail Discussions' started by postcd, Nov 15, 2014.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Hello,

    in sent email headers i have

    X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
    X-AntiAbuse: Primary Hostname - myhostname
    X-AntiAbuse: Original Domain - gmail.com
    X-AntiAbuse: Originator/Caller UID/GID - [566 574] / [47 12]
    X-AntiAbuse: Sender Address Domain - myhostname
    X-Get-Message-Sender-Via: myhostname: authenticated_id: cpaneluser/primary_hostname/system user

    but please how to input also path from which email was sent? my aim is to somehow easilly discover which script sent spam
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Thx, i selected exactly this package to be installed yesterday, but it throw some message like that it is incompatible or something (was just a moment this message appeared) then easy apache rebuild happend. Now i see it unticked in EasyApache

    I see i have ticked option "Save my profile with appropriate PHP 5 options set so that it is compatible with cpphp" and under it is:
    "Enables:
    CurlSSL
    FTP
    GD
    Gettext
    Iconv
    Imap
    Mbregex
    Mbstring
    Mysql
    Mysql of the system
    PGsql
    Sockets
    System Timezone
    Zlib
    Disables:
    MailHeaders"

    so kindly what should i do there please?
     
    #3 postcd, Nov 16, 2014
    Last edited: Nov 16, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can browse to the "Mail" tab in "WHM Home » Service Configuration » Exim Configuration Manager" and enable the following options:

    "EXPERIMENTAL: Rewrite From: header to match actual sender"
    "Query Apache server status to determine the sender of email sent from processes running as nobody"

    Thank you.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    I see, i enabled that function and restarted exim but only line in sent email headers that is new is:
    "X-From-Rewrite: unmodified, already matched"

    but it do not tells me path to sending script, i only knows username from the:
    "X-Get-Message-Sender-Via: myhostname: authenticated_id: cpaneluser/primary_hostname/system user"
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can't have the full MailHeaders module if you enable "Save my profile with appropriate PHP 5 options set so that it is compatible with cpphp". Thus, one alternative is to search the account of the username referenced for scripts with the ability to send out email to determine the culprit.

    Thank you.
     
  7. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    thanks, i wanted to enable "MailHeaders" in easy apache, but that option "Save my profile with appropriate PHP 5 options set ..." disables that. I want to ask if i should untick that "Save my profile ..." option in easyapache to prevent disabling that, what can be consequencesm is it bad idea? thank you
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Per the option:

    It's not enabled by default, so unless you specifically require compatibility with cpphp (e.g. for custom plugins) then you can disable the option.

    Thank you.
     
  9. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Its offtopic, can you please link me to cpphp details, im not sure what it is and if i may need it in future. Really not sure if i can afford to untick that option in EasyApapche.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,830
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's simply the internal PHP that cPanel uses. It does not relate to the PHP version used by your websites in conjunction with Apache. Documentation on it is available at:

    http://documentation.cpanel.net/display/ALD/cPanel+PHP
    http://documentation.cpanel.net/display/ALD/Select+a+PHP+Binary

    Thank you.
     
Loading...

Share This Page