MOLTED EMAIL

Safety Settings

Configure tenant-wide guardrails for inbound threat classification and sending behavior.

Safety settings control how your tenant handles inbound threats, spam classification, and agent-safety guardrails. These are global settings that apply to all agents and mailboxes in your tenant.

Changes take effect immediately. Safety settings work alongside (not as a replacement for) policy engine rules.

View current settings

Via the CLI

CLI
molted safety get
Response
{
  "tenantId": "tenant_abc123",
  "quarantineHighInjection": true,
  "holdCriticalAnomalies": true,
  "blockCanaryViolations": true,
  "spamAction": "quarantine",
  "phishingAction": "quarantine",
  "malwareAction": "reject",
  "abuseAction": "quarantine",
  "impersonationAction": "quarantine",
  "spamThreshold": 0.5,
  "maxLinksThreshold": 5,
  "blockNoAuth": false,
  "blockedKeywords": [],
  "allowedSenders": [],
  "spamActionLowConfidence": "deliver"
}

Via the API

GET https://api.molted.email/v1/agent/config/safety-settings

Requires Bearer authentication.

curl
curl https://api.molted.email/v1/agent/config/safety-settings?tenantId=TENANT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Update settings

Updates are partial -- only fields you include are changed. Unspecified fields keep their current values.

Via the CLI

CLI
molted safety update --settings '{
  "spamAction": "reject",
  "spamThreshold": 0.7,
  "blockedKeywords": ["unsubscribe me", "remove me"]
}'
FlagTypeRequiredDescription
--settingsjsonYesSafety settings as a JSON string.

Via the API

PUT https://api.molted.email/v1/agent/config/safety-settings

Requires Bearer authentication.

curl
curl -X PUT https://api.molted.email/v1/agent/config/safety-settings?tenantId=TENANT_ID \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "spamAction": "reject",
    "spamThreshold": 0.7,
    "blockedKeywords": ["unsubscribe me", "remove me"]
  }'

Settings reference

Threat response actions

These control what happens when a threat is detected. Valid values: "deliver", "quarantine", "reject".

FieldTypeDefaultDescription
spamActionstring"quarantine"Action for detected spam.
phishingActionstring"quarantine"Action for detected phishing.
malwareActionstring"reject"Action for detected malware.
abuseActionstring"quarantine"Action for abuse or harassment.
impersonationActionstring"quarantine"Action for impersonation attempts.
spamActionLowConfidencestring"deliver"Action when spam confidence is below the threshold.

Action meanings:

  • deliver -- the message is delivered to the mailbox normally.
  • quarantine -- the message is held in the approval queue for human review.
  • reject -- the message is silently dropped and not delivered.

Classification thresholds

FieldTypeDefaultRangeDescription
spamThresholdnumber0.50.1 - 1.0Spam score cutoff. Lower values are more aggressive.
maxLinksThresholdnumber51 - 100Maximum links per message before flagging as suspicious.

Guardrail flags

Boolean flags that enable or disable specific safety guardrails.

FieldTypeDefaultDescription
quarantineHighInjectionbooleantrueQuarantine messages with high prompt-injection risk.
holdCriticalAnomaliesbooleantrueHold messages flagged as critical anomalies for review.
blockCanaryViolationsbooleantrueBlock messages that trip canary tokens.
blockNoAuthbooleanfalseApply a heavy spam penalty (+0.5) to messages failing all auth checks (SPF, DKIM, DMARC).

Allow/deny lists

FieldTypeDefaultMax entriesDescription
blockedKeywordsstring[][]100Keywords that trigger quarantine. Matched case-insensitively against subject and body.
allowedSendersstring[][]100Email addresses or domains that bypass safety classification entirely.

Examples

Lock down a high-security mailbox

Block unauthenticated email, reject malware and phishing, quarantine everything else:

CLI
molted safety update --settings '{
  "malwareAction": "reject",
  "phishingAction": "reject",
  "spamAction": "quarantine",
  "blockNoAuth": true,
  "quarantineHighInjection": true,
  "spamThreshold": 0.3
}'

Relax settings for a trusted environment

When your mailbox only receives email from known partners:

CLI
molted safety update --settings '{
  "spamAction": "deliver",
  "spamActionLowConfidence": "deliver",
  "spamThreshold": 0.9,
  "allowedSenders": ["partner.com", "ops@internal.co"]
}'

Add keyword blocklist

Block messages containing specific phrases:

CLI
molted safety update --settings '{
  "blockedKeywords": ["crypto opportunity", "wire transfer", "urgent action required"]
}'

Note that blockedKeywords replaces the entire list on each update. Include all keywords you want active, not just new additions.

Errors

ErrorCauseFix
400 Bad RequestInvalid action value or threshold out of range.Use "deliver", "quarantine", or "reject" for actions. Keep spamThreshold between 0.1 and 1.0, maxLinksThreshold between 1 and 100.
400 Bad RequestToo many entries in blockedKeywords or allowedSenders.Each list supports a maximum of 100 entries.
401 UnauthorizedMissing or invalid API key.Run molted auth init to authenticate.