Sending from the user@domain in Exim
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
I want the username to be: USERNAME@OUTGOING_MAIL_HOSTNAME instead of USERNAME@SERVER_FQDN
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.
Return-Path:
Received: from OUTGOING_MAIL_IP ([OUTGOING_MAIL_IP])
by mx.google.com with ESMTPS id rb4si24860179wjb.208.2016.08.16.04.09.11
for
(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 )
I want the username to be: USERNAME@OUTGOING_MAIL_HOSTNAME instead of USERNAME@SERVER_FQDN
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.
-
Hello, Could you verify if the PHP script that's sending email is using SMTP authentication, or the PHP mail function? You may also find the following thread helpful: Easy FIX your SMTP banner, SMTP greeting and Reverse DNS for Dedicated IPs Thank you. 0 -
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. 0 -
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. 0 -
Hey, My Support Ticket ID: 7635213 Thanks a lot! 0
Please sign in to leave a comment.
Comments
4 comments