> For the complete documentation index, see [llms.txt](https://docs.shieldsguard.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shieldsguard.com/shieldsguard-seg/4.-mail-settings/4.2-mail-body.md).

# 4.2 Mail Body

#### 📖 Overview

The **Mail Body** module allows administrators to create and enforce custom **content filtering rules** by blocking emails that contain specific keywords or phrases within the body of the message.

This is a proactive mechanism designed to **stop unwanted, offensive, or high-risk content** from reaching end users — regardless of the email’s origin or structure.

> 🛡️ This feature is especially useful for preventing social engineering, profanity, data leakage, and policy violations within incoming or outgoing mail.

***

#### 🔍 What You’ll See

* 🔤 **Input Field:** Add one or more keywords to be blocked
* 🛑 **Banned Words List:** Visual panel showing all terms currently enforced
* ➕ **Add Button:** Instantly activate a keyword as a blocked term
* 🗑️ **Delete Options:** Manage or remove terms at any time

***

#### 🧠 How It Works

When an email is received:

1. ShieldsGuard scans the **body content** of the email (including HTML and plain text).
2. If any of the **banned keywords** are found, the message is flagged.
3. The email is then:
   * Quarantined or dropped (depending on policy)
   * Logged in 3.3 Mail as `BLOCKED WORDS IN CONTENT`
   * Counted in dashboard statistics and reporting

***

#### 💬 Use Cases

| Scenario                       | Example Filter Terms                             | Outcome                            |
| ------------------------------ | ------------------------------------------------ | ---------------------------------- |
| Prevent profanity              | `damn`, `hell`, `f***`                           | Blocks offensive emails            |
| Block internal data keywords   | `confidential`, `NDA`, `internal use only`       | Stops sensitive leaks              |
| Stop known phishing terms      | `login here`, `verify account`, `password reset` | Blocks social engineering attempts |
| Enforce marketing/legal policy | `free trial`, `discount`, `unsubscribe`          | Reduces spam and marketing abuse   |

***

#### 🔧 Advanced Tips

* Keywords are case-insensitive.
* You can use partial or exact match logic (e.g., `reset` blocks `password reset`, `reset-link`, etc.).
* Regular updates to keyword lists improve relevance over time.
* Avoid overblocking by testing with common business phrases.

***

#### 📊 Integration with Other Modules

| Module           | Interaction                                             |
| ---------------- | ------------------------------------------------------- |
| **3.3 Mail**     | Displays blocked messages using body filter             |
| **2. Reporting** | Includes content filter verdicts in stats               |
| **3.4 Domain**   | Combine with domain-based filters for targeted blocking |

***

#### ⚙️ Analyst Recommendations

| Best Practice                             | Why It Matters                                   |
| ----------------------------------------- | ------------------------------------------------ |
| Regularly audit banned words              | Avoid false positives, adjust as context changes |
| Tailor rules per region or department     | Localize language, culture-sensitive filters     |
| Monitor reporting panel for filter trends | Know which terms are triggered most often        |

***

> 🎯 The Mail Body module ensures that no message reaches your users if it contains **unwanted, dangerous, or prohibited language** — enforcing policy with precision and speed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.shieldsguard.com/shieldsguard-seg/4.-mail-settings/4.2-mail-body.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
