> For the complete documentation index, see [llms.txt](https://wiki.lucysecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.lucysecurity.com/application-reference/settings/submitted-email-settings/custom-rules-and-score-factors.md).

# Custom Rules & Score Factors

{% hint style="info" %}
Navigate to **Settings > Submitted Email Settings > Custom Rules**
{% endhint %}

### Custom Rules

Custom Rules enable the creation and storage of regular expressions (regex) to search through the bodies of reported emails. When an email matches a rule, it is assigned a predefined number of points.

**How It Works**

1. **Define Regex Patterns**: Create regex patterns that identify specific text within email bodies.
2. **Set Points**: Assign a point value to each regex pattern.
3. **Scan Emails**: LUCY scans reported emails for text matching the stored regex patterns.
4. **Assign Points**: Emails that match a regex pattern are assigned the corresponding points.

<figure><img src="/files/sN9fQ62dL59kMvknzRKf" alt=""><figcaption><p>You can use an online tool like <a href="https://regexr.com/">https://regexr.com/</a> to help you build regular expressions.</p></figcaption></figure>

***

### Score Factors

{% hint style="info" %}
Navigate to **Settings > Submitted Email Settings > Score Factors**
{% endhint %}

These score factors are a multiplier that applies to each type of score. You can apply more or less weight to each type in order to fine-tune your results based on your organization's specific needs.

<figure><img src="/files/8PbXtW5NSKhcuiHZ7jZd" alt=""><figcaption><p>A value of 1 is neutral because the score will be multiplied by 1.</p></figcaption></figure>


---

# 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://wiki.lucysecurity.com/application-reference/settings/submitted-email-settings/custom-rules-and-score-factors.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.
