MAILINSPECT(1)
π MAILINSPECT(1): mailinspect π
okay bestie, welcome to the MAILINSPECT(1) page β the manual name is right there, weβre doing this. π
β¨ NAME β¨
mailinspect β sort an mbox by category and pipe emails to a command. π¦
π SYNOPSIS π
mailinspect [-zjiI] -c category FILE [-gG regex]... [-s command] [-p
style] [-o scoring]
mailinspect -V
πΈ DESCRIPTION πΈ
okay so mailinspect reads the single mbox folder named FILE and sorts it by similarity to category. That category has to be one that was already created by dbacl(1), no improvising. π«Ά It works as a command-line tool, or interactively when you give it the -I switch.
When itβs in command-line mode, mailinspect prints the sorted list of emails on STDOUT. Each line is a seek position for that email inside FILE, followed by the score and a description string in one of several styles chosen via the -p option.
When you supply a command string with the -s option, mailinspect spawns a shell and executes command for every email in FILE β possibly selected via -g or -G β in sorted order. Itβs giving formail(1) energy, except formail(1) doesnβt order the emails. periodt.
In interactive mode, all the command-line functionality is available through keypresses. The sorted list of emails is displayed in a scrollable format, and you can view, search, tag, resort, and send them to shell commands. Predefined shell commands can be associated with function keys. See the usage section below. β¨
Sorting heuristics are currently (and may always be) experimental, so thereβs no guarantee that the orderings are particularly well suited for anything. lowkey important.
π EXIT STATUS π
mailinspect returns 1 on success, and 0 if some error occurred.
Yes, bestie, thatβs what the page says β success is 1, error is 0. Donβt shoot the messenger. π
β¨ OPTIONS β¨
-cβ Use category to compute the scores and sort the emails. This should be the file name of adbacl(1)category.-gβ Only emails matching the regular expression regex are sorted. All other emails are ignored. When several-gand-Goptions are present on the command line, earlier regular expressions are overridden by later ones where applicable. π-iβ Force internationalized mode. π-jβ Force regular expression searches to be case sensitive. π-oβ Determines the scoring formula to be used. The parameter scoring must be an integer greater than or equal to zero. By default, scoring equals zero. π₯-pβ Prints the email index in the given style. The parameter style must be an integer greater than or equal to zero. By default, style equals zero. π-sβ For each email in the list, execute the shell command, with the email body onSTDIN. Emails are processed in sorted order. π«Ά-zβ Reverse sort order. Normally, emails are sorted in order of closest to furthest relative to category, but in this case, the opposite is true. π-Iβ Interactive mode. Instead of printing the sorted list of emails onSTDOUT, emails are displayed and can be scrolled, viewed, searched, and piped interactively at the terminal. πΈ-Gβ Only emails not matching the regular expression regex are sorted. Opposite of the-gswitch. π ββοΈ-Vβ Print the program version number and exit. β
π¦ USAGE π¦
mailinspect needs to read a prelearned category before it can sort the emails in FILE. See dbacl(1). no cap.
Suppose you have two mail folders named good.mbox and bad.mbox respectively. You can create appropriate categories by typing the commands
% dbacl -l good good.mbox -T email
% dbacl -l bad bad.mbox -T email
Next, you can type the following command to view interactively the bad.mbox file with the emails whose score is closest to the category good listed first:
% mailinspect -I -c good bad.mbox
Alternatively, you might be interested only in the five emails in the folder bad.mbox whose score marks them as the furthest away from the category bad, completely independently from any other category such as good (ie you want outliers in the scoring sense).
% mailinspect -z -c bad bad.mbox | head -5
In interactive mode, the following keys are defined:
oβ toggles another scoring formula.pβ toggles another display style.qβ exitsmailinspect.sβ sends the currently highlighted email to a shell command.Sβ sends all currently tagged emails to a shell command, in sorted order. Every email executes the shell command independently.tβ tags the currently highlighted email.Tβ tags all listed emails.vβ sends the currently highlighted email to$PAGERfor viewing. If the environment variablePAGERis not defined, sends the email toless(1).uβ untags the highlighted email.Uβ untags all listed emails.zβ reverses the sort order of displayed emails./β searches for a regular expression (seeregex(7)) anywhere within the contents of all listed emails. Hides all emails which donβt match.?β like/, but hides all emails which match, keeping all those which donβt match.
As a convenience, the function keys F1-F10 can each be associated with a shell command string. In this case, typing a function key has the same effect as the S key, but the command is already typed and ready to be edited/accepted. The function key associations are read from the configuration file .mailinspectrc if it exits. (sic β thatβs what the page says, bestie π)
π FILES π
$HOME/.mailinspectrcβmailinspectreads the file.mailinspectrcin the$HOMEdirectory, if it exists. This is a plain text file which contains entries of the form
# this is a comment
F2 cat >> interesting.mbox
F5 mail zarniwoop@megadodo.com
π ENVIRONMENT π
DBACL_PATHβ When this variable is set, its value is prepended to every category filename which doesnβt start with a'/'. π
π₯ SOURCE π₯
The source code for the latest version of this program is available at the following locations:
π AUTHOR π
Laird A. Breyer <laird@lbreyer.com> π
π SEE ALSO π
bayesol(1), dbacl(1), less(1), mailcross(1), regex(7) β go read those too, bestie. π«Ά
β¨ Thatβs the whole page! This isVersion 1.14from theBayesian Text Classification Toolscrew β now go sort some mbox vibes and slay. πππ¦
π¦ where this page comes from
- nixos 26.05: dbacl 1.14
- nixpkgs unstable: dbacl 1.14
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms