Skip to main content

Inbound Email and Domain Rules

The XRM module includes a subsystem for managing inbound email routing and filtering. Four configuration areas work together to define how incoming email is handled: domain-level rules filter by sender domain, email address configuration defines recipient behaviour, email-level rules filter by sender address, and quarantine records hold messages flagged for review.

Architecture​

Inbound email processing follows a layered evaluation model:

Domain rules​

Domain rules filter inbound email at the sender's domain level before any per-address processing occurs.

FieldPurpose
domain_idThe receiving domain this rule applies to
inbound_sender_domain_matches_textSender domain patterns to match
inbound_sender_domain_match_typeMatch strategy: exact or regex
inbound_sender_domain_match_ruleAction to take (e.g. drop, quarantine)
inbound_sender_domain_match_destinationOptional forwarding destination

Match types​

  • exact — the sender's domain must exactly match one of the values in the array
  • regex — the sender's domain is tested against each array entry as a regular expression

Email address configuration​

Email address configuration controls how specific recipient email addresses, identified by their local part, behave by default.

FieldPurpose
domain_idThe receiving domain
inbound_email_recipient_local_partsLocal parts this config applies to (e.g. sales, accounts)
inbound_email_default_match_ruleDefault action for unmatched senders
inbound_email_default_destinationsDefault forwarding addresses
inbound_email_quarantine_retention_daysHow long quarantined messages are kept (default: 90)
inbound_email_quarantine_notification_frequencyNotification schedule
inbound_email_quarantine_notification_dayDay of week/month for notifications

Default match rules​

CodeMeaning
DDrop — discard the message silently
QQuarantine — hold for review (default)
IDIdentify and drop — log the message then discard
IQIdentify and quarantine — log and hold for review
FForward — deliver to the configured destinations

Notification frequency​

CodeMeaning
IImmediate — notify on each quarantined message
DDaily digest
WWeekly digest (notification day: 0=Monday, 6=Sunday)
MMonthly digest (notification day: 0=last day of month, 1–31=day)

Email rules​

Email rules provide sender-specific overrides for a configured email address. They evaluate after the domain rules pass and allow finer-grained control.

FieldPurpose
email_idThe email address configuration this rule belongs to
inbound_sender_email_local_part_matches_textSender local parts to match (e.g. spam, noreply)
inbound_sender_email_match_typeMatch strategy: EXACT or REGEX
inbound_sender_email_match_ruleAction to take (same codes as default match rules)
inbound_sender_email_match_destinationsOptional override forwarding addresses

Quarantine items​

Messages that are quarantined are stored with full headers and optional body content.

FieldPurpose
domain_idThe receiving domain
message_from_emailSender address
message_to_emailRecipient address
message_subjectEmail subject line
message_body_textPlain text body
message_body_htmlHTML body
message_object_store_identifierObject storage bucket/container identifier
message_object_keyObject storage key for the full message
message_actionThe action that was applied
message_destinationWhere the message was or would be forwarded

Traceability​

Each quarantine item records which domain, email address, or sender rule caused it to be held. This allows administrators to trace why a specific message was quarantined and adjust rules accordingly.

Object storage​

For large messages, the full content may be stored in external object storage. The quarantine record keeps the storage reference, while the text and HTML body fields may contain a truncated preview or be empty if the full content is only in object storage.

Authorisation​

Inbound email settings and quarantine records are scoped to the tenant. Authenticated users can review relevant configuration and quarantine history, while changes require the appropriate permissions.