What’s the issue?
Database Mail is the SQL Server feature for sending email from within the database engine, used for SQL Server Agent job notifications, alerts, and application-driven email messages. It depends on a set of extended stored procedures controlled by the Database Mail XPs server configuration option, which must be enabled before Database Mail can be used.
The setting is off by default and is enabled either explicitly to support a known mail use case or as a side effect of installing features such as SQL Server Agent alerts that depend on Database Mail. Once enabled, any login with the appropriate permissions can call procedures such as sp_send_dbmail to send messages through the configured mail profiles.
This finding identifies instances where Database Mail XPs is set to 1. It is not necessarily a problem, but it is worth noting in case the team is unaware that mail capability is active or unaware of the considerations that come with allowing email to be sent from the engine.
Why is this a problem?
Database Mail is a useful and widely deployed feature, and most instances that have it enabled are using it for legitimate operational purposes such as job failure notifications and severity-based alerts. The condition is worth surfacing primarily so the team can confirm that the use case is intentional and that permissions are appropriately scoped.
The main risk with Database Mail relates to who can call the mail procedures. By default, members of the DatabaseMailUserRole in msdb can send email through configured mail profiles, and this membership is sometimes granted more broadly than necessary. A login with this access can send email to arbitrary recipients with arbitrary content, which creates several abuse paths.
The most operationally serious risk is using a SQL Server instance to participate in distributed denial-of-service or spam campaigns. A compromised application account or a malicious insider with mail permissions could send large volumes of email to external addresses, both consuming resources on the SQL Server host and potentially causing the instance’s source domain or IP address to be added to email blocklists. Recovery from blocklisting is difficult and can affect legitimate mail from the same domain.
Database Mail can also be used as an exfiltration channel. An attacker who reaches the database with mail permissions can send query results or other sensitive data to external email addresses, bypassing network-based data loss prevention controls that focus on traditional egress paths. The activity may not appear unusual to monitoring tools that do not specifically watch for outbound mail patterns.
What should you do about this?
Confirm that Database Mail is being used intentionally on the instance. For instances where Database Mail is required, review and tighten the permissions to send mail. Membership in DatabaseMailUserRole should be limited to the specific accounts that need it, typically a small number of operational accounts and the SQL Server Agent service account. Remove any broad role memberships and replace them with narrowly scoped grants that match actual usage.
Restrict mail profile access using profile-level security, granting each profile only to the principals that need to use it. The default public profile access pattern is convenient but allows any authorized mail user to send through any profile, which complicates auditing and broadens the abuse surface unnecessarily.
Configure the SMTP relay used by Database Mail to enforce its own restrictions, including allowed sender domains, allowed recipients, and rate limits. The relay-side controls provide defense in depth even if SQL Server-side permissions are misconfigured, and they can detect or block abusive patterns regardless of how the mail was generated.