Brian Sneddon wrote:

This is likely being caused by a bug in spamass-milter 0.2.0 (bug #6970)
that I reported back in December of 2003 which apparently still hasn't even
been acknowledged.  My posting to the SpamAssassin list (including a
workaround) can be found at
http://article.gmane.org/gmane.mail.spam.spamassassin.general/36778/.



Brain,

Here is the patch I submited to for the spamass-milter.

Martin



diff -Naur spamass-milter-0.2.0/spamass-milter.cpp 
spamass-milter-0.2.0-mm/spamass-milter.cpp
--- spamass-milter-0.2.0/spamass-milter.cpp     2003-06-26 10:10:44.000000000 
-0500
+++ spamass-milter-0.2.0-mm/spamass-milter.cpp  2004-05-13 14:56:09.000000000 
-0500
@@ -691,10 +691,10 @@
                /* If the user did not enable the {b} macro in sendmail.cf
                   just make it blank. Without this date SA can't do
                   future/past validation on the Date: header */
-               macro_b = smfi_getsymval(ctx, "b");
+               /*              macro_b = smfi_getsymval(ctx, "b");
                if (!macro_b)
                        macro_b = "";
-                       
+               */      
                /* Sendmail currently cannot pass us the {s} macro, but
                   I do not know why.  Leave this in for the day sendmail is
                   fixed.  Until that day, use the value remembered by
@@ -708,8 +708,11 @@
 
                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+" 
("+smfi_getsymval(ctx,"_")+") by "+smfi_getsymval(ctx,"j")+";\r\n");
+               } else {
+                 assassin->output((string)"Received: from "+macro_s+" 
("+smfi_getsymval(ctx,"_")+") by "+smfi_getsymval(ctx,"j")+"; "+macro_b+"\r\n");
+               }
        } else
        {
                assassin->set_numrcpt();

Reply via email to