Mail::...::Utils(3)

πŸ’– NAME πŸ’–

Mail::MIMEDefang::Utils β€” bestie, these are the support methods that do the behind-the-scenes heavy lifting. They get called internally, and your email filters can call them too. 🫢


✨ DESCRIPTION ✨

Mail::MIMEDefang::Utils is literally a whole little squad of methods. You can call them from mimedefang-filter, or they can be called by other methods. Either way, they're here, they're iconic, and they're doing the work. πŸ’…


πŸŽ€ METHODS πŸŽ€

  • time_str β€” returns a string that represents the current time. That's it, that's the whole vibe. ⏰
  • hour_str β€” returns a string representing the current hour. Just the hour, main character energy only. πŸ•
  • synthesize_received_header β€” synthesizes a valid Received: header to reflect re-mailing. This one is needed by Apache SpamAssassin so it can correctly parse email messages. No cap, SpamAssassin needs it. πŸ“¨
  • copy_or_link β€” copies a file if it fails to create a hard link to the original file. Plan A flops, plan B slays. πŸ”—
  • read_results β€” extracts an array of command, key, values from the RESULTS file. Needed for regression tests. πŸ§ͺ
  • re_match β€” returns 1 if either Content-Disposition.filename or Content-Type.name matches the regexp; returns 0 otherwise. πŸ”
  • re_match_ext β€” returns 1 if the EXTENSION part of either Content-Disposition.filename or Content-Type.name matches the regexp; returns 0 otherwise. Only the extension part, bestie. 🌸
  • re_match_in_rar_directory β€” returns 1 if the EXTENSION part of any file in the rar archive matches the regexp. To enable the check, $Features{'unrar'} should be enabled. πŸ—œοΈ
  • re_match_in_7zip_directory β€” returns 1 if the EXTENSION part of any file in the 7zip archive matches the regexp. To enable the check, $Features{'7zip'} should be enabled. πŸ—œοΈ
  • re_match_in_tgz_directory β€” returns 1 if the EXTENSION part of any file in the tgz archive matches the regexp. Files with extensions .tar.gz, .tar.bz2 and .tbz are also checked. To enable the check, $Features{'tar'} should be enabled. πŸ—œοΈ
  • re_match_in_zip_directory β€” returns 1 if the EXTENSION part of any file in the zip archive matches the regexp. πŸ—œοΈ
  • md_copy_orig_msg_to_work_dir_as_mbox_file β€” copies the original INPUTMSG file into the work directory for virus-scanning, as a valid mbox file. 🦠
  • gen_mx_id β€” generates a random identifier that MIMEDefang uses to create temporary files. 🎲

okay that's the whole page, you ate that πŸ’– This lovely little doc is from Mail::MIMEDefang::Utils documentation, version 3.7.1, dated 2026-07-20. Periodt. βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from