Skip to content

Enhance SPF Checking to deal with CVE-2019-20790 #158

@thegushi

Description

@thegushi

SPF has many optional fields in the headers it adds that are usually there but not required by the spec.

See issue #49 for more discussion.

If we are relying on previously-received headers for SPF and not doing our own lookups.

If checking received-spf:

  • Check for pass
  • Add a check for identifier=mailfrom (unless sender is <>)
  • Add a check for mailfrom= AND confirm it matches the domain
  • Else ignore the header (and log the result)

If we are checking Authentication-results:

  • Check for pass
  • Check for mailfrom=
  • Confirm it matches the domain
  • Else ignore the header (and log the result)

Some SPF's will note both the helo and the mailfrom but the pass will be based on the HELO, so we need to evaluate this separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions