I ran the following commands:
Set-SenderFilterConfig -BlockedDomains domain1.com, domain2.com
Set-SenderFilterConfig -InternalMailEnabled $true
Get-ReceiveConnector "Default Frontend <name>" | Get-ADPermission -user "NT AUTHORITY\Anonymous Logon" | where {$_.ExtendedRights -like "ms-Exch-SMTP-Accept-Any-Sender"}
| Remove-ADPermission
and it removed the permissions above just fine.
I then ran:
Get-ReceiveConnector "Local Network Relaying" | add-ADPermission -user "NT AUTHORITY\Anonymous Logon" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Sender"
and it said:
WARNING: The appropriate access control entry is already present on the object "CN=Local Network Relaying,CN=SMTP Receive Connectors,CN=Protocols,CN=<server>,CN=Servers,CN=Exchange Administrative
Group (...),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domain,DC=local" for account "NT AUTHORITY\ANONYMOUS LOGON".
Now our users cannot scan from copiers and appliances on the same subnet cannot send via the Local Network Relaying connector, it gives this error:
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,0,10.20.0.99:25,10.20.0.34:41338,+,,
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,1,10.20.0.99:25,10.20.0.34:41338,*,SMTPSubmit SMTPAcceptAnyRecipient SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,2,10.20.0.99:25,10.20.0.34:41338,>,"220 server Microsoft ESMTP MAIL Service ready at Mon, 20 Apr 2015 10:33:13 -0400",
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,3,10.20.0.99:25,10.20.0.34:41338,<,HELO sslvpn,
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,4,10.20.0.99:25,10.20.0.34:41338,*,SMTPSubmit SMTPAcceptAnyRecipient SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,5,10.20.0.99:25,10.20.0.34:41338,>,250 server Hello [10.20.0.34],
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,6,10.20.0.99:25,10.20.0.34:41338,<,MAIL FROM: <appliance@domain.com>,
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,7,10.20.0.99:25,10.20.0.34:41338,*,SMTPSubmit SMTPAcceptAnyRecipient SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session Permissions
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,8,10.20.0.99:25,10.20.0.34:41338,*,08D249192435538B;2015-04-20T14:33:13.840Z;1,receiving message
2015-04-20T14:33:13.840Z,SERVER\Local Network Relaying,08D249192435538B,9,10.20.0.99:25,10.20.0.34:41338,>,250 2.1.0 Sender OK,
2015-04-20T14:33:13.856Z,SERVER\Local Network Relaying,08D249192435538B,10,10.20.0.99:25,10.20.0.34:41338,<,RCPT TO: <someone@domain.com>,
2015-04-20T14:33:13.856Z,SERVER\Local Network Relaying,08D249192435538B,11,10.20.0.99:25,10.20.0.34:41338,>,250 2.1.5 Recipient OK,
2015-04-20T14:33:13.856Z,SERVER\Local Network Relaying,08D249192435538B,12,10.20.0.99:25,10.20.0.34:41338,<,DATA,
2015-04-20T14:33:13.856Z,SERVER\Local Network Relaying,08D249192435538B,13,10.20.0.99:25,10.20.0.34:41338,>,354 Start mail input; end with <CRLF>.<CRLF>,
2015-04-20T14:33:13.856Z,SERVER\Local Network Relaying,08D249192435538B,14,10.20.0.99:25,10.20.0.34:41338,*,,Proxy destination(s) obtained from OnProxyInboundMessage event
2015-04-20T14:33:13.871Z,SERVER\Local Network Relaying,08D249192435538B,15,10.20.0.99:25,10.20.0.34:41338,*,Tarpit for '0.00:00:05' due to '554 5.1.0 Sender denied',
2015-04-20T14:33:18.887Z,SERVER\Local Network Relaying,08D249192435538B,16,10.20.0.99:25,10.20.0.34:41338,>,554 5.1.0 Sender denied,
2015-04-20T14:33:18.887Z,SERVER\Local Network Relaying,08D249192435538B,17,10.20.0.99:25,10.20.0.34:41338,-,,Remote(SocketError)
Any ideas as to how I can quickly rectify this? Putting it back the way it was would be fine for me for now, but I cannot figure out how to reverse the "Remove-ADPermission" command above... :(
Edit: I ran these commands to get things back (but still don't know how to add the permission back for the command that did the Remove-ADPermissions)
Set-SenderFilterConfig -BlockedDomains $null
Set-SenderFilterConfig -InternalMailEnabled $false
Either way for now copiers and hardware appliances are able to send emails internally over the "Local Network Relaying" connector so it's good enough for now... will await responses on here before proceeding any further :)
-
Edited by
trafsta1
Monday, April 20, 2015 3:23 PM