I'm trying to use the following command (without the line break) to relay email through an Exchange 2013 server from another server. The sending server is listed with explicit permission to relay anonymous email and the same command used to work a few months ago.
Send-MailMessage -To [valid email group] -From [throwaway address]
-Subject "Test Only" -SmtpServer [valid URI to server] -body "Testing"
The result of the command is that nothing happens. No error, no email, nothing. I'm not the Exchange admin and he says we've installed updates and such but we can't correlate one update or session to this failure. Any troubleshooting tips? Thanks.
Yeah - have your exchange admin review the SMTP logs on the CAS server(s). Reviewing the logs is always the first thing to do.
FYI -
send-mailmessage
will use your own AD credentials if you don't specify any, so you might be running into a problem where the receive connector is only allowing anonymous connections but you're using an authenticated session. Just a guess./Edit The log files will be found at either the location where you have defined them (find it using
Get-TransportServer |select name, ReceiveProtocolLogPath
), or viaget-messagetracking
. Assuming the receive connectors have logging enabled, which you should do.You're attempting to get a remote server to do something on your behalf. Though mfinni is correct that this could be an SMTP problem, you may have hit the Double-Hop issue.
Basically, the second server receives a 'less-powerful' authentication token, that prevents it from having the full-rights of someone who directly authenticated (a security measure used to prevent the spread of malicious problems)
For troubleshooting, set
$VerbosePreference
from it's default ("SilentlyContinue") to just "continue".