Skip to content

Commit

Permalink
Fix issue where HELO was not being provided to libspf2, resulting in t…
Browse files Browse the repository at this point in the history
  • Loading branch information
devicenull committed Aug 2, 2024
1 parent 9cebf72 commit 12d5f29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libopendmarc/opendmarc_spf.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ opendmarc_spf2_test(char *ip_address, char *mail_from_domain, char *helo_domain,
return DMARC_POLICY_SPF_OUTCOME_TMPFAIL;
}

ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom);
if (ret != 0 || *used_mfrom == FALSE)
if (helo_domain != NULL)
{
(void) strlcpy(helo, helo_domain, sizeof helo);
SPF_request_set_helo_dom(ctx->spf_request, helo);
}
else

ret = opendmarc_spf2_find_mailfrom_domain(ctx, mail_from_domain, mfrom, sizeof mfrom, used_mfrom);
if (ret == 0 && *used_mfrom != FALSE)
{
SPF_request_set_env_from(ctx->spf_request, mfrom);
}
Expand Down

0 comments on commit 12d5f29

Please sign in to comment.