Exchange 2019 Relay connector START TLS issue

4 views
Skip to first unread message

Max Coder

unread,
Jun 26, 2025, 4:04:25 PMJun 26
to ntexchange
Hi,


I have been using Exchange Server 2019.  We are using wildcard certificate. I am trying to use the MailKit package which seems to be the recommended way to send email from PowerShell.

But I am getting an error message like below.

System.NotSupportedException: The SMTP server does not support the STARTTLS extension.



Commands I use for the relay connector:

New-ReceiveConnector -Server "EX01-2016" -Name "SMTP relay" -TransportRole FrontendTransport -Custom -Bindings 0.0.0.0:587 -RemoteIpRanges 192.168.1.60
Set-ReceiveConnector "EX01-2016\SMTP relay" -PermissionGroups AnonymousUsers
Get-ReceiveConnector "EX01-2016\SMTP relay" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
Set-ReceiveConnector "EX01-2016\SMTP Relay" -AuthMechanism ExternalAuthoritative -PermissionGroups ExchangeServers


$TLSCert = Get-ExchangeCertificate -Thumbprint "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

$TLSCertName = "<I>$($TLSCert.Issuer)<S>$($TLSCert.Subject)"

$tlscertificatename = "<i>$($cert.Issuer)<s>$($cert.Subject)"

Set-ReceiveConnector "EX01-2016\SMTP Relay" -TlsCertificateName $TLSCertName

FQDN under scoping : relay.domain.com

Philip Elder

unread,
Jun 26, 2025, 4:30:47 PMJun 26
to ntexc...@googlegroups.com

If you have an Exchange Server on-premises why?

 

https://blog.mpecsinc.ca/2018/06/exchange-2013-set-up-receive-connector.html

 

We set up a dedicated relay for internal services to use.

 

Philip Elder MCTS

Senior Technical Architect

Microsoft High Availability MVP

MPECS Inc.

E-mail: Phili...@mpecsinc.ca

Phone: +1 (780) 458-2028

Web: www.mpecsinc.com

Blog: blog.mpecsinc.com

Twitter: Twitter.com/MPECSInc

Skype: MPECSInc.

 

Please note: Although we may sometimes respond to email, text and phone calls instantly at all hours of the day, our regular business hours are 8:00 AM - 5:00 PM, Monday thru Friday.

--
You received this message because you are subscribed to the Google Groups "ntexchange" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntexchange+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntexchange/9ab54a02-2b32-47fd-86ba-b51c5299e996n%40googlegroups.com.

Michael B. Smith

unread,
Jun 26, 2025, 4:37:47 PMJun 26
to ntexc...@googlegroups.com

Who told you to use mailkit?

 

If you are all on-prem, I’d still be using send-mailmessage. If you are hybrid, I’d be using Send-MgUserMail.

 

From: ntexc...@googlegroups.com <ntexc...@googlegroups.com> On Behalf Of Max Coder
Sent: Thursday, June 26, 2025 4:04 PM
To: ntexchange <ntexc...@googlegroups.com>
Subject: [ntexchange] Exchange 2019 Relay connector START TLS issue

 

Hi,

--

Reply all
Reply to author
Forward
0 new messages