diff options
author | jlam <jlam> | 2007-10-15 15:37:13 +0000 |
---|---|---|
committer | jlam <jlam> | 2007-10-15 15:37:13 +0000 |
commit | add2de7e0a787f63f6b6bd076c8b06402a328706 (patch) | |
tree | 0d3783fe7fae8c3bcd9576f1d2bddf02e417b0cd /mail/courier-mta/patches/patch-an | |
parent | a6705fedcf76b506c79af8505ed66838aca8dd89 (diff) | |
download | pkgsrc-add2de7e0a787f63f6b6bd076c8b06402a328706.tar.gz |
Update mail/courier-mta to 0.57.1. Changes from version 0.56.0 include:
* Major code cleanup.
* "User unknown" reports complete local address, including extensions.
* Only run courierfilters after all control files are closed.
* "opt BOFHHEADERLIMIT" replaces hardcoded limit of 100,000 bytes of
headers per message.
* Reject <@domain.com> for a recipient's address.
* Tolerate newline-less responses from the filter.
* Document that sysexit 100 from .courier is a permanent failure.
* "courier show all" and "courier clear all" commands for managing
backscatter suppression list.
Diffstat (limited to 'mail/courier-mta/patches/patch-an')
-rw-r--r-- | mail/courier-mta/patches/patch-an | 99 |
1 files changed, 32 insertions, 67 deletions
diff --git a/mail/courier-mta/patches/patch-an b/mail/courier-mta/patches/patch-an index 1f5e80228f8..1dab76af2f7 100644 --- a/mail/courier-mta/patches/patch-an +++ b/mail/courier-mta/patches/patch-an @@ -1,6 +1,6 @@ -$NetBSD: patch-an,v 1.2 2007/09/06 04:05:40 jlam Exp $ +$NetBSD: patch-an,v 1.3 2007/10/15 15:37:15 jlam Exp $ ---- courier/webmlmd.C.orig Sat Jun 16 02:21:24 2007 +--- courier/webmlmd.C.orig Thu Jul 5 01:47:38 2007 +++ courier/webmlmd.C @@ -22,6 +22,7 @@ #include <string.h> @@ -10,78 +10,43 @@ $NetBSD: patch-an,v 1.2 2007/09/06 04:05:40 jlam Exp $ #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> -@@ -39,6 +40,12 @@ - #include <iostream> +@@ -40,6 +41,39 @@ #include <fstream> #include <sstream> + #include <map> ++ +#if defined(__FreeBSD_version) && (__FreeBSD_version < 500029) +#include <cwchar> +namespace std { + typedef basic_string <wchar_t> wstring; ++ ++ template<> ++ struct char_traits<wchar_t> ++ { ++ typedef wchar_t char_type; ++ ++ static void assign(wchar_t &c1, const wchar_t &c2) ++ { ++ c1 = c2; ++ } ++ ++ static wchar_t *assign(wchar_t *s, size_t n, wchar_t c) ++ { ++ return wmemset(s, c, n); ++ } ++ ++ static wchar_t *copy(wchar_t *s1, const wchar_t *s2, unsigned n) ++ { ++ return wmemcpy(s1, s2, n); ++ } ++ ++ static wchar_t *move(wchar_t *s1, const wchar_t *s2, unsigned n) ++ { ++ return wmemmove(s1, s2, n); ++ } ++ }; +} +#endif - #include <map> #include "cmlm.h" -@@ -606,7 +613,10 @@ HANDLER("ADMINUPDATE", do_admin_update) - cmdset(args_array, false); - - { -- std::istringstream i(std::string(cgi("optheaderadd")) + "\n"); -+ std::string t(cgi("optheaderadd")); -+ t += "\n"; -+ -+ std::istringstream i(t); - - std::ofstream ofs(HEADERADD ".new"); - -@@ -623,7 +633,10 @@ HANDLER("ADMINUPDATE", do_admin_update) - } - - { -- std::istringstream i(std::string(cgi("optheaderdel")) + "\n"); -+ std::string t(cgi("optheaderdel")); -+ t += "\n"; -+ -+ std::istringstream i(t); - - std::ofstream ofs(HEADERDEL ".new"); - -@@ -953,10 +966,10 @@ static void sendsubunsub(std::string ext - - if (ctlmsg.start(ext, address, "ctlmsg")) - { -- FILE *stdin=ctlmsg.stdin(); -+ FILE *standard_input=ctlmsg.standard_input(); - - ctlmsg.mk_received_header(); -- fprintf(stdin, "\nSubscription request received.\n"); -+ fprintf(standard_input, "\nSubscription request received.\n"); - - if (ctlmsg.wait()) - { -@@ -1100,10 +1113,10 @@ static void listrequest2(std::string lis - if (confirm.start(method + "-" + token, "", - "ctlmsg")) - { -- FILE *stdin=confirm.stdin(); -+ FILE *standard_input=confirm.standard_input(); - - confirm.mk_received_header(); -- fprintf(stdin, -+ fprintf(standard_input, - "Subject: yes -- confirmed by WebMLM\n" - "\n" - "Confirmed\n"); -@@ -1117,9 +1130,9 @@ static void listrequest2(std::string lis - char buf[1024]; - bool isfirst=true; - -- FILE *stdout=confirm.stdout(); -+ FILE *standard_output=confirm.standard_output(); - -- while (fgets(buf, sizeof(buf), stdout)) -+ while (fgets(buf, sizeof(buf), standard_output)) - { - if (isfirst) - { + #include "cmlmcmdmisc.h" |