I have an application running on a host which is configured to send emails using an exchange account (this account connects to Exchange server 2013). However, only emails destined for other internal exchange email addresses are sent and emails sent to an external address such firstname.lastname@example.org are denied with the Unable to relay message. I have read the following guide https://practical365.com/exchange-server/exchange-2013-configure-smtp-relay-connector/ but it mentions allowing Anonymous Users to relay emails to external addresses. What I want is to only allow the authenticated user on the host to send emails to external addresses and not anonymous users. How would one go about doing this?
Exchange is already setup to do this - that is what the Client Receive Connector is for. However the client receive connector uses TLS. Therefore if your application can use TLS, switch to the port on the Client Receive Connector and set the application to authenticate.
Otherwise just setup a new Receive Connector to listen to port 25. Configure the remote IP address to be the IP address of the host that needs to send email and copy the settings of the Client Receive Connector for everything else.