avatar

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package avatar discovers ordinary sender avatars without asserting brand trust.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FaviconSites

func FaviconSites(domain string) []string

FaviconSites lists the sender domain followed by its distinct organizational domain. Each FindFavicon call has a five-second budget, so two sites take at most ten seconds.

func FindBIMI added in v1.20.0

func FindBIMI(ctx context.Context, lookup LookupTXT, cache *imagecache.Cache, domain string, canFetch func() bool) (img imagecache.Image, found bool)

FindBIMI returns the logo the sender domain publishes at default._bimi, shown like a favicon and never as verification: it reads DNS, not this message's authentication. The domain's DMARC must enforce (quarantine or reject, pct=100, no p=none or sp=none) so its spoofs are normally rejected before delivery. See docs/research/bimi-clients.md (option B).

func FindFavicon

func FindFavicon(ctx context.Context, client *http.Client, cache *imagecache.Cache, host string, canFetch func() bool) (imagecache.Image, bool)

FindFavicon checks message policy before cached sources and every discovery or candidate request. canFetch is nil only for callers without a message policy.

func GravatarURL

func GravatarURL(email string) string

GravatarURL hashes the complete normalized address, retaining dots and tags.

func PersonalDomain

func PersonalDomain(domain string, providerDomains []string) bool

PersonalDomain excludes exact public mailbox domains supplied by core and the additional public providers absent from its account-discovery list.

Types

type LookupTXT added in v1.20.0

type LookupTXT func(ctx context.Context, name string) ([]string, error)

LookupTXT is (*net.Resolver).LookupTXT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL