SMTP Server will not send to connected VPN domain

smtpvpn

I have a Windows 2012 web server that is connected to a company's VPN (vpn.company.com) to access network resources and needs to send emails to users of that company as well.

When the web server is not connected to the VPN, emails can be sent to anyone successfully. However, as soon as I initiate the VPN connection, any user with an @company.com email will not receive the email. Sending to another domain works just fine.

The Badmail directory consistently has this error message: Diagnostic-Code: smtp;550 5.7.1 Unable to relay for user@company.com.

I also have split tunneling enabled so the server is publicly accessible on the Internet and has the VPN connection.

Best Answer

As relay is denied, I guess it tries to connect to the SMTP server through VPN, and the SMTP server (@company.com) denies the connection because it does not come from the Internet.

Try using a smarthost on the Internet for this delivery domain.