Skip to content

[Bug]: SPF detail often returned as NONE even if the main domain is PASS #650

Description

@albgus

Description

I have noticed that the vast majority of emails show SPF as NONE in the Authentication & Security details section. After digging deeper this appears to be caused by Stalwart recording two SPF check results, one for the sending domain( smtp.mailfrom), and one for the EHLO hostname( smtp.helo). Very few senders have configured SPF records for the latter.

Steps to Reproduce

  1. Setup Bulwark with a Stalwart backend
  2. Receive an email from a sender with main SPF but no mailserver SPF, for instance from GitHub

Expected Behavior

The SPF Check results for smtp.helo should not take precedence over the SPF Check result for smtp.mailfrom. Especially since the former seems to be very uncommon.

Actual Behavior

Most senders will show a SPF result as NONE due to a missing check for smtp.helo.

Bulwark Version

1.7.6

Stalwart Mail Server Version

0.16.12

Browser

Edge

Operating System

Windows

Screenshots / Screen Recording

Image

Relevant Logs or Error Output

Authentication-Results:  mail.haxalot.com;
	dkim=pass header.d=github.com header.s=pf2023 header.b=VXIUsFhX;
	spf=none (mail.haxalot.com: no SPF records found for [email protected]) smtp.helo=out-23.smtp.github.com;
	spf=pass (mail.haxalot.com: domain of [email protected] designates 192.30.252.206 as permitted sender) [email protected];
	iprev=pass policy.iprev=192.30.252.206;
	dmarc=pass header.from=github.com policy.dmarc=quarantine

Additional Context

I belive it might be caused by the fix to this issue: #377

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions