diff options
author | Bruce A. Mah <bmah@FreeBSD.org> | 2020-02-25 00:42:13 +0000 |
---|---|---|
committer | Bruce A. Mah <bmah@FreeBSD.org> | 2020-02-25 00:42:13 +0000 |
commit | 01200a4bdfe4f9d9b708d9cb9f591c55bc91d0a5 (patch) | |
tree | 94bbd5d6839fe8856fcf9610d99b95fa305a0c92 /mail | |
parent | 8d176ae708307f66834133a71791b846297725cb (diff) | |
download | ports-01200a4bdfe4f9d9b708d9cb9f591c55bc91d0a5.tar.gz ports-01200a4bdfe4f9d9b708d9cb9f591c55bc91d0a5.zip |
Notes
Diffstat (limited to 'mail')
-rw-r--r-- | mail/spamass-milter/Makefile | 2 | ||||
-rw-r--r-- | mail/spamass-milter/files/patch-spamass-milter.cpp | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile index 0dc96fd00457..6cff61bf65c9 100644 --- a/mail/spamass-milter/Makefile +++ b/mail/spamass-milter/Makefile @@ -3,7 +3,7 @@ PORTNAME= spamass-milter PORTVERSION= 0.4.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= SAVANNAH/spamass-milt diff --git a/mail/spamass-milter/files/patch-spamass-milter.cpp b/mail/spamass-milter/files/patch-spamass-milter.cpp new file mode 100644 index 000000000000..cc0a0e902c3f --- /dev/null +++ b/mail/spamass-milter/files/patch-spamass-milter.cpp @@ -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 |