0

The DNS for my domain points to an ISP (serverA) that relays email to me and my server (serverB) receives the mail and delegates it to my users. So the A record for my domain points to serverA but when I send email the servers that receive the email see that it comes from serverB and if they check the reverse DNS they see that the serverB points to and old domain that used to be associated with serverB but is no longer existing.

Some email I send is not being accepted by some servers (probably because of the reverse DNS) and I need to fix that.

So I am wondering if fixing the reverse DNS would be enough and then to what should it point to? Should it point to serverA or serverB? The FQDN of serverB is subdomain.mydomain.com but mydomain.com (without any subdomain infront) has A pointers to serverA.

I am using postfix on a centos serer at serverB, here is the part of the config where the hostnames are defined (instead of serverA and serverB the main.cnf file contains the FQDN of the servers):

myhostname = serverB
mydomain = serverA

mydestination = $myhostname, localhost.$mydomain, $mydomain, mail.$mydomain

####CHANGE ME if required **********************************************
mynetworks = 192.168.1.0/24, 192.168.168.0/24, 127.0.0.0/8
####CHANGE ME **********************************************

mynetworks_style = subnet
myorigin = $mydomain

require_home_directory = yes
permit_mynetwork = $mynetworks


disable_dns_lookups = no

####CHANGE ME **********************************************
#ISP Mail Server smtp-server.com
#Send outgoing mail to your ISP, Let them worry about delivery

#relayhost = smtp.comcast.net

####CHANGE ME **********************************************

relay_domains = "sraf.is"

#########################################################
smtpd_banner = $myhostname NO UCE ESMTP

So is the reverse DNS my only problem or is there some other problem that can fix this?

3

For sending email, the key part is that the server's outgoing HELO/EHLO (Postfix myhostname) be the same as the rDNS of the source IP the far end sees that connection coming from. Many servers also expect that the forward lookup for that rDNS name returns the same IP as it saw in the incoming connection.

This need not match the name of the server in your MX records (serverA), those only apply to incoming messages and in your case aren't the same server.

So as long as your serverB uses its FQDN in its HELO/EHLO, and that FQDN is a real domain you control, and you can have the rDNS for serverB's IP set to match that, you should be set.

  • Thanks for this :-) Will see if I can get this fixed and mark it as correct answer in the case it solves my problem. – ojs Jul 5 '17 at 14:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.