· Ejecute los siguientes comando para configurar la condición que selecciona mensajes solo desde fuera de la organización
$Condition = Get-TransportRulePredicate FromScope
$Condition.Scope = “NotInOrganization”
· Utilice los siguientes comandos para redirigir los mensajes hacia la cuenta catch-all
$Action = Get-TransportRuleAction RedirectMessage
$Action.Addresses @(“catch-all@itpro.cl”)
· Para agregar una excepción que evite que se copien o redirijan mensajes que existen efectivamente dentro de la organización, ejecute los siguientes comandos:
$Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
$Exception.Patterns = @(“^dcabezas@itpro.cl$”, “^contactoa@itpro.cl$”, “^jmartinez@itpro.cl$”, …)
· Finalmente se debe crear la regla utilizando el siguiente comando
New-TransportRule -Name “Copiar mensajes a cuenta catch-all” -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
Ejemplos de Transport Rules creadas con Exchange Management Shell
Para copiar mensajes hacia la cuenta catch-all
$Condition = Get-TransportRulePredicate FromScope
$Condition.Scope = “NotInOrganization”
$Action = Get-TransportRuleAction CopyTo
$Action.Addresses = @(“catch-all@itpro.cl”)
$Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
$Exception.Patterns = @(“^contacto@itpro.cl$”, “^support@itpro.cl$”)
New-TransportRule -Name “Copiar mensajes a la cuenta catch-all” -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
Para redirigir mensajes hacia la cuenta catch-all
$Condition = Get-TransportRulePredicate FromScope
$Condition.Scope = “NotInOrganization”
$Action = Get-TransportRuleAction RedirectMessage
$Action.Addresses @(“catch-all@itpro.cl”)
$Exception = Get-TransportRulePredicate AnyOfRecipientAddressMatches
$Exception.Patterns = @(“^contactoa@itpro.cl$”, “^support@itpro.cl$”)
New-TransportRule -Name “Redirigir mensajes hacia la cuenta catch-all” -Conditions @($Condition) -Actions @($Action) -Exceptions @($Exception)
Deja un comentario