I have 2 servers (X and Y) and an SMTP server for sending emails. X needs to send an email using the SMTP server, however it cannot resolve the host for the SMTP server. This is inevitable and I need a way around it (I can't do any DNS modifications). However, Y is able to connect to the SMTP server and X can connect to Y.
So then:
1) Can I set up Y to appear as an "SMTP server" that just relays the emails/requests sent to it from X, to my actual SMTP server?
2) Can I do so with just the IP addresses of the servers? This is for an LAN network and I don't have any domain names nor host names, only IPs.
3) Does anyone have a clear guide/example of how this can be done? I'm not familiar with SMTP Relaying nor Postfix, so I would appreciate verbose explanations.
I believe Postfix can do this, however, I did not come across any guides for my scenario. I'm open to other tools.
Both servers are Linux (Redhat/Centos).
Best Answer
Yes, edit Y /etc/postfix/main.cf and configure:
To accept email only from X (Set the X IP range here)
To do relay (Set the SMTP IP address here)
Indeed, as you can see above.
I agree postfix is a very good option. There are tons of nice postfix guides. Check http://www.postfix.org/BASIC_CONFIGURATION_README.html