RAZOR-CHECK(1p)
π razor-check β the Razor Filtering Agent π
okay so bestie, welcome to razor-check(1p), which is a page from the User Contributed Perl Documentation collection and it is literally the Razor Filtering Agent. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
razor-check [options] [ mail1 [ mail2 .. ] ]
$ cat mbox | razor-check
$ razor-check ./mbox
$ razor-check -d mbox mail.1 mail.2 mail.3
π¦ DESCRIPTION π¦
So what razor-check does is it takes a mail and checks it against the distributed Razor Catalogue by talking to a Razor Catalogue Server. The vibe is: run this before the mail gets delivered or before a human ever lays eyes on it. π
It exits with exit value 0 if the signature for the mail is catalogued on the server (that's spam, bestie π) or 1 if the mail is not catalogued by the server (not a spam, we love that for you β¨).
razor-check should get invoked against every single incoming mail by mail processors (like procmail) or MTAs (like sendmail). And an alternate method, if you wanna be different, is calling razor-check from cron at regular intervals to identify and mark spam in queued mailboxes. main character scheduling energy fr fr π
If razor-check gets passed more than one mail, it will check each against the database, printing out the serial number of every mail considered to be spam. And yes, razor-check supports mbox-formatted files with 1 or more mails in them, as well as files containing a single RFC 822 (non-mbox) mail. You can put more than one file on the command line, and it can be either a non-mbox or mbox in any order, no rules. However β and this is important β more than one non-mbox mail cannot be read from stdin. Not me warning you in advance π
π USAGE π
razor-check is usually run by piping the contents of the mail to it, or by providing the name of the file that contains the mail message to be checked as the last argument. And it takes the following arguments:
-hβ Print a usage message and exit. short king behavior.-vβ Print the version number and exit. π«-d | --verboseβ Print debugging information. spill the tea, program.-debuglevel=n | -dl=nβ Set debug level to 'n'. Default is3without-doption,9with. so yes,-dcranks it all the way up, obsessed.-whitelist=fileβ Specify file to use for whitelisting. This one overrides the 'whitelist' option inrazor-agent.conf. your rules, your call.-sβ Simulate a check. Do everything except talk to the server. it's giving rehearsal π-conf=filenameβ Specifies an alternate configuration file. If not specified, it is computed, seerazor-agents(1)manpage for details. Seerazor-agent.conf(5)manpage for various configuration options. The default is<razorhome>/razor-agent.conf.-home=dirβ Specify razorhome directory. This is where the configuration file, logfiles, identities, and server files live. If not specified, it is computed, seerazor-agents(1)manpage for details.-logfile=fileβ Specify file to log to instead of what is in the configuration file. The default is<razorhome>/razor-agent.log.-rs=razor.server.comβ Use this Razor Catalogue Server instead of readingservers.catalogue.lst. pick your own fave, iconic.-Hβ Compute and print the signature of the mail contents and exit. If-e=integeris not specified, all supported engines will be used.-S=stringβ Accept a list of pre-computed (with-H) signatures on the command line, instead of computing one from mail content. Signatures can be submitted in hex or base64, but base64 is preferred. Requires-e=integer. Usage:
razor-report -e 1 -S a8a3d545adb73f9733675571ffeaf10cba87745b
-e=integerβ Specify engine used to create signatures. Must be1,2,3, or4in this version. Engine 1, or-e=1, is used for Razor 1.x signatures. Used only with-S=stringor-H.-ep4=stringβ String used by engine 4 when computing signatures. Published by the Razor Catalogue Servers and updated very frequently. Used only when-e=4. stay on top of it, bestie π₯
π RECIPES π
razor-check is usually invoked from procmail(1). Here are some common ways of using it with procmail:
To change the Subject header if mail is spam:
:0 Wc
| razor-check
:0 Waf
| formail -i "Subject: Razor Warning: SPAM/UBE/UCE"
To add a X-Razor2-Warning header to spam:
:0 Wc
| razor-check
:0 Waf
| formail -A "X-Razor2-Warning: SPAM."
To file spam in a mailbox
:0 Wc
| razor-check
:0 Wa
/home/foo/Mail/razor-caught
π AUTHORS π
Vipul Ved Prakash <mail@vipul.net>, and Chad Norwood <chad@samo.org>
π§ SEE ALSO π§
razor-agents(1), razor-agent.conf(5), razor-admin(1), razor-report(1), razor-revoke(1), razor-whitelist(5)
π LICENSE π
This is free software, distributed under the Artistic License 2.0. slay, legally speaking π
ok that's the whole page, bestie! this one came out ofperl v5.40.1and it's dated2025-05-24, so go forth and filter that mail. periodt. β¨πΈπ¦
π¦ where this page comes from
- debian trixie: razor 1:2.85-11
- ubuntu questing: razor 1:2.85-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms