Expand description
Whether a mail’s sender was proven: the sender check get_thread shows for each message, a short
line per thread in search_threads, and the option to read a message’s raw header lines.
What it guarantees:
- The verdicts (SPF, DKIM, DMARC) are read only from the topmost
Authentication-Resultsheader whose authserv-id is Google’s own (mx.google.com). Google adds it above everything the sender wrote, so a forged one lower in the mail is never read. The same goes forARC-Authentication-Results, which says what an earlier hop saw (mail forwarded or delivered through an alias). A mail with none gets no verdict, and nothing is made up. - A header that can’t be read with certainty is not read at all (
verdict_unreadable): one with a quote or a backslash in it (a sender-chosen address can carry;,(and=inside quotes, and so forge a result inside Google’s own header), an unbalanced comment, a result named twice, or one cut for length. - Everything returned is a plain value: a verdict is letters only, a domain is letters, digits, dots and hyphens, an address has an ordinary local part. Header text is never copied through as a sentence, and the raw headers come in their own field, one line per header, with control characters (so a line break inside a value) turned into spaces.
- A pass says the DOMAIN is proven, not that the sender is who you hoped: a lookalike domain passes.
Constants§
- RAW_
HEADER_ CHARS - A message’s raw header lines, and the raw header lines of a whole thread, are cut to these.
- RAW_
THREAD_ CHARS
Functions§
- raw_
headers - A message’s header lines as the mail carries them,
Name: valueone to a line, cut tobudget(which is lowered by what is shown). The text is the sender’s and the servers’ on the way: it comes in a field of its own, with a note, and a value can’t start a line of its own. - search_
check - What
search_threadsshows of a thread’s latest message: the DMARC verdict and the flags. - sender_
check - The sender check of one message (
payloadas Google’sformat=fullorformat=metadatagives it;labelsits label ids). A mail the person wrote (SENT,DRAFT) has no verdict to read.