i noticed, that if i try to send an email via telnet to an external domain the session gives me the error "SMTP; Unable to relay recipient in non-accepted domain" - thats good and how you would expect it.
But if i do the same test now with the Powershellcommand Send-Mailmessage the mail is being send to the external recipient.
Can someone explain to my why that works? Where is the difference between the telnet sesssion and the powershell session?
[EDIT] In Telnet i use the commands: telnet exchange2016fqdn 25 ehlo mail from:user@internaldomain
SMTP; Unable to relay recipient in non-accepted domain
If someone is curious; the powershell is running withing the user context hence using the cerberos token. You can see the sessionauthentication via these commands $token = [System.Security.Principal.WindowsIdentity]::GetCurrent() $token
My test-mail was received on the exchange "client proxy"-Receive Connector. In the Security context of that connector Windows Authentication is active so that makes sense i guess.