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!

Sending from the user@domain in Exim

Discussion in 'E-mail Discussion' started by Yossi, Aug 16, 2016.

Tags:
  1. Yossi

    Yossi Member

    Joined:
    Sep 12, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hey,

    I am trying to configure Exim in order to send mail from our server properly without the messages going to the spam box. The messages are sent from PHP.

    I want to hide the account name from going to the remote mail server, and have our mail FQDN (I setup a PTR record + an IP for that already). I still wish to keep the account-name in our logs.

    In addition, where should I set the SPF records, on the FQDN and/or the user's domain name?
    We're running an external CloudFlare DNS setup.

    I went over this guide, and implanted it successfully:
    How to Configure Exim's Outgoing IP Address - cPanel Knowledge Base - cPanel Documentation

    /etc/mail_reverse_dns
    Changing this file didn't work out for me, for resolving the hostnames.

    Attached is the log from Google's servers:
    USERNAME = The username of the account
    SERVER_FQDN = The server's FQDN
    OUTGOING_MAIL_IP = Configured outgoing IP for the server
    OUTGOING_MAIL_HOSTNAME = The system's hostname for outgoing mail
    USER_DOMAIN = The user's domain name

    Code:
    Return-Path: <USERNAME@SERVER_FQDN>
    Received: from OUTGOING_MAIL_IP ([OUTGOING_MAIL_IP])
            by mx.google.com with ESMTPS id rb4si24860179wjb.208.2016.08.16.04.09.11
            for <RECEIVER_ADDRESS@gmail.com>
            (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
            Tue, 16 Aug 2016 04:09:11 -0700 (PDT)
    Received-SPF: neutral (google.com: OUTGOING_MAIL_IP is neither permitted nor denied by best guess record for domain of USERNAME@SERVER_FQDN) client-ip=OUTGOING_MAIL_IP;
    Authentication-Results: mx.google.com;
           spf=neutral (google.com: OUTGOING_MAIL_IP is neither permitted nor denied by best guess record for domain of USERNAME@SERVER_FQDN) smtp.mailfrom=USERNAME@SERVER_FQDN
    Received: from USERNAME by USERNAME@SERVER_FQDN with local (Exim 4.87)
        (envelope-from <USERNAME@SERVER_FQDN>)
    
    I want the username to be: USERNAME@OUTGOING_MAIL_HOSTNAME instead of USERNAME@SERVER_FQDN

    Code:
    X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
    X-AntiAbuse: Primary Hostname - SERVER_FQDN
    X-AntiAbuse: Original Domain - gmail.com
    X-AntiAbuse: Originator/Caller UID/GID - [1011 993] / [47 12]
    X-AntiAbuse: Sender Address Domain - SERVER_FQDN
    X-Get-Message-Sender-Via: SERVER_FQDN: authenticated_id: USERNAME/from_h
    X-Authenticated-Sender: SERVER_FQDN: mail@USER_DOMAIN
    
    Again, in here I want instead of "SERVER_FQDN" the "OUTGOING_MAIL_HOSTNAME".

    I can define mail@USER_DOMAIN for the X-Authenticated-Sender in PHP, but I can't change the SERVER_FQDN.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,357
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Yossi

    Yossi Member

    Joined:
    Sep 12, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    It uses the mailer function, and others will use the SMTP function - eventually I will have both.

    I followed the guide, and I'm getting the same results, changed the SMTP banner and such.

    I fixed the Received: tag.
    The "Return-Path", "Authnetication Results", "Received", "Message-Id" and:
    X-Anti-Abuse/X-Get-Message_Sender-Via/X-Authenticated-Sender headers aren't set properly.
     
    #3 Yossi, Aug 22, 2016
    Last edited: Aug 22, 2016
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,357
    Likes Received:
    1,855
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Yossi

    Yossi Member

    Joined:
    Sep 12, 2015
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hey,

    My Support Ticket ID: 7635213

    Thanks a lot!
     
    #5 Yossi, Aug 23, 2016
    Last edited by a moderator: Aug 23, 2016
Loading...

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