RAZOR-CHECK(1)
π¦ RAZOR-CHECK(1) π¦
okay so this is the razor-check page from the User Contributed Perl Documentation, and bestie, we are gonna get you so comfy with it π
β¨ NAME β¨
razor-check β the Razor Filtering Agent, aka your personal spam bouncer πͺ
πΈ SYNOPSIS πΈ
razor-check [options] [ mail1 [ mail2 .. ] ]
$ cat mbox | razor-check
$ razor-check ./mbox
$ razor-check -d mbox mail.1 mail.2 mail.3
like, pipe it, hand it a file, hand it several files β it's giving flexible π
π DESCRIPTION π
razor-check checks a mail against the distributed Razor Catalogue by communicating with a Razor Catalogue Server. literally just vibes-checking your mail against the big shared spam database β¨ And important: it should be invoked before the mail is delivered or processed by a human. like, do it first, don't make a person read the spam first π
So here's the exit-value tea, and this part matters:
- exit value
0β the signature for the mail is catalogued on the server (spam) π - exit value
1β the mail is not catalogued by the server (not a spam) π
razor-check should be invoked against every incoming mail by mail processors (like procmail) or MTAs (like sendmail). An alternate method would be to call razor-check from cron, at regular intervals, to identify and mark spam in queued mailboxes. lowkey a whole different strategy but it's valid π«Ά
If razor-check is 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 it's multitalented: 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. More than one file may be present on the command line, can be either a non-mbox or mbox in any order. it does not care about your ordering, it's chill like that π
β οΈ But heads up bestie: more than one non-mbox mail cannot be read from stdin. that's a hard nope, don't try it π
π 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. classic. razor-check takes the following arguments:
-hβ Print a usage message and exit. short and sweet, it ate π-vβ Print the version number and exit. know your build, periodt β¨-d,--verboseβ Print debugging information. for when you need to see everything π-debuglevel=n,-dl=nβ Set debug level to 'n'. Default is3without-doption,9with. so like,-dturns the volume way up π-whitelist=fileβ Specify file to use for whitelisting. Overrides'whitelist'option inrazor-agent.conf. your allow-list, your rules π«Ά-sβ Simulate a check. Do everything except talk to the server. introvert mode: it does all the work but refuses to socialize π-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. it's the home base of the whole operation π-logfile=fileβ Specify file to log to instead of what is in the configuration file. The default is<razorhome>/razor-agent.log. receipts, kept π-rs=razor.server.comβ Use this Razor Catalogue Server instead of readingservers.catalogue.lst. choose your own server, main character energy π-Hβ Compute and print the signature of the mail contents and exit. If-e=integeris not specified, all supported engines will be used. just the signature, no checking, no drama β¨-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. pick your engine wisely π-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. so fresh, so frequently updated π
π§ RECIPES π§
razor-check is usually invoked from procmail(1). here are some common ways of using it with procmail β copy these, they're iconic:
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> β legends, both of them π«Ά
π 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. free as in go off, bestie π
and that's the whole page!! π this gem is perl v5.44.0, dated 2026-10-17 β screenshot it, cite it, live by it. mwah π β¨
π¦ where this page comes from
- arch rolling: razor 2.88-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms