reformime expects to see an RFC-822 compliant message on standard input.
If no options are given, reformime prints MIME structure of the message. The output will consist of so-called "MIME reference tags", one per line. For example, you might see the following output:
1 1.1 1.2This tells you that the message contains two different MIME sections. The first line will always contain "1", which refers to the entire message, which happens to be a multipart/mixed message. "1.1" refers to the first section of the message, which happens to be text/plain section. "1.2" refers to the second section of the message, which happens to be an application/octet-stream section. This is a typical situation.
If the message is not a MIME message, or it does not contain any attachments, you will see a rather boring
1If the first part of the message was itself a multipart/alternative section, you would see the following instead:
1 1.1 1.1.1 1.1.2 1.2
The -r option performs the following actions.
If there is no Mime-Version:, Content-Type:, or Content-Transfer-Encoding: header, reformime will create a default one.
If the Content-Transfer-Encoding: header contains 8bit or raw, but only seven-bit data is found, the Content-Transfer-Encoding header is changed to 7bit.
-r7 does the same thing, but also converts 8bit transfer encoding containing eight-bit characters to quoted-printable encoding.
-r8 does the same thing, but also converts quoted-printable encoded sections to 8bit, except in some situations.
$HOME/.tmp - temporary files