mimecheck(1)
🌸 NAME 🌸
okay so bestie, this is mimecheck(1) — the Check MIME attachments manual — and it's giving a whole little squad of scripts. They all do the “what is this attachment actually?” thing:
mimecheck— determine the type of the MIME encoded of an attachment.mimezip— detect the type of MIME encoded zip archive in an attachment.mimebzip— detect the type of MIME encoded bzip2 data in an attachment.mimegzip— detect the type of MIME encoded gzip data in an attachment.
✨ SYNOPSIS ✨
mimecheck boundary [file]
mimezip boundary [file]
mimebzip boundary [file]
mimegzip boundary [file]
💅 DESCRIPTION 💅
bestie. The scripts mimecheck, mimezip, mimebzip, and mimegzip can be used to determine the contents of MIME encoded attachments of the type application/octet-stream. They require the boundary as provided in the headers and/or bodys of mails with enclosed attachments. (Yes, “bodys” — we keep it, it's part of the lore 💀)
If no file was provided, the scripts read from standard input, and they write out the detected MIME type to standard out. No cap.
🎀 EXAMPLE 🎀
A short filter rule used by procmail(1) to check for DOS executables in MIME encoded zip archives found in many attachments:
BLANK="[ ]+"
TYPE="${BLANK}multipart/(alternative|mixed)"
:0
* $ ^Content-Type:${TYPE};(${BLANK}|$)*boundary=[\"']?[^ \"';]+
{
BOUNDARY="${MATCH}"
TYPE=""
:0 B
* $ ^Content-Transfer-Encoding:${BLANK}base64
{
TYPE=`mimecheck ${BOUNDARY}`
:0
* TYPE ?? application/x-zip
{
TYPE=`mimezip ${BOUNDARY}`
}
}
:0
* TYPE ?? executable.*DOS
* TYPE ?? DOS.*executable
/dev/null
}
⚠️ heads up, bestie: there is no guarantee that this piece of a procmailrc(5) file will work.
🦋 SEE ALSO 🦋
Go give these a lil read:
👑 COPYRIGHT 👑
Copyright, fr fr:
2007 SuSE LINUX Products GmbH, Nuernberg, Germany,2007 Werner Fink.
💜 AUTHORS 💜
Werner Fink <werner@suse.de>. — that's the author, bestie 🫶
brought to you by the 3rd Berkeley Distribution, dated Juni 28, 2007 — mimecheck(1), signing off 💅✨
📦 where this page comes from
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 · GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 · GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 · GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 · GPL-2.0-only AND MIT
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms