MIME-TOOL(1)
π mime β the MIME message tool, a.k.a. mime-tool π
okay bestie, pull up a chair, because this is the manual page for mime-tool (the command itself is just called mime, lowercase, iconic), and it is genuinely one of the most useful little gremlins in your toolbox. it lives in the General Commands Manual section, and it is not complicated, it's just β¨vibeyβ¨.
π NAME π
mime-tool β a simple program that constructs MIME messages with attached files. that's it. that's the whole job. slay.
πΈ SYNOPSIS πΈ
mime [ -dDvV ] [ -S subject ] [ -F from-address ] [ -T to-address ] [ -C
carbon-copy address ] [ -P prolog-text ] [ -E epiplogue-text ] [ -B
boundary ] [ -O overall content-type ] { [ -78abiquxopm ] [ -t content-
type ] filename }
π¦ DESCRIPTION π¦
so the mime program builds MIME messages with files attached to them. no cap. you get to control:
- the content type β
application/octet-stream,text/plain, or literally any type you feel like specifying yourself - the content type encoding β
7bit,8bit,binary,base64, or auto-detect - the content disposition β attached or inline
- the content boundary string
and because it's a whole mail-adjacent situation, you can also set the mail stuff: subject, from-address, to-address, carbon-copy address, prolog-text, and epilog-text. the whole aesthetic, honestly. π
here's the best part: the output of the MIME-tool program can be piped directly into mail, mailx, or sendmail β or honestly any other command that accepts RFC-822 formatted messages. it just vibes with them. π«Ά
β οΈ NOTE, and this one is important bestie: if you specify 7-bit encoding for an attachment that contains 8-bit data, any data bytes whose high-bit is set get converted into question marks. not a vibe. not slay. just know that going in. π
β¨ OPTIONS β¨
one bullet per flag, no skipping, no gatekeeping:
-7β 7-bit ASCII encoding-8β 8-bit ASCII encoding-aβapplication/octet-streamcontent type-bβ binary encoding-dβ low detail debugging-Dβ high detail debugging-sβ write a subpart-iβ disposition: inline (instead of attachment)-qβ quoted-printable encoding-c content-typeβ explicit content type-tβtext/plaincontent type-oβ omit disposition line-uβ unknown encoding, auto-detect-vβ verbose messages-Vβ very verbose messages-xβ base64 encoding-pβ copy existing MIME part-oβ omit content-disposition-mβ omit content-transfer-encoding-n filenameβ override the filename in the disposition header-Nβ don't add a filename parameter in the disposition header-0β no-op
π yes, -o shows up twice in the original list with two different descriptions β "omit disposition line" and "omit content-disposition". not me editing the source material, i am simply telling you what the page says. both are here, both are preserved, periodt.
π₯ EXAMPLES π₯
using MIME-tool to write a mail message to a file:
mime -S "test message" -F me@foo.net -T someone@somewhere.net
file1 > test.msg
using MIME-tool with the mail command:
mime -S "test message" -F me@foo.net file1 | mail
someone@somewhere.net
using MIME-tool with the mailx command:
mime -S "test message" -F me@foo.net file1 | mailx
someone@somewhere.net
using MIME-tool with the sendmail command:
mime -S "test message" -F me@foo.net file1 | sendmail
someone@somewhere.net
β VERSION β
this is version 1.5.topal3, from June 2009. vintage. iconic. π
π KNOWN BUGS π
okay so, the tea:
- most of the header values are not properly quoted or folded, so long or complex values for these headers may cause problems. specifically, the from-address, to-address, carbon-copy-address and content-type headers may not be properly quoted or folded. so like... keep them simple? π¬
- for some reason, certain e-mail clients (especially from a large software company located in Redmond, Washington β i said what i said) don't seem to recognize file attachments as attachments, and instead display them as inline attachments. maybe this isn't MIME-tool's fault, but the author says they've gotten a few e-mails about it, so it's getting mentioned here. respectfully. π
π AUTHOR π
mime is written by Jeffrey Dutky <dutky@bellatlantic.net>
and shoutout to the whole crew who spotted stuff:
- Oscar Esteban spotted an off-by-one error in the base64 encoding function.
- Sergey Lapin spotted a bug in the filename header construction.
- Chris Hemphill noticed that the documentation (this manual page and the README file) didn't include any examples of how to call the program with common mail commands.
- some additional fixes and additions by Phil Brooke to support Topal.
the way that the whole community pulled up for this little tool... we love to see it. π«Ά
π AVAILABILITY π
the original MIME-tool package can be downloaded from the author's web page at:
http://members.bellatlantic.net/~dutky
this modified version is distributed with Topal:
http://homepage.ntlworld.com/phil.brooke/topal/
and that's the whole page, bestie! π go forth and attach files with confidence. no cap, you're gonna eat. π
πΈ sign-off, cutie: this one is themimepage from the MIME tool source, version1.5.topal3from June 2009 β and yes, the footer would've told you "MIME tool / mime / MIME message tool(1)", but you already knew that, iykyk. β¨π¦
π¦ where this page comes from
- debian bookworm: topal 81-2+b1 Β· GPL-3.0-only
- debian trixie: topal 84-1+b1 Β· GPL-3.0-only
- ubuntu jammy: topal 80-1build2 Β· GPL-3.0-only
- ubuntu noble: topal 81-2ubuntu2 Β· GPL-3.0-only
- ubuntu noble: topal 81-2ubuntu2.1 Β· GPL-3.0-only
- ubuntu questing: topal 84-1build1
- ubuntu resolute: topal 84-1build2 Β· GPL-3.0-only
- ubuntu stonking: topal 84-1build2 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms