Mail::M...g::BIMI(3)

πŸ“¦
version 3.7.1 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

Mail::MIMEDefang::BIMI β€” Brand Indicators for Message Identification support for MIMEDefang. Bestie, this is the Mail::M...g::BIMI(3) page, and we're gonna read it together like it's a group chat, okay? 🫢


✨ DESCRIPTION ✨

So Mail::MIMEDefang::BIMI gives you methods to look up and verify BIMI DNS records straight from mimedefang-filter. BIMI (that's Brand Indicators for Message Identification, iykyk) is the whole thing where domain owners publish a verified logo that mail clients can display right next to authenticated messages. Main character logo energy, honestly. πŸ’…

A BIMI record only counts as valid when the sending domain passes DMARC at enforcement level β€” that means p=quarantine or p=reject. No DMARC glow-up, no logo. Periodt.

When the Mail::BIMI Perl module (version 3.x or later) is installed, md_bimi_lookup and md_bimi_verify use it for richer validation, including SVG logo integrity and Verified Mark Certificate (VMC) chain verification. Chef's kiss. πŸŽ€ Without Mail::BIMI the checks are limited to DNS record existence and a non-empty l= tag. Still valid, just less extra.


🌸 METHODS 🌸

πŸ¦‹ md_init

Detect and load Mail::BIMI if it's installed, setting $Features{"Mail::BIMI"}. It gets called automatically by detect_and_load_perl_modules in Mail::MIMEDefang. Not me having to do literally nothing, it just happens. 😌

🧚 md_bimi_get_selector($entity)

Extract the BIMI selector from the BIMI-Selector header of a MIME::Entity object. The header format is, exactly:

BIMI-Selector: v=BIMI1; s=brand1;

Returns the selector string (e.g. brand1) on success, or default when the header is absent, malformed, or $entity is undefined. It always gives you something, so cute of it. πŸ“

Typical usage in filter_begin($entity):

my $selector = md_bimi_get_selector($entity);
my $result   = md_bimi_verify($domain, $dmarc_result, $policy, $selector);

⭐ md_bimi_lookup($domain [, $selector])

Look up the BIMI DNS TXT record for $domain. πŸ”

The optional $selector argument says which BIMI selector to query (e.g. brand1 β†’ brand1._bimi.$domain). When it's omitted or undef, default is used. Use md_bimi_get_selector to derive the selector from the message's BIMI-Selector header. Chain them together, it's giving teamwork. 🀝

Returns a hashref with the following keys on success:

  • version β€” always BIMI1.
  • l β€” the URL of the SVG logo (the l= tag).
  • a β€” the URL of the Verified Mark Certificate (the a= tag), if present.
  • raw β€” the raw TXT record string.

Returns undef if no BIMI record is found or if Net::DNS is not available. πŸ’€ Sad, but honest.

πŸ‘‘ md_bimi_verify($domain, $dmarc_result, $dmarc_policy [, $selector])

Verify that a domain's BIMI record is valid given the DMARC result. Vibe check, but for logos. βœ…

BIMI is only considered to pass when all of this is true:

  • A BIMI DNS record exists for $domain.
  • $dmarc_result is pass.
  • $dmarc_policy is quarantine or reject (enforcement level).
  • The BIMI record contains a non-empty l= (logo URL) tag.

Returns pass on success, fail otherwise. No in-between, no "it's complicated". 😀

The method accepts the following parameters:

  • $domain β€” the sender's domain (From: header domain).
  • $dmarc_result β€” the DMARC result string, e.g. pass or fail.
  • $dmarc_policy β€” the DMARC policy in effect: none, quarantine, or reject.
  • $selector β€” optional BIMI selector string. Defaults to default. Pass the value returned by md_bimi_get_selector($entity) to honour the message's BIMI-Selector header.
Heads up bestie: if the DMARC policy is none, BIMI does not pass. Enforcement level only, fr fr. 🚨

And that's the whole page, you ate it. πŸ’– This was Mail::M...g::BIMI(3) from MIMEDefang version 3.7.1, dated 2026-07-20 β€” the Mail::MIMEDefang::BIMI Documentation source, no cap. Go verify some logos, you absolute icon. 🌈✨

πŸ“¦ where this page comes from