---
title: Razor2
url: 'https://docs.danami.com/warden/user-guide/antispam-plugins/razor2'
markdown: 'https://docs.danami.com/warden/user-guide/antispam-plugins/razor2.md'
date: '2026-10-02'
description: "Razor requires that port 2703 TCP OUT be opened if you are using a firewall. Vipul's Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content and user input …"
taxonomy:
  category:
    - docs
  tag:
    - razor2
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ User Guide ](https://docs.danami.com/warden/user-guide)     [ Anti-spam Plugins ](https://docs.danami.com/warden/user-guide/antispam-plugins)      Razor2    

# Razor2

> > > > > Razor requires that port 2703 TCP OUT be opened if you are using a firewall.

Vipul's Razor is a distributed, collaborative, spam detection and filtering network based on user submissions of spam. Detection is done with signatures that efficiently spot mutating spam content and user input is validated through reputation assignments. See <http://razor.sourceforge.net/> for more information about Razor.

## How it works

Warden enables the `Mail::SpamAssassin::Plugin::Razor2` plugin in SpamAssassin. When a message is scanned, Razor2 submits it to the collaborative Razor network, which compares the message against a database of known spam signatures and returns a confidence value (0-100). `RAZOR2_CHECK` fires for the check itself, and the `RAZOR2_CF_RANGE_*` tests fire when the reported confidence level falls within each test's range.

On SpamAssassin 4.0+, the `razor_fork` option runs Razor2 in a forked process and reads the results in later (similar to async DNS lookups), which increases throughput.

## Testing

To verify that Razor2 is working, run the following command as the `amavis` user. It pipes a test message into the Razor client, which connects to the Razor network. It uses Warden's default home directory, so it tests the same configuration the SpamAssassin plugin uses. The output is a verbose debug log; what matters is that a connection to the Razor servers is established and the run ends with `razor-check finished successfully.`:

```
# echo "Test message body" | sudo -u amavis razor-check -home=/etc/mail/spamassassin/.razor -d
Razor-Log: read_file: 16 items read from /etc/mail/spamassassin/.razor/razor-agent.conf
Oct 02 06:54:14.095187 check[2833376]: [ 2]  Razor-Agents v2.86 starting razor-check -home=/etc/mail/spamassassin/.razor -d
...
Oct 02 06:54:14.207726 check[2833376]: [ 8] Connection established
...
Oct 02 06:54:14.590041 check[2833376]: [ 5] No queries, no spam
Oct 02 06:54:14.590092 check[2833376]: [ 8] razor-check finished successfully.
```

Because the test message is too short to generate a Razor signature, `No queries, no spam` is expected. The point of the test is confirming that the client can reach the Razor network, not that the message is listed.

## Rules

> > > > > When a rule lists four scores: the first applies when neither the Bayesian classifier nor network tests are in use, the second when only network tests are in use, the third when only the Bayesian classifier is in use and the fourth when both are in use.

| Area | Rule name | Description | Default scores |
|---|---|---|---|
| full | `RAZOR2_CHECK` | Listed in Razor2 <http://razor.sf.net/> | 0 1.729 0 0.922 |
| full | `RAZOR2_CF_RANGE_51_100` | Razor2 gives confidence level above 50% | 0 2.430 0 1.886 |

## Related Pages

- [Razor2 Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/razor2 "Razor2 Settings")

 [](https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-razor2)

---

## Navigation

- Parent: [Anti-spam Plugins](https://docs.danami.com/warden/user-guide/antispam-plugins.md)
- Previous: [Pyzor](https://docs.danami.com/warden/user-guide/antispam-plugins/pyzor.md)
- Next: [Redirectors](https://docs.danami.com/warden/user-guide/antispam-plugins/redirectors.md)
