From 343d986e62b47edae2dc7c3fa962a9a6c98139e0 Mon Sep 17 00:00:00 2001 From: Eygene Ryabinkin Date: Sun, 30 Dec 2012 22:39:56 +0400 Subject: [PATCH] mail/exim: fix parsing of mail headers for Spamooborona 1024 When headers are CRLF-terminated, original SO1024 code will result in a broken message content. Signed-off-by: Eygene Ryabinkin --- mail/exim/Makefile | 1 + mail/exim/files/extra-patch-so_1024-delimiter | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 mail/exim/files/extra-patch-so_1024-delimiter diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 174d0a9..4ad8b4d 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -526,6 +526,7 @@ post-extract: .endif .if defined(WITH_SO_1024) @cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/spamooborona1024-src-${SO_1024_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS} + @cd ${WRKDIR} && ${PATCH} --quiet < ${FILESDIR}/extra-patch-so_1024-delimiter .endif do-configure: diff --git a/mail/exim/files/extra-patch-so_1024-delimiter b/mail/exim/files/extra-patch-so_1024-delimiter new file mode 100644 index 0000000..382d3e7 --- /dev/null +++ b/mail/exim/files/extra-patch-so_1024-delimiter @@ -0,0 +1,13 @@ +Taken from: http://timofeev.biz/2010/10/14/151 + +--- local_scan_1024.c 2009-11-27 14:02:06.000000000 +0300 ++++ local_scan_1024.c 2012-12-30 22:18:53.491544089 +0400 +@@ -443,7 +443,7 @@ + if (strncmp (answ, "SODAEMON ", 9) == 0) + { + strP = (char*) answ; +- for (tok = strtok (strP, "\n"); tok; tok = strtok (NULL, "\n")) ++ for (tok = strtok (strP, "\r\n"); tok; tok = strtok (NULL, "\r\n")) + { + /* signature always goes first */ + if (strncmp (tok, "SODAEMON ", 9) == 0) -- 1.8.0.2