mh_lint
Check mail messages for syntax errors
TLDR
Check the current directory
Check a specific directory recursively
Check a MATLAB file
Check an Octave file
SYNOPSIS
mh_lint [+folder ...]
PARAMETERS
+folder ...
Specifies one or more MH mail folders to be checked. The '+' prefix denotes an MH folder. If no folders are specified, mh_lint typically processes the current folder.
DESCRIPTION
mh_lint is a diagnostic utility for the MH (Message Handling System) email client. Its primary function is to examine the integrity and consistency of MH mail folders and their contained messages. It can detect various problems, such as missing message files, incorrect message sequences, corrupted folder structures, or issues with .mh_sequences files.
By identifying these inconsistencies, mh_lint helps users diagnose and potentially repair problems that might lead to unexpected behavior or data loss within their MH email environment. It typically outputs warnings or errors detailing the issues found, allowing users to take corrective actions, often involving other MH utilities like inc, refile, or manual folder manipulation. It's a crucial tool for maintaining the health of MH mailboxes, especially after crashes, system errors, or manual file system operations that might inadvertently affect MH folder integrity.
CAVEATS
mh_lint only reports problems; it does not automatically fix them. Users must manually take corrective action based on its output.
Can be slow on very large mail folders with numerous messages.
Requires the MH system to be installed and correctly configured.
The output can sometimes be cryptic, requiring familiarity with MH folder structures to interpret effectively.
OUTPUT
mh_lint typically prints messages to standard output detailing any inconsistencies or errors found within the specified folders. Output may include warnings about missing messages, incorrect file permissions, sequence number issues, or problems with .mh_sequences files. The messages are often prefixed with 'WARNING:' or 'ERROR:'.
USAGE EXAMPLE
To check the current MH folder for inconsistencies:mh_lint
To check a specific folder named 'inbox' and 'archive':mh_lint +inbox +archive
HISTORY
The MH (Message Handling System) itself originated in the late 1970s at RAND Corporation. mh_lint is an integral part of this suite, designed to maintain the integrity of MH mailboxes. Its development track is directly tied to the evolution of the MH suite, embodying the UNIX philosophy of small, specialized tools. It predates many modern email clients and continues to be used in environments where the MH system is preferred.
SEE ALSO
inc(1), refile(1), scan(1), folder(1), mh(1)