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.

Exim/Cpanel Email Headers

Discussion in 'E-mail Discussions' started by innerconx, Sep 7, 2012.

  1. innerconx

    innerconx Registered

    Joined:
    Sep 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    We have been trying to figure this out for a few days now and have been all over this board as well as a few others, and this refers to Received From and X-AntiAbuse: Primary Hostname headers.

    We are NOT trying to hide these headers only make them read the DOMAIN the email is coming from as opposed to the Primary_hostname

    All domains have dedicated IP Addresses.

    We have in the CPANEL Exim set up the following:
    Send mail from account’s dedicated IP address - OFF
    Reference /etc/mailhelo for outgoing SMTP HELO - ON
    Reference /etc/mailips for outgoing SMTP connections - ON

    This set up now has allowed the email headers to contain the domain and IP information the mail is sent from - PERFECT!
    BUT we are still seeing the Received: from cpanel ([127.0.0.1]:54501 helo=[XXX.XXX.XXX.XXX])
    by cpanel.PROMARYHOSTNAME.com with esmtpa (Exim 4.77)

    And then the
    X-AntiAbuse: Primary Hostname - cpanel.PRIMARYHOSTNAME.com

    in the email headers.

    Our goal is to to keep the Received: from USERS.com (USERS.com. [XXX.XXX.XXX.XXX])
    and the

    X-AntiAbuse: Sender Address Domain - USERS.com

    ...but just NOT show the Primaty Hostname

    I've tried various combinations of modifications to the exim.conf without any sucess especially a tutoral found here Exim customization - but its pretty dated and Exim will fail to start if we add the dk_remote_smtp: commands becasue I think we now use dkim_

    System is fully updated running
    WHM 11.32.4 (build 4)
    Centos 5.8 (64 bit)
    Exim 4.77

    Any help will be deeply appreciated.
    Thanks
     
  2. innerconx

    innerconx Registered

    Joined:
    Sep 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Anyone? Please?
     
  3. abnet

    abnet Member

    Joined:
    Feb 27, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I am also looking for the exact same thing. Hope someone from cPanel replies... this is important enough and surely is a common need for those who know why they need this.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Is there a reason this is specifically set to off rather than on?

    Of note, whenever something is sent by webmail, it will show localhost (127.0.0.1) for the initial connection before sending out using the dedicated IP.
     
  5. pmc

    pmc Member

    Joined:
    May 13, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    What your looking for doesn't work setting it in the exim config.

    You need to work with perl.

    It is using the perl mailtrap headers, take a look in /etc/ -> exim.pl and it's related file &/or file(s).

    Edit the files based on your needs, however it is easiest to delete most if not all of the headers but not willy nilly, if you don't understand fully what each header does, or where it is used don't make edits or delete and ALWAYS make a back up.
    This is just a current edge example.

    sub mailtrapheaders {
    my $primary_hostname = Exim::expand_string('$smtp_active_hostname');
    my $original_domain = Exim::expand_string('$original_domain');
    my $sender_address_domain = Exim::expand_string('$sender_address_domain');
    my $originator_uid = Exim::expand_string('$originator_uid');
    my $originator_gid = Exim::expand_string('$originator_gid');
    my $caller_uid = Exim::expand_string('$caller_uid');
    my $caller_gid = Exim::expand_string('$caller_gid');
    my $xsource = $ENV{'X-SOURCE'};
    my $xsourceargs = $ENV{'X-SOURCE-ARGS'};
    my $xsourcedir = maskdir( $ENV{'X-SOURCE-DIR'} );

    my $headers =
    "X-AntiAbuse: This header was added for information, please include it with any report\n"
    . "X-AntiAbuse: Primary Hostname - $smtp_active_hostname\n"
    . "X-AntiAbuse: Original Domain - $original_domain\n"
    . "X-AntiAbuse: Originator/Caller UID/GID - [$originator_uid $originator_gid] / [$caller_uid $caller_gid]\n"
    . "X-AntiAbuse: Sender Address Domain - $sender_address_domain\n"
    . "X-Source: ${xsource}\n"
    . "X-Source-Args: ${xsourceargs}\n"
    . "X-Source-Dir: ${xsourcedir}";
    return ($headers);


    Hope this put's you on the right track.
     
Loading...

Share This Page