SOLVED

Find receive connectors that can relay email externally - powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-1389418%22%20slang%3D%22en-US%22%3EFind%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1389418%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20quick%20way%20I%20can%20find%20all%20receive%20connectors%20in%20my%20exchange%20organization%20that%20are%20capable%20of%20sending%20email%20externally%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20any%20advice...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1389418%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1390600%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1390600%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F119208%22%20target%3D%22_blank%22%3E%40Navishkar%20Sadheo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20find%20which%20send%20connectors%20are%20open%20relays%2C%20you%20can%20try%20the%20following%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ReceiveConnector%20%7C%20Get-ADPermission%20%7C%20Where%20%7B%24_.User%20-Like%20'*anon*'%20-And%20%24_.ExtendedRights%20-Like%20'ms-Exch-SMTP-Accept-Any-Recipient'%7D%20%7C%20ft%20Identity%2C%20User%2C%20ExtendedRights%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1392208%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1392208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20much.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1402634%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1402634%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20again...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuick%20one....was%20wondering%20is%20this%20the%20only%20and%20most%20accurate%20way%20to%20determine%20whether%20a%20connector%20can%20relay%20email%20externally.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20reason%20I%20ask%20is%20that%20I%20ran%20that%20command%20you%20suggested%20and%20it%20returned%20my%20connectors%20that%20are%20external%20relays%20but%20then%20I%20found%20another%20system%20that%20was%20connecting%20to%20another%20connector%20(not%20part%20of%20the%20list%20returned%20by%20your%20command)%20which%20I%20thought%20was%20not%20capable%20of%20relaying%20email%20outside%20but%20it%20turns%20out%20it%20can.%20Hence%20I%20am%20confused.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1403038%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1403038%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F119208%22%20target%3D%22_blank%22%3E%40Navishkar%20Sadheo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20best%20way%26nbsp%3Bas%20far%20as%20I%20am%20aware%2C%20but%20obviously%20this%20has%20missed%20a%20connector.%20I%20can%20run%20through%20my%20notes%20and%20see%20if%20I%20can%20find%20something%20more%20accurate.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1408779%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1408779%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383653%22%20target%3D%22_blank%22%3E%40HidMov%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Mark%3C%2FP%3E%3CP%3EWere%20you%20able%20to%20find%20anything%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1410185%22%20slang%3D%22en-US%22%3ERe%3A%20Find%20receive%20connectors%20that%20can%20relay%20email%20externally%20-%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1410185%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F119208%22%20target%3D%22_blank%22%3E%40Navishkar%20Sadheo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENothing%20in%20my%20notes%20I'm%20afraid%20-%20will%20try%20to%20dig%20deeper%20into%20it%20at%20some%20point%20but%20I'm%20pretty%20smashed%20at%20the%20moment.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Contributor

Hi All

 

Is there a quick way I can find all receive connectors in my exchange organization that are capable of sending email externally?

 

Appreciate any advice...

6 Replies
Highlighted
Best Response confirmed by Navishkar Sadheo (Regular Contributor)
Solution

Hi @Navishkar Sadheo 

 

If you want to find which send connectors are open relays, you can try the following:

 

Get-ReceiveConnector | Get-ADPermission | Where {$_.User -Like '*anon*' -And $_.ExtendedRights -Like 'ms-Exch-SMTP-Accept-Any-Recipient'} | ft Identity, User, ExtendedRights

 

 

Highlighted
Highlighted

@HidMov 

 

Hi again...

 

Quick one....was wondering is this the only and most accurate way to determine whether a connector can relay email externally.

 

The reason I ask is that I ran that command you suggested and it returned my connectors that are external relays but then I found another system that was connecting to another connector (not part of the list returned by your command) which I thought was not capable of relaying email outside but it turns out it can. Hence I am confused.

Highlighted

Hi @Navishkar Sadheo 

 

This is the best way as far as I am aware, but obviously this has missed a connector. I can run through my notes and see if I can find something more accurate.

 

Thanks,

Mark

Highlighted

@HidMov 

 

Hi Mark

Were you able to find anything?

Highlighted

Hi @Navishkar Sadheo 

 

Nothing in my notes I'm afraid - will try to dig deeper into it at some point but I'm pretty smashed at the moment.