ports/70021: [PATCH] mail/spamass-milter: Reliability - reduce some segfaults
Chris Knight
chris at e-easy.com.au
Thu Aug 5 08:20:11 UTC 2004
>Number: 70021
>Category: ports
>Synopsis: [PATCH] mail/spamass-milter: Reliability - reduce some segfaults
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 05 08:20:01 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Chris Knight
>Release: FreeBSD 4.10-RELEASE i386
>Organization:
E-Easy
>Environment:
System: FreeBSD ait0fd01.aims.private 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Mon May 31 22:37:58 EST 2004 root at ait0fd01.aims.private:/var/obj/usr/src/sys/THINKPAD i386
>Description:
I'm actually running the CVS version of spamass-milter, but I've noticed
a significant reduction in the number of segfaults of spamass-milter since
I upgraded from rev 1.78 to rev 1.79 of spamass-milter.cpp.
The enclosed update to patch-spamass-milter.cpp is based on the diff
between rev 1.78 and 1.79 of spamass-milter.cpp.
It has been lightly tested in a production environment.
>How-To-Repeat:
N/A
>Fix:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/spamass-milter/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile 10 Jun 2004 10:51:04 -0000 1.15
+++ Makefile 5 Aug 2004 07:41:45 -0000
@@ -7,7 +7,7 @@
PORTNAME= spamass-milter
PORTVERSION= 0.2.0
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SAVANNAH}
MASTER_SITE_SUBDIR= spamass-milt
Index: files/patch-spamass-milter.cpp
===================================================================
RCS file: /home/ncvs/ports/mail/spamass-milter/files/patch-spamass-milter.cpp,v
retrieving revision 1.5
diff -u -r1.5 patch-spamass-milter.cpp
--- files/patch-spamass-milter.cpp 10 Jun 2004 10:51:05 -0000 1.5
+++ files/patch-spamass-milter.cpp 5 Aug 2004 07:39:06 -0000
@@ -1,5 +1,5 @@
---- spamass-milter.cpp.orig Thu Jun 26 16:10:44 2003
-+++ spamass-milter.cpp Thu Jun 10 11:46:12 2004
+--- spamass-milter.cpp.orig Fri Jun 27 01:10:44 2003
++++ spamass-milter.cpp Thu Aug 5 17:36:11 2004
@@ -102,6 +102,10 @@
#include <csignal>
#include <string>
@@ -29,7 +29,41 @@
update_or_insert(assassin, ctx, assassin->spam_flag(), &SpamAssassin::set_spam_flag, "X-Spam-Flag");
update_or_insert(assassin, ctx, assassin->spam_status(), &SpamAssassin::set_spam_status, "X-Spam-Status");
-@@ -1341,7 +1349,11 @@
+@@ -686,7 +694,7 @@
+ (envelope-from $g)$.
+
+ */
+- const char *macro_b, *macro_s;
++ const char *macro_b, *macro_s, *macro_j, *macro__;
+
+ /* If the user did not enable the {b} macro in sendmail.cf
+ just make it blank. Without this date SA can't do
+@@ -706,9 +714,23 @@
+ if (!macro_s)
+ macro_s = "nohelo";
+
++ /* FQDN of this site */
++ macro_j = smfi_getsymval(ctx, "j");
++ if (!macro_j)
++ macro_j = "localhost";
++
++ /* Sending site's address */
++ macro__ = smfi_getsymval(ctx, "_");
++ if (!macro__)
++ macro__ = "unknown";
++
+ assassin->output((string)"X-Envelope-From: "+assassin->from()+"\r\n");
+ assassin->output((string)"X-Envelope-To: "+assassin->rcpt()+"\r\n");
+- assassin->output((string)"Received: from "+macro_s+" ("+smfi_getsymval(ctx,"_")+") by "+smfi_getsymval(ctx,"j")+"; "+macro_b+"\r\n");
++
++ if (!macro_b)
++ assassin->output((string)"Received: from "+macro_s+" ("+macro__+") by "+macro_j+";\r\n");
++ else
++ assassin->output((string)"Received: from "+macro_s+" ("+macro__+") by "+macro_j+"; "+macro_b+"\r\n");
+
+ } else
+ {
+@@ -1341,7 +1363,11 @@
{
// assuming we have a recipient in the form: <username at somehost.somedomain>
// we return 'username'
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list