Mail::M...g::BIMI(3)
π 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β alwaysBIMI1.lβ the URL of the SVG logo (thel=tag).aβ the URL of the Verified Mark Certificate (thea=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_resultispass.$dmarc_policyisquarantineorreject(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.passorfail.$dmarc_policyβ the DMARC policy in effect:none,quarantine, orreject.$selectorβ optional BIMI selector string. Defaults todefault. Pass the value returned bymd_bimi_get_selector($entity)to honour the message'sBIMI-Selectorheader.
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
- 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