Almost all of our customers send e-mail through our private SMTP servers, but we have one customer who chooses to use a third-party SMTP provider. The third-party SMTP service requires whitelisting of any sending IP addresses which is normal.
Unfortunately the components in our infrastructure which send e-mail are part of an autoscaling group so the IP addresses can vary.
To solve for this problem I would like to setup an nginx configuration which accepts SMTP connections to it and then proxies them to another IP address (the third-party SMTP service) so the requests to the mail server always appear to the third-party SMTP service as if they came from the same server.
Is it possible to solve this issue with ngingx smtp proxy?
How should i forwarded smtp in case with third-party SMTP service?