Match sender address in message
SenderAddressLocation decides which sender address a rule checks:
- Header (the default): the From field the user sees.
- Envelope: MAIL FROM, the Return-Path. It works only with From, FromMemberOf, FromAddressContainsWords, FromAddressMatchesPatterns and SenderDomainIs.
- HeaderOrEnvelope: both, which catches a domain wherever it appears.
Set it in the EAC rule settings as Match sender address in message, or with -SenderAddressLocation on New-TransportRule or Set-TransportRule.
Sender conditions
- From, FromScope (InOrganization or NotInOrganization), FromMemberOf.
- FromAddressContainsWords and FromAddressMatchesPatterns.
- SenderADAttributeContainsWords and SenderADAttributeMatchesPatterns.
- SenderDomainIs matches subdomains too.
- SenderIPRanges matches the last hop, which is not guaranteed to be the original sender. Behind a third-party filter, the last hop is the filter.
Inside or outside: a sender is inside if the message came over an authenticated connection and the sender is an organization object, or the sender is in an Authoritative or Internal relay domain over an authenticated connection. External relay domains count as outside.
Recipient conditions
- SentTo cannot be a group. For groups use AnyOfToHeader, AnyOfCcHeader, AnyOfToCcHeader and their MemberOf versions, which act on all recipients.
- SentToScope, SentToMemberOf, RecipientDomainIs, RecipientAddressContainsWords and RecipientAddressMatchesPatterns.
- RecipientAddressType: Original or Resolved (default Resolved).
Group membership is cached
Group membership used by rules is cached and refreshed about every 3 hours, with no SLA. A user added to a group an hour ago may not match a FromMemberOf rule yet. Recreating the rule does not help; waiting does.
Other conditions
Subject or body words and patterns, message size (MessageSizeOver), message type (MessageTypeMatches, such as OOF or Encrypted), importance, classification, headers (HeaderContainsMessageHeader with HeaderContainsWords), and attachment conditions covered under scenarios.