I am in the process of migrating a Joomla installation into Amazon Web Services at present. The site is currently co-located with the mail server, but will be deployed on a separate machine within the same VPC and subnet within AWS once migrated.
I would like to have Joomla connect to the SMTP server using the private IP addresses of both machines when sending mail, rather than connecting from it's public IP address. The SMTP configuration options only private for the SMTP server address though, and offer no option to select the local interface to use.
Is there a way to do this, either within Joomla configuration or perhaps within my PHP settings somewhere?