From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:Mbox" |
|---|
| claim | "neomutt's mbox_path_probe classifies a file as mbox when its first non-blank line (leading LF and CR bytes are skipped; the line is read with fgets into a 256-byte buffer) starts with 'From ' and as MMDF when that line equals the MMDF separator (four 0x01 bytes and LF); a zero-length regular file is also treated as mbox, and directories are not probed." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "mbox and MMDF folders" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "skip leading CR/LF bytes, then first line (fgets, 256-byte buffer); size 0 means mbox" |
|---|
| indicator | "first non-blank line: 'From ' (mbox) or 01 01 01 01 0A (MMDF); empty file = mbox" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "type probe reading the first line with fgets, mutt_str_startswith(tmp, "From ") sets MBOX, equal to MMDF_SEP sets MMDF" |
|---|
| repo | "https://github.com/neomutt/neomutt" |
|---|
| commit | "897cc57b36af55a6c13ec718cd3c95c39391bf6f" |
|---|
| path | "mbox/mbox.c" |
|---|
| lines | "1598-1607" |
|---|
|
| type | "source" |
|---|
| detail | "comment: MMDF separator lines are "\001\001\001\001\n"" |
|---|
| repo | "https://github.com/neomutt/neomutt" |
|---|
| commit | "897cc57b36af55a6c13ec718cd3c95c39391bf6f" |
|---|
| path | "mbox/mbox.c" |
|---|
| lines | "217" |
|---|
|
| type | "source" |
|---|
| detail | "Read mbox_path_probe whole: st_size==0 returns MUTT_MBOX; fgetc loop skips '\n' and '\r' before the line; tmp[256] filled by fgets; startswith 'From ' else equal MMDF_SEP." |
|---|
| repo | "https://github.com/neomutt/neomutt" |
|---|
| commit | "897cc57b36af55a6c13ec718cd3c95c39391bf6f" |
|---|
| path | "mbox/mbox.c" |
|---|
| lines | "1570-1612" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "mbox and MMDF first-line check" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:25:50.399Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T10:08:55.821Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read neomutt mbox.c mbox_path_probe 1570-1625 at 897cc57: directory rejected, st_size==0 is mbox, CR/LF skip loop, fgets into char tmp[256], startswith 'From ' or equals MMDF_SEP." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T09:11:51.804Z" |
|---|
| summary | "mbox_path_probe skips leading CR/LF bytes before the first line, treats an empty file as mbox, and reads at most 255 bytes of the first line; read whole function at the cited commit." |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
|
|---|