Skip to content

Commit

Permalink
Update SpamTestSPF.cpp
Browse files Browse the repository at this point in the history
SFP Explanation is almost never returned, and I got somewhat irritated by the 'empty' parentheses in the error message
  • Loading branch information
RvdHout authored and martinknafve committed Apr 17, 2022
1 parent 0798e1e commit 2fbd163
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hmailserver/source/Server/Common/AntiSpam/SpamTestSPF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ namespace HM
if (result == SPF::Fail)
{
// Blocked by SPF.s
sMessage.Format(_T("Blocked by SPF (%s)"), sExplanation.c_str());
if (!sExplanation.IsEmpty())
sMessage.Format(_T("Blocked by SPF. (%s)"), sExplanation.c_str());
else
sMessage = "Blocked by SPF.";
iScore = Configuration::Instance()->GetAntiSpamConfiguration().GetUseSPFScore();

std::shared_ptr<SpamTestResult> pResult = std::shared_ptr<SpamTestResult>(new SpamTestResult(GetName(), SpamTestResult::Fail, iScore, sMessage));
Expand Down

0 comments on commit 2fbd163

Please sign in to comment.