SPAMORACLE.CONF(5)
πΈ SPAMORACLE.CONF(5) πΈ
ok bestie, welcome to the File Formats Manual page for the SpamOracle config file π this is the section 5 glow-up, she's giving reference material, she's giving "read me before you touch anything" energy, and honestly? she ate.
β¨ NAME β¨
spamoracle.conf β the SpamOracle configuration file format π
π DESCRIPTION π
So the spamoracle.conf file is literally the config file that runs the whole show for the spamoracle(1) e-mail classification tool. By default, bestie goes looking for this config in $HOME/.spamoracle.conf, but you can point her somewhere else entirely with the -config flag to spamoracle(1). Flexible queen. π
Important note, and I need you to hear me on this one: most of these config parameters should not be modified lightly. Like, at all. Mess with them and you may get completely wrong e-mail classification. π If you wanna actually understand what these parameters do, get familiar with Graham's filtering algorithm β it's described in the paper referenced at the end of this page. Do your homework, babe. π
π SYNTAX π
The spamoracle.conf file is built out of lines that look like variable = value. Lines starting with a # sign are comments and get ignored. Blank lines? Also ignored. We simply don't see them. π
Depending on what type the variable is (peep the big list below), that value part takes one of these forms:
- string β a sequence of characters. Blanks (spaces, tabs) at the beginning and the end of the string are ignored. Alternatively you can wrap the string in double quotes (
"), and then spaces are not trimmed. Inside quoted strings, backslashes (\) and double quotes (") must be escaped with a backslash, as in\\or\". - boolean β either
on,yes,true, or1to turn the boolean option on, oroff,no,false, or0to turn it off. - integer β a decimal integer.
- float β a decimal floating-point number.
- regexp β a regular expression in
emacs(1)syntax. The repetition operators are*,+, and?. Alternation is written\|and grouping is written\(...\). Character classes go between brackets[...]as usual. A single dot denotes any character except newline. Regular expressions are case-insensitive. π§
π CONFIGURABLE PARAMETERS π
database_file(typestring, default value$HOME/.spamoracle.db) The location of the file that holds the database of word frequencies used byspamoracle(1). That's her little word-hoard. πhtml_retain_tags(typeboolean, default valuefalse) In HTML-formatted e-mails and attachments, the names of HTML tags are normally not treated as words and get ignored for the word frequency calculations. But if you sethtml_retain_tagstotrue, HTML tags (likeimgorbold) get treated as words and included in the computation of word frequencies. Tags are words now, I guess. πhtml_tag_attributes(typeregexp, default valuea/href\|img/src\|img/alt\|frame/src\|font/face\|font/color) This regular expression matches pairs of HTML tags and HTML attributes written astag/attribute. When scanning HTML-formatted e-mails and attachments, attributes to HTML tags are normally ignored β unless the tag/attribute pair matches thehtml_tag_attributesregexp. If the pair matches, the value of the attribute (for instance, the URL for thea/hrefattribute) gets scanned for words. π₯mail_headers(typeregexp, default valuefrom:\|subject:) A regular expression that decides which headers of an e-mail message get scanned for words.alternative_favor_html(typebool, default valuetrue) This one decides howmultipart/alternativemessages are treated. If this parameter is set, and one part of the alternative is of typetext/html, that part gets scanned and all the other parts get ignored. In all other cases, all parts of the alternative get scanned. Pick a favorite, I guess. πspam_header(typestring, default valueX-Spam) The name of the header thatspamoracle markadds to incoming e-mail messages, carrying the results of the spam/non-spam classification.attachments_header(typestring, default valueX-Attachments) The name of the header thatspamoracle markadds to incoming e-mail messages, carrying the one-line summary of attachment types, names and character sets. You can turn off the generation of this header with thesummarize_attachmentparameter. Bye bye, header. πsummarize_attachment(typeboolean, default valuetrue) If this parameter is set,spamoracle markgenerates a one-line summary of the attachments of the incoming messages and inserts that summary into the message headers. Setting this parameter tofalsedisables the generation of this extra header.num_meaningful_words(typeinteger, default value15) The maximal number of "meaningful" words that get retained for computing the spam probability. During mail analysis,spamoracleextracts all the words of the message and keeps those whose spam frequency (frequency of occurrence in spam messages) is closest to1or to0. At mostnum_meaningful_wordsof these "meaningful" words are retained. Only the most dramatic words survive. π€max_repetitions(typeinteger, default value2) The maximum number of times a given word can occur in the set of "meaningful" words retained for computing the spam probability. The default value of2means at most2occurrences of the same word get retained. We love a word that doesn't overstay her welcome. β¨low_freq_limit(typefloat, default value0.01)high_freq_limit(typefloat, default value0.99) The spam frequency of a word is computed as the number of occurrences in spam divided by the number of occurrences in all messages. That ratio then gets clipped to the interval[ low_freq_limit, high_freq_limit ], so that words which are extremely rare or extremely common in spam don't bias the probability computation too much. The default values of0.01and0.99are adequate for a corpus of a few thousand e-mails. For larger corpora (e.g.10000e-mails), the values0.001and0.999may give better results. Scale up, bestie. πmin_meaningful_words(typeinteger, default value5) The minimum number of "meaningful" words below whichspamoracle markrefuses to classify the e-mail and outputs"unknown"status. This happens with very short e-mails, or e-mails that consist exclusively of links and pictures. Sometimes there's just nothing to work with. π€·good_mail_prob(typefloat, default value0.2) The spam probability below which the e-mail gets classified as non-spam. Good mail, queen. π«Άspam_mail_prob(typefloat, default value0.8) The spam probability above which the e-mail gets classified as spam. Messages whose probability falls betweengood_mail_probandspam_mail_probget classified as"unknown". The middle child zone. π
π AUTHOR π
Xavier Leroy <Xavier.Leroy@inria.fr> β we stan a legend. π
β SEE ALSO β
spamoracle(1)http://www.paulgraham.com/spam.html(Paul Graham's seminal paper β yes, seminal, go read it, iykyk π)
and that's the whole page, babe π this was SPAMORACLE.CONF(5) from the File Formats Manual, footer energy and all β catch you in the next section, mwah ππΈ
π¦ where this page comes from
- debian bookworm: spamoracle 1.6-1+b2 Β· GPL-2.0-only
- debian trixie: spamoracle 1.6-2+b4 Β· GPL-2.0-only
- ubuntu jammy: spamoracle 1.6-1build1 Β· GPL-2.0-only
- ubuntu noble: spamoracle 1.6-2 Β· GPL-2.0-only
- ubuntu questing: spamoracle 1.6-2
- ubuntu resolute: spamoracle 1.6-2build1 Β· GPL-2.0-only
- ubuntu stonking: spamoracle 1.6-3build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms