SeraphDocumentation

How Seraph works

Seraph checks incoming email before delivering it to your mail server, and outgoing email before sending it to its destination. For incoming mail, traditional anti-spam and malware checks work alongside locally hosted AI classification. The results inform delivery decisions under your filtering policies. This guide explains those checks, what happens when delivery fails, and which messages and records the service stores.

On this page
Seraph between the internet and your DirectAdmin server Incoming mail goes from the internet to Seraph's filter nodes, which deliver it with its verdict to your DirectAdmin server and on to the inbox or the spam folder. Outgoing mail goes from your server, logged in on port 587, to Seraph's relay, which checks it and sends it on. Seraph's control plane holds the settings for both and does the domains' setup and checks with your server. The internet senders and recipients incoming outgoing Seraph Filter nodes the MX for your domains Relay checks your outgoing mail Control plane servers, domains, DNS checks, settings with its verdict setup, checks port 587, logged in Your DirectAdmin server Exim, Dovecot and the Mail Filter plugin Mailboxes inbox, spam folder, sent mail

Seraph has three parts:

On a DirectAdmin server, seraph-tool.sh installs the integration. Administrators, resellers and domain owners manage filtering through the Mail Filter plugin. References to "Seraph's operator" mean the Servada team responsible for the service.

Incoming mail

A message's way through a filter node Connection: known-bad networks are turned away and a new server waits 4 seconds. Recipient: only addresses that exist are accepted, else refused. Checks: SPF, DKIM and DMARC, reputation and a virus scan; malware is refused. The model reads a digest of the message, with some personal details taken out, and says what kind of mail it is. Verdict: deliver, to the inbox, or junk, to the spam folder or quarantine. Connection known-bad networks turned away; a new server waits 4 seconds turned away Recipient only addresses that exist: Seraph asks your server no such address Checks SPF, DKIM and DMARC, reputation, a virus scan malware The model reads a digest of the message and says what kind of mail it is Verdict deliver or junk, at the sensitivity you chose, with the reason deliver junk Inbox Spam folder or quarantine
  1. Connection. Filter nodes accept SMTP connections on port 25. Networks listed by Spamhaus DROP and servers listed by enough blocklists are rejected. Unfamiliar servers must wait four seconds before sending commands; sending too early can indicate an automated spam client. Connection history is remembered for a week.
  2. Recipient validation. Seraph asks your server whether the recipient exists before accepting mail. A "no such address" response is cached for 15 minutes, so a newly created mailbox may need up to 15 minutes to become reachable through the filter.
  3. Authentication and content checks. Seraph checks SPF, DKIM, DMARC, sender reputation and content rules, and scans for malware using ClamAV with additional signatures. Detected malware and known scam or phishing messages are rejected during the SMTP session. The sending server receives the rejection; the message is not delivered to your mailbox.
  4. The model. A locally hosted AI model reads a short digest of the message: the sender's name and address and how it authenticated, where it came from, the subject, the links, the attachments' names, the start of the text, a few keywords, and the mailbox's own description where it has one. In the subject and the text, the recipient's address becomes a placeholder, other addresses keep only their domain, web links only their host, and bank account numbers, phone numbers and long runs of digits are removed. The sender is kept as is, on purpose: evaluating the sender is part of the check. This is not anonymisation: names in the text remain. Only the digest goes to the model, never the whole message, and Seraph keeps no copy of it: its record of each call holds a fingerprint, the time and the outcome. The model answers fixed questions, such as whether the message is phishing, spam, a cold sales pitch or legitimate. It never writes free-form text for message headers.
  5. Filtering decision. Domain and mailbox settings determine whether accepted mail is delivered normally or marked as junk. Sensitivity can be relaxed, normal or strict. Messages that pass neither SPF nor DKIM receive stricter treatment and always go to junk under strict sensitivity. Blocked senders are rejected. Allowed senders are delivered when their From domain authenticates; malware checks still apply.

On your server, Exim keeps Seraph's verdict headers only on mail from Seraph, and a Sieve rule files junk in top-level Junk by default, or the folder selected for that address. The DirectAdmin guide lists the server changes.

AI classification and delivery decisions

Traditional checks establish sender authentication, reputation and known content or malware signals. The locally hosted model adds an assessment of the message's intent and context, including phishing, spam and unsolicited sales outreach. It receives the short digest described above, with the configured recipient context where available.

Seraph combines these results and applies the domain and mailbox policies. These determine whether accepted mail reaches Inbox, the selected spam folder or quarantine. For example, one mailbox can permit unsolicited sales emails while another sends them to spam. SMTP rejections and the handling of quarantined mail are described below.

The model supplies classifications; the configured policy determines the delivery action. Personal learning is a separate opt-in feature, explained under Learning.

The verdict headers

Delivered messages include headers describing the filtering decision. Your server uses these headers to file mail, and users can inspect them in their mail application's message source:

Header What it says
X-Seraph-Action deliver or junk: what your server does with the message
X-Seraph-Class when the model was asked, the kind of mail Seraph acted on: phishing, spam, cold-outreach, legitimate, or uncertain for delivered mail the model leaned against
X-Seraph-Reason why, in one line where there is one, in the language set for the domain or mailbox (Dutch unless set to English)
X-Seraph-Evidence what decided, such as model or rspamd, and any check that couldn't run, such as model unavailable
X-Seraph-ID the reference to give Seraph's support

A message can also carry X-Seraph-Trace: the decision record, trimmed to fit a header and encrypted so that only Seraph can read it.

Quarantine

Spam normally goes to the selected spam folder. With quarantine enabled for a domain or mailbox, it is instead stored on the receiving filter node for 30 days. It reaches your server only when released. Recipients receive an expiry notice three days before deletion, at most once a day; role addresses such as postmaster@ are excluded from these notices.

Use the plugin's Quarantine tab to release or delete a message. Learning actions are also available where personal learning is enabled.

On each node, quarantine is limited to 1 GB per mailbox and 2.5 GB per domain. Once a limit is reached, new spam is delivered to the spam folder. If a node runs low on disk space, its oldest quarantined messages are also delivered there rather than deleted before their expiry date.

When something breaks

Messages over 50 MB are refused.

Outgoing mail

Your server's outgoing mail through Seraph's relay Your DirectAdmin server sends mail from its own domains to the relay on port 587, over TLS, logged in. Admission: is the domain routed through Seraph, and within its sending limits and the mailbox's rate? If not, the mail waits on your server. Scan: malware is refused; a From that isn't yours and signs of phishing count. A message that scores high is held until Seraph's operator releases it, or it is deleted; the rest is delivered through a provider, or directly: with DANE or MTA-STS where the recipient publishes them, else TLS where offered. Your DirectAdmin server mail from your domains, from a mailbox or a script on the server port 587, TLS, logged in Admission does Seraph route the domain, within its limits and rates? waits, retried Scan a From that isn't yours, signs of phishing malware most mail scores high Delivered through a delivery provider, or directly, with the TLS it can get Held for review until Seraph's operator releases it, or it's deleted

The port-25 lock

To prevent direct delivery from bypassing filtering, Seraph restricts inbound connections for a domain after its MX records have pointed exclusively to Seraph for 24 hours. Port 25 then accepts that domain's mail only from Seraph and any configured delivery-provider fallback hosts. The 24-hour delay allows cached MX records and queued mail at the previous filter to clear.

Other senders receive a temporary SMTP error (451), allowing them to retry after refreshing DNS. Authenticated users, mail clients on ports 587 and 465, and locally submitted mail are unaffected.

The control plane keeps the list of locked domains, and your server fetches it every 5 minutes. A domain whose MX moves away comes off the list. Seraph's operator can keep a domain open.

Learning

Two optional features use users' corrections to improve filtering. Both are disabled by default and involve storing copies of messages, as described below.

Personal learning

A mailbox can have a personal model trained on corrections: messages moved into or out of its selected spam folder, and the quarantine actions "deliver and learn" and "delete and learn".

Samples for Seraph

Shared samples are a separate feature. When enabled for a domain, your server keeps copies of spam corrections for manual review by Seraph after you export them. Non-spam samples require a separate opt-in. These copies can contain private correspondence and attachments. Read the consent and export instructions before enabling collection.

The control plane

What Seraph keeps

Seraph stores delivery records for support and reporting. It also stores message copies for queued delivery, quarantine, held outgoing mail and learning features. Personal learning and shared sample collection are optional; enabling either creates additional message copies.

The retention periods below distinguish message content from metadata such as addresses, subjects and delivery outcomes. A model digest can still contain personal information despite the substitutions described under Incoming mail.

What Where How long
The records of each incoming message: its verdict, its delivery, the mail log the filter node, and a copy on the control plane 30 days
The records of each outgoing message: sender, sending mailbox, recipients, outcome, bounces and complaints the relay, and the control plane 30 days on the relay, 90 days on the control plane
Recipients that bounced as unknown on a direct delivery, with part of the receiving server's reply the control plane, and the relays while they're refused refused for 7 days; the entry is deleted 7 days later
Daily counts, per domain and per sending mailbox, and DMARC reports received the control plane 13 months
A message's digest, for the model a locally hosted AI model Seraph keeps no copy: its record of each call holds a fingerprint, the time and the outcome
Quarantined mail the filter node that took it 30 days
Mail refused after an outage (above) the filter node that took it 30 days
Mail to Seraph's own addresses (postmaster, abuse, DMARC reports) the filter node 180 days at most
Quarantined mail's sender, recipients and subject the control plane 30 days
Personal-learning corrections the control plane, encrypted 30 days
Samples for Seraph your server, until you export them 30 days at most; an exported file until you delete it
Held outgoing mail the relay until it is released or deleted
Held mail's sender and subject the control plane 30 days after it is released or deleted
Who wrote to your users, as one-way hashes of sender and recipient, so Seraph knows which outgoing mail is a reply the filter nodes 90 days

Two logs can contain addresses without a fixed time-based retention period:

The control plane database is backed up daily, with backups retained for 14 days. Data deleted from the live database can therefore remain in a backup for up to 14 additional days.

This website keeps no log of its visitors, and sets no cookies.