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, or 1 to turn the boolean option on, or off, no, false, or 0 to 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 (type string, default value $HOME/.spamoracle.db) The location of the file that holds the database of word frequencies used by spamoracle(1). That's her little word-hoard. πŸ“
  • html_retain_tags (type boolean, default value false) 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 set html_retain_tags to true, HTML tags (like img or bold) get treated as words and included in the computation of word frequencies. Tags are words now, I guess. πŸ’…
  • html_tag_attributes (type regexp, default value a/href\|img/src\|img/alt\|frame/src\|font/face\|font/color) This regular expression matches pairs of HTML tags and HTML attributes written as tag/attribute. When scanning HTML-formatted e-mails and attachments, attributes to HTML tags are normally ignored β€” unless the tag/attribute pair matches the html_tag_attributes regexp. If the pair matches, the value of the attribute (for instance, the URL for the a/href attribute) gets scanned for words. πŸ”₯
  • mail_headers (type regexp, default value from:\|subject:) A regular expression that decides which headers of an e-mail message get scanned for words.
  • alternative_favor_html (type bool, default value true) This one decides how multipart/alternative messages are treated. If this parameter is set, and one part of the alternative is of type text/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 (type string, default value X-Spam) The name of the header that spamoracle mark adds to incoming e-mail messages, carrying the results of the spam/non-spam classification.
  • attachments_header (type string, default value X-Attachments) The name of the header that spamoracle mark adds 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 the summarize_attachment parameter. Bye bye, header. πŸ‘‹
  • summarize_attachment (type boolean, default value true) If this parameter is set, spamoracle mark generates a one-line summary of the attachments of the incoming messages and inserts that summary into the message headers. Setting this parameter to false disables the generation of this extra header.
  • num_meaningful_words (type integer, default value 15) The maximal number of "meaningful" words that get retained for computing the spam probability. During mail analysis, spamoracle extracts all the words of the message and keeps those whose spam frequency (frequency of occurrence in spam messages) is closest to 1 or to 0. At most num_meaningful_words of these "meaningful" words are retained. Only the most dramatic words survive. 😀
  • max_repetitions (type integer, default value 2) 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 of 2 means at most 2 occurrences of the same word get retained. We love a word that doesn't overstay her welcome. ✨
  • low_freq_limit (type float, default value 0.01)
  • high_freq_limit (type float, default value 0.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 of 0.01 and 0.99 are adequate for a corpus of a few thousand e-mails. For larger corpora (e.g. 10000 e-mails), the values 0.001 and 0.999 may give better results. Scale up, bestie. πŸ“ˆ
  • min_meaningful_words (type integer, default value 5) The minimum number of "meaningful" words below which spamoracle mark refuses 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 (type float, default value 0.2) The spam probability below which the e-mail gets classified as non-spam. Good mail, queen. 🫢
  • spam_mail_prob (type float, default value 0.8) The spam probability above which the e-mail gets classified as spam. Messages whose probability falls between good_mail_prob and spam_mail_prob get classified as "unknown". The middle child zone. πŸ’€

πŸŽ€ AUTHOR πŸŽ€

Xavier Leroy <Xavier.Leroy@inria.fr> β€” we stan a legend. πŸ‘‘


⭐ SEE ALSO ⭐


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 😭🌸