jdow wrote: > A few weeks ago I'd have said "Easy, Ducky!" Then I ran into DoveCot > that uses an indexed almost "mbox" file. There is no way to do it > other than "good guess". However, for a traditional UNIX mbox file > you should be able to nail it perfectly simply looking for the "From" > feature. The dirt stupid "mail" utility looks for a blank line > followed by a line that starts with "From". All other lines that > start with From are supposed to be escaped to ensure accurate > detection. DoveCot skips this blank like feature sometimes. "mail" > does not like this. I have not yet seen any indication that SA is > upset with this, however.
Just to be pedantic, it's actually (IIRC) a double newline followed by "From " (note the space! It's important.) Many mail-handling apps will actually parse the From-space "header" in more detail, "just in case". grep "^From " <mboxfile>|wc -l typically gives an accurate count; procmail at least is bright enough to escape message body lines such that they don't break this. -kgd -- Get your mouse off of there! You don't know where that email has been!