Mail::M...g::MIME(3)
β¨ Mail::M...g::MIME(3) β¨
okay bestie, welcome to the Mail::MIMEDefang::MIME Documentation page π this is the Mail::M...g::MIME(3) manual, and yes the name is doing that thing where it gets squished in the header, we love her anyway π
πΈ NAME πΈ
Mail::MIMEDefang::MIME β MIME objects interface methods for email filters π¦
π DESCRIPTION π
Mail::MIMEDefang::MIME is literally a whole set of methods you can call from mimedefang-filter to operate on MIME objects. that's the vibe. it's giving "let me touch your MIME parts" and honestly? iconic. π
π₯ METHODS π₯
π collect_parts
Method that adds parts to the array @FlatParts for flattening. no cap, that's the whole job. π«
π takeStabAtFilename ( $entity )
Makes a guess at a filename for the attachment. she's guessing, but she's guessing smart β it calls MIME::Head's recommended_filename() method, which tries Content-Disposition.filename and if that's not found, Content-Type.name.
Returns a MIME-decoded filename, or a blank string if none found. so like, '' if she can't find anything. don't come for her. π
π find_part
Method that returns the first MIME entity of type $content_type, "undef" if none exists. first match wins, periodt. β¨
π append_to_part
Method that appends text to $part. simple. clean. slay. π
π remove_redundant_html_parts
Method that rebuilds the email message without redundant HTML parts. that is, if a multipart/alternative entity contains text/plain and text/html parts, the text/html part will be removed. goodbye redundant html, you will not be missed π«Ά
π append_to_html_part
Method that appends text to the spicified mime part, but does so by parsing HTML and adding the text before </body> or </html> tags. yes, "spicified" β that's the original's typo and we are keeping it, it's part of the family now π
π append_text_boilerplate
Method that appends text to text/plain part or parts. plural. she does not discriminate. πΈ
π append_html_boilerplate
Method that appends text to text/html part or parts. It tries to be clever and inserts the text before the </body> tag to be able of being seen. main character energy fr fr β she wants to be seen ππ
π anonymize_uri
Anonymize urls by removing all utm_* parameters, takes the message part as parameter and returns a boolean value if the sub succeeded or not. tracking parameters? not on her watch. π§β¨
lowkey a warning-ish aside for you bestie:append_to_html_partneeds actual HTML to parse, andappend_html_boilerplateonly manages that</body>trick because it's trying to be clever. and remember,takeStabAtFilenamecan hand you a blank string, so check before you use it π
and that's the whole page, bestie!! this was Mail::MIMEDefang::MIME from version 3.7.1, dated 2026-07-20 β go forth and filter those emails, you absolute legend πππ¦
π¦ where this page comes from
- fedora 43: mimedefang 3.7.1-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: mimedefang 3.7.1-1.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms