bimi: show declination hint only when DMARC is enforced

Only display the "Explicitly decline BIMI participation" hint when DMARC
policy is quarantine or reject, as BIMI requires strong DMARC enforcement
to be meaningful.
This commit is contained in:
nemunaire 2026-06-13 16:18:38 +09:00
commit 2483d49fe9
2 changed files with 9 additions and 4 deletions

View file

@ -1,11 +1,16 @@
<script lang="ts">
import type { BimiRecord } from "$lib/api/types.gen";
import type { BimiRecord, DmarcRecord } from "$lib/api/types.gen";
interface Props {
bimiRecord?: BimiRecord;
dmarcRecord?: DmarcRecord;
}
let { bimiRecord }: Props = $props();
let { bimiRecord, dmarcRecord }: Props = $props();
const dmarcEnforced = $derived(
dmarcRecord?.policy === "quarantine" || dmarcRecord?.policy === "reject",
);
</script>
{#if bimiRecord}
@ -72,7 +77,7 @@
{bimiRecord.error}
</div>
{/if}
{#if !bimiRecord.valid}
{#if !bimiRecord.valid && dmarcEnforced}
<div class="alert alert-info mt-3 mb-0">
<h6 class="alert-heading">
<i class="bi bi-lightbulb me-1"></i>

View file

@ -182,7 +182,7 @@
/>
<!-- BIMI Record -->
<BimiRecordDisplay bimiRecord={dnsResults.bimi_record} />
<BimiRecordDisplay bimiRecord={dnsResults.bimi_record} dmarcRecord={dnsResults.dmarc_record} />
{/if}
</div>
</div>