I tried to use mailx to read one of my mailboxes and I was surprised it listed 1 message with a mailbox of thousands of e-mails. When I quitted mailx, it updated the mailbox file accordingly, thus it really has 1 message. It didn't actually delete any messages but from-quoted all the "From " lines in the entire mailbox file, except the first one, logically attaching all e-mails to the first e-mail.

I found out the cause of this problem: the mailbox file in question was generated on a Windows system and contains CR/LF newline characters. When I converted the (then fixed) mailbox to Unix format to have LF newline characters, mailx was able to read the mailbox file correctly.

While I understand that mailx is a Unix application and such it is not expected to read mailboxes generated by Windows, it would still be nice if it would avoid causing damage. When presented with DOS newlines, it should either stop processing it, or handle DOS newlines correctly.