svn commit: r527056 - in head/mail/spamass-milter: . files
Bruce A. Mah
bmah at FreeBSD.org
Tue Feb 25 00:42:14 UTC 2020
Author: bmah
Date: Tue Feb 25 00:42:13 2020
New Revision: 527056
URL: https://svnweb.freebsd.org/changeset/ports/527056
Log:
mail/spamass-milter: Fix a problem where DKIM results would always fail.
Imported a patch submitted to upstream to fix CR/LF handling [1].
Also see [2].
[1] https://savannah.nongnu.org/bugs/index.php?57626
[2] https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7785
Reported by: Keith Clarke
Added:
head/mail/spamass-milter/files/patch-spamass-milter.cpp (contents, props changed)
Modified:
head/mail/spamass-milter/Makefile
Modified: head/mail/spamass-milter/Makefile
==============================================================================
--- head/mail/spamass-milter/Makefile Mon Feb 24 23:46:25 2020 (r527055)
+++ head/mail/spamass-milter/Makefile Tue Feb 25 00:42:13 2020 (r527056)
@@ -3,7 +3,7 @@
PORTNAME= spamass-milter
PORTVERSION= 0.4.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail
MASTER_SITES= SAVANNAH/spamass-milt
Added: head/mail/spamass-milter/files/patch-spamass-milter.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/spamass-milter/files/patch-spamass-milter.cpp Tue Feb 25 00:42:13 2020 (r527056)
@@ -0,0 +1,27 @@
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -1206,7 +1206,23 @@ mlfi_header(SMFICTX* ctx, char* headerf,
+ assassin->set_subject(headerv);
+
+ // assemble header to be written to SpamAssassin
+- string header = string(headerf) + ": " + headerv + "\r\n";
++ string header = headerv;
++
++ // Replace all LF with CRLF
++ // As milter documentation says:
++ // headerv Header field value. The content of the header may
++ // include folded white space, i.e., multiple lines with following
++ // white space where lines are separated by LF (not CR/LF). The
++ // trailing line terminator (CR/LF) is removed.
++ // Need to make sure folded header line breaks are sent to SA as CRLF
++ string::size_type idx = header.size();
++ while ( (idx = header.rfind("\n", idx)) != string::npos )
++ {
++ header.replace(idx,1,"\r\n");
++ }
++
++ // final assembly
++ header = string(headerf) + ": " + header + "\r\n";
+
+ try {
+ // write to SpamAssassin client
More information about the svn-ports-head
mailing list