I'm trying to setup postfix in a VPC on AWS where an external server communicates with a postfix mail server in the same subnet.
I'm getting an error from postfix every time I try to connect to postfix from an external client. The error says:
warning: hostname example.com does not resolve to address 54.x.xxx.xxx
connect from unknown[54.x.xxx.xxx]
lost connection after CONNECT from unknown[54.x.xxx.xxx]
I'm suspecting this is related to the IP address that is being pointed to the hostname. When I run:
dig example.com
The 'answer' section outputs this:
;; ANSWER SECTION:
example.com. 60 IN A 10.0.1.132
I've looked at this link: http://www.postfix.org/LINUX_README.html
and I've tried editing /etc/host.conf and the /etc/postfix/main.cf file from that link and a bunch of other things from googling but nothing is working and I still get the same error mentioned above.
Is there a way to configure the VPC or the EC2 instance to point to my public IP address, or can I fix this problem trying to add some more configuration settings for postfix?