Date: Tue, 25 Mar 2003 14:11:47 -0600 (CST) From: "Douglas K. Rand" <rand@meridian-enviro.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Pieter Danhieux <opr@bsdaemon.be> Subject: ports/50296: Patches for MessageWall Message-ID: <200303252011.h2PKBlae030157@delta.meridian-enviro.com>
next in thread | raw e-mail | index | archive | help
>Number: 50296 >Category: ports >Synopsis: Patches for MessageWall >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 25 12:20:08 PST 2003 >Closed-Date: >Last-Modified: >Originator: Douglas K. Rand >Release: FreeBSD 4.6.2-RELEASE-p10 i386 >Organization: Meridian Environmental Technology, Inc. >Environment: System: FreeBSD delta.meridian-enviro.com 4.6.2-RELEASE-p10 FreeBSD 4.6.2-RELEASE-p10 #10: Mon Mar 10 17:23:24 CST 2003 rand@delta.meridian-enviro.com:/usr/obj/usr/src/sys/DELTA i386 >Description: There is a problem with the interaction between MessageWall and Microsoft Exchange server. The MS Exchange server gets upset that MessageWall sends the "250 2.0.0 h1Q0Qc907062 Message accepted for delivery" and the "\r\n" in different packets. The first patch works around this MS problem. See http://messagewall.org/cgi-bin/ezmlm-browse.cgi?command=showthread&list=messagewall-discuss&month=200302&threadid=nnoiaogojliciagmgpbk The other patch changes how MessageWall behaves when there are multiple recipients to a message. MessageWall accepts the first recipient, but defers the second with a temporary SMTP error. This can take some time for all recipients to get the message when the sending side has a long queue time. MessageWall does this since different recipients of a message can have different profiles. We, along with a number of sites, use a single profile for all inbound email. This patch, which must be enabled when the port is built with -DMESSAGEWALL_ALLOW_MULT_RCPT, allows multiple recipients, using the profile of the first recipient. See: http://www.messagewall.org/cgi-bin/ezmlm-browse.cgi?command=showthread&list=messagewall-discuss&month=200303&threadid=lcjcimckfmdphlhpjjhn >How-To-Repeat: For the first case, messages from MS Exchange servers are sent every time Exchange runs the queue, even though each is delivered. This results in many duplicate messages showing up in the user's inbox. For the second case, from an outside box, send a single message to multiple recipients via MessageWall. The first will be delivered right away, the second the next time the outside box runs the queue, the third the following queue run, and so on. >Fix: Patches are supplied to adress both problems. # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # Makefile.patch # patch-exchange-server # allow-multiple-recipients.patch # echo x - Makefile.patch sed 's/^X//' >Makefile.patch << 'END-of-Makefile.patch' X--- Makefile-orig Tue Mar 25 13:59:21 2003 X+++ Makefile Mon Mar 24 11:33:33 2003 X@@ -25,6 +25,21 @@ X GNU_CONFIGURE= yes X USE_REINPLACE= yes X X+pre-fetch: X+ @${ECHO} "" X+ @${ECHO} "You may use the following build options:" X+ @${ECHO} "" X+ @${ECHO} " -DMESSAGEWALL_ALLOW_MULT_RCPT to allow multiple recipients" X+ @${ECHO} " The profile for the first recipient will be applied to all" X+ @${ECHO} " recipients of the message." X+ @${ECHO} "" X+ X+# Patch from "Quentin Guernsey" <quentin@wingateweb.com> X+# for details see http://www.messagewall.org/cgi-bin/ezmlm-browse.cgi?command=showmsg&list=messagewall-discuss&month=200303&msgnum=921&threadid=lcjcimckfmdphlhpjjhn X+.if defined(MESSAGEWALL_ALLOW_MULT_RCPT) X+EXTRA_PATCHES+= ${PATCHDIR}/allow-multiple-recipients.patch X+.endif X+ X post-patch: X ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ X ${WRKSRC}/firemake.cflags \ END-of-Makefile.patch echo x - patch-exchange-server sed 's/^X//' >patch-exchange-server << 'END-of-patch-exchange-server' X--- client.c-orig Sat Sep 28 12:21:02 2002 X+++ client.c Tue Mar 25 13:57:37 2003 X@@ -384,8 +384,15 @@ X line = client_get_line(n); X if (line == NULL) X return 0; X- tls_client_write(backends[n].client,line->s,line->l); X- tls_client_write(backends[n].client,"\r\n",2); X+ /* X+ * Patch from Russell Vincent <rv2@sanger.ac.uk> X+ * Applied by Douglas K. Rand <rand@meridian-enviro.com> X+ * Works around problem with MS Exchange servers not liking X+ * the \r\n showing up in a seperate packet. X+ * See http://messagewall.org/cgi-bin/ezmlm-browse.cgi?command=showthread&list=messagewall-discuss&month=200302&threadid=nnoiaogojliciagmgpbk X+ */ X+ firestring_estr_sprintf(&outline,"%e\r\n", line); X+ tls_client_write(backends[n].client,outline.s,outline.l); X firestring_estr_0(line); X fprintf(stderr,"{%d} [%d] BACKEND/ACCEPT: accepted message responsibility: '%s'\n",process,n,line->s); X if (line->l >= 4 && line->s[3] != '-') { END-of-patch-exchange-server echo x - allow-multiple-recipients.patch sed 's/^X//' >allow-multiple-recipients.patch << 'END-of-allow-multiple-recipients.patch' X--- smtp.c-orig Fri Oct 18 10:24:16 2002 X+++ smtp.c Tue Mar 25 13:57:37 2003 X@@ -629,20 +629,17 @@ X X /* X * check that we have recipient space X+ * Patch from Quentin Guernsey <quentin@wingateweb.com> X+ * Applied by Douglas K. Rand <rand@meridian-enviro.com> X+ * Which allows multiple recipients, but applies the profile of X+ * the first recipient to all recipients. X+ * See http://www.messagewall.org/cgi-bin/ezmlm-browse.cgi?command=showthread&list=messagewall-discuss&month=200303&threadid=lcjcimckfmdphlhpjjhn X */ X- if (clients[client].can_relay == 1) { X- if (clients[client].num_to == max_rcpt) { X- fprintf(stderr,"{%d} (%d) SMTP/REJECT: too many RCPT\n",process,client); X- SMTP_RESET X- tls_client_write(client,SMTP_MAXRCPT,sizeof(SMTP_MAXRCPT) - 1); X- return 0; X- } X- } else { X- if (clients[client].num_to == 1) { X- fprintf(stderr,"{%d} (%d) SMTP/TEMPORARY: external host attempted multiple recipient delivery, asked for one at a time\n",process,client); X- tls_client_write(client,SMTP_ONLYONE,sizeof(SMTP_ONLYONE) - 1); X- return 0; X- } X+ if (clients[client].num_to == max_rcpt) { X+ fprintf(stderr,"{%d} (%d) SMTP/REJECT: too many RCPT\n",process,client); X+ SMTP_RESET X+ tls_client_write(client,SMTP_MAXRCPT,sizeof(SMTP_MAXRCPT) - 1); X+ return 0; X } X X /* END-of-allow-multiple-recipients.patch exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303252011.h2PKBlae030157>