Link to home
Start Free TrialLog in
Avatar of Member_2_6492660_1
Member_2_6492660_1Flag for United States of America

asked on

Exchange 2016 550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain

Exchange 2016 CU 9 DAG 2 Nodes
Windows 2016 Datacenter Servers

Telnet into my exchange server  this is the issue


220 serv021-N1.mynet.com Microsoft ESMTP MAIL Service ready at Tue, 17 Jul 2018 22:02:21 -0400
helo mynet.com
250 TGCS021-N1.mynet.com Hello [10.2.8.69]
mail from: myuser@mynet.com
250 2.1.0 Sender OK
rcpt to: myuser@me.com
550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain

Is this a receive connecter or send connector issue?

Thank you

Tom
ASKER CERTIFIED SOLUTION
Avatar of FOX
FOX
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_6492660_1

ASKER

Fox thanks I was already looking at that page

One question on this command

            Set-ReceiveConnector "EXSERVER\Client Frontend EXSERVER" -Fqdn mail.exchange2016demo.com -TlsCertificateName $tlscertificatename

EXSERVER is my exchange server host name that I know

Not sure what is the FQDN he is looking for here?   what is mail.exchange2016demo.com
You have to put in the fqdn of your mail environment.  His is just an example

When you run Get-ExchangeCertificate  you should see your fdqn.
fqdn.JPG
So I ran these commands

[PS] C:\Windows\system32>Get-ExchangeCertificate

Thumbprint                                Services   Subject
----------                                --------   -------
5B6AD9DE3867AD35A3CA55B0D270F3DE46D36CFC  IP.WS..    CN=tgcsnet.com, OU=IT, O=Thomas Grassi, L=Wood Ridge, S=New Jersey, C=US
C3FE35C12CB9ED43F0CEF94FC9DCCC13E7245370  .......    C=US, S=New Jersey, L=Wood Ridge, O=TGCSNET, OU=IT, CN=tgcs021-n1.our.network.tgcsnet.com
DE5666BD6A78EEAFECE2FD1FA7CD9F109A5BF63A  .......    CN=WMSvc-SHA2-TGCS021-N1
EE7F8626090E4C656EBCE36CA20ABBFA3A5B949B  ....S..    CN=Microsoft Exchange Server Auth Certificate
ACBEC2BD622C0F1710343A23C877E5E2002F77D1  ...WS..    CN=TGCS021-N1

$cert = Get-ExchangeCertificate -thumbprint 5B6AD9DE3867AD35A3CA55B0D270F3DE46D36CFC
[PS] C:\Windows\system32>$tlscertificatename = "<i>$($cert.Issuer)<s>$($cert.Subject)"

Set-ReceiveConnector "TGCS021-N1\Client Frontend TGCS021-N1" -Fqdn tgcsnet.com -TlsCertificateName $tlscertificatename


From powershell

$PSEmailServer = "TGCS021-N1.OUR.NETWORK.TGCSNET.COM"
Send-MailMessage -From $From -To $To -Subject $Subject -Body $Body -smtpserver $PSEmailServer -attachment "$LogFolder\$LogFile", "$LogFolder\$LogFile1"

Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Message rejected as spam by Content Filtering.
At line:2 char:1
+ Send-MailMessage -From $From -To $To -Subject $Subject -Body $Body -s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpException
    + FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
 
Here is the receive connector details

get-ReceiveConnector "TGCS021-N1\Client Frontend TGCS021-N1" | fl


RunspaceId                                : 8cd20c0a-1431-46a9-bc82-cb1c09a0a5d4
AuthMechanism                             : Tls, Integrated, BasicAuth, BasicAuthRequireTLS
Banner                                    :
BinaryMimeEnabled                         : True
Bindings                                  : {[::]:587, 0.0.0.0:587}
ChunkingEnabled                           : True
DefaultDomain                             :
DeliveryStatusNotificationEnabled         : True
EightBitMimeEnabled                       : True
SmtpUtf8Enabled                           : True
BareLinefeedRejectionEnabled              : False
DomainSecureEnabled                       : False
EnhancedStatusCodesEnabled                : True
LongAddressesEnabled                      : False
OrarEnabled                               : False
SuppressXAnonymousTls                     : False
ProxyEnabled                              : False
AdvertiseClientSettings                   : False
Fqdn                                      : tgcsnet.com
ServiceDiscoveryFqdn                      :
TlsCertificateName                        : <I>CN=DigiCert SHA2 Secure Server CA, O=DigiCert Inc, C=US<S>CN=tgcsnet.com, OU=IT, O=Thomas Grassi, L=Wood Ridge, S=New Jersey, C=US
Comment                                   :
Enabled                                   : True
ConnectionTimeout                         : 00:10:00
ConnectionInactivityTimeout               : 00:05:00
MessageRateLimit                          : 5
MessageRateSource                         : User
MaxInboundConnection                      : 5000
MaxInboundConnectionPerSource             : 20
MaxInboundConnectionPercentagePerSource   : 2
MaxHeaderSize                             : 256 KB (262,144 bytes)
MaxHopCount                               : 60
MaxLocalHopCount                          : 12
MaxLogonFailures                          : 3
MaxMessageSize                            : 36 MB (37,748,736 bytes)
MaxProtocolErrors                         : 5
MaxRecipientsPerMessage                   : 200
PermissionGroups                          : ExchangeUsers
PipeliningEnabled                         : True
ProtocolLoggingLevel                      : None
RemoteIPRanges                            : {::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, 0.0.0.0-255.255.255.255}
RequireEHLODomain                         : False
RequireTLS                                : False
EnableAuthGSSAPI                          : True
ExtendedProtectionPolicy                  : None
LiveCredentialEnabled                     : False
TlsDomainCapabilities                     : {}
Server                                    : TGCS021-N1
TransportRole                             : FrontendTransport
RejectReservedTopLevelRecipientDomains    : False
RejectReservedSecondLevelRecipientDomains : False
RejectSingleLabelRecipientDomains         : False
AcceptConsumerMail                        : False
SizeEnabled                               : Enabled
TarpitInterval                            : 00:00:05
AuthTarpitInterval                        : 00:00:05
MaxAcknowledgementDelay                   : 00:00:30
AdminDisplayName                          :
ExchangeVersion                           : 0.1 (8.0.535.0)
Name                                      : Client Frontend TGCS021-N1
DistinguishedName                         : CN=Client Frontend TGCS021-N1,CN=SMTP Receive Connectors,CN=Protocols,CN=TGCS021-N1,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative
                                            Groups,CN=TGCSNET,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=our,DC=network,DC=tgcsnet,DC=com
Identity                                  : TGCS021-N1\Client Frontend TGCS021-N1
Guid                                      : d59f5270-9e02-4f8c-80cb-7ab0a174e03e
ObjectCategory                            : our.network.tgcsnet.com/Configuration/Schema/ms-Exch-Smtp-Receive-Connector
ObjectClass                               : {top, msExchSmtpReceiveConnector}
WhenChanged                               : 7/17/2018 11:13:59 PM
WhenCreated                               : 6/3/2018 6:00:10 PM
WhenChangedUTC                            : 7/18/2018 3:13:59 AM
WhenCreatedUTC                            : 6/3/2018 10:00:10 PM
OrganizationId                            :
Id                                        : TGCS021-N1\Client Frontend TGCS021-N1
OriginatingServer                         : TGCS012.our.network.tgcsnet.com
IsValid                                   : True
ObjectState                               : Unchanged


Thanks
Thank you fox

figured it out now my PowerShell scripts can send email