From 4db9bf539b746d4fb34c04aefb6b83f59955408e Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Feb 22 2020 07:58:20 +0000 Subject: Only replace newlines with spaces when spf exists. --- diff --git a/pyspf-2.0.14-newlines.patch b/pyspf-2.0.14-newlines.patch index 135572b..924838b 100644 --- a/pyspf-2.0.14-newlines.patch +++ b/pyspf-2.0.14-newlines.patch @@ -6,7 +6,7 @@ diff -ruN pyspf-2.0.14-v/spf.py pyspf-2.0.14/spf.py spf = self.dns_spf(self.d) if self.verbose: self.log("top",self.d,spf) + # some records contain LF, be relaxed and replace with space -+ spf = spf.replace('\n', ' ') ++ if spf: spf = spf.replace('\n', ' ') if self.libspf_local and spf: spf = insert_libspf_local_policy( spf, self.libspf_local)