From 153b9229315e87ffcdbc12a6d26ef78d4ed33d16 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sat, 24 Nov 2012 21:21:37 -0800 Subject: don't print blank lines in log if no valid SPF result --- tools/sepofra.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/sepofra.c') diff --git a/tools/sepofra.c b/tools/sepofra.c index 25b73b7..0a731b9 100644 --- a/tools/sepofra.c +++ b/tools/sepofra.c @@ -123,13 +123,15 @@ void sepofra::check( return; } +// return "" if result is invalid +// otherwise build a string explaining how SPF reached its conclusion string sepofra::explain() const { if (result == SPF_RESULT_INVALID) return ""; -// now build a string stringstream build; string summary = SPF_strresult(result); if (result != SPF_RESULT_PASS - && result != SPF_RESULT_FAIL) summary = "neutral"; + && result != SPF_RESULT_FAIL + && result != SPF_RESULT_INVALID) summary = "neutral"; char hostname[1+HOST_NAME_MAX]; gethostname(hostname, 1+HOST_NAME_MAX); -- cgit v1.2.3