SAtemprejectonerror extension patch

Christian Stüllenberg <[email protected]> Wed, 04 Oct 2006 10:08:30 +0200
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
Hello,

actually I am having some problems with Spamassassin, that lead to 
irregular segfaults of the spamd daemons.

In that case, the variable gotsa (in sa-exim.c) is FALSE and the message 
was accepted anyway, although I thought, that SAtemprejectonerror should 
also take care of this "error" (outside sa-exim itself).  So I wrote the 
2-line patch attached.  Maybe you find it useful, until Marc releases a 
new version with this patch included.

Regards,
Christian

_______________________________________________
SA-Exim mailing list
[email protected]
http://lists.merlins.org/lists/listinfo/sa-exim
sa-exim-4.2.1.patch (text/plain, 1.2 KB)
diff -ru sa-exim-4.2.1/sa-exim.c sa-exim-4.2.1.patched/sa-exim.c
--- sa-exim-4.2.1/sa-exim.c	Tue Mar  8 21:39:51 2005
+++ sa-exim-4.2.1.patched/sa-exim.c	Wed Sep 27 06:41:59 2006
@@ -1270,8 +1270,15 @@
     if (gotsa == 0)
     {
 	header_add(' ', "X-SA-Exim-Scanned: No (on %s); Unknown failure\n", primary_hostname);
-	log_write(0, LOG_MAIN, "SA: Action: SA didn't successfully run against message, accepting (time: %d/%d secs | Message-Id: %s). %s", scantime, fulltime, safemesgid, mailinfo);
-	return LOCAL_SCAN_ACCEPT;
+        if (SAtemprejectonerror)
+        {
+            log_write(0, LOG_MAIN, "SA: Action: SA didn't successfully run against message, temp_reject (time: %d/%d secs | Message-Id: %s). %s", scantime, fulltime, safemesgid, mailinfo);
+            *return_text=SAmsgerror;
+            return LOCAL_SCAN_TEMPREJECT_NOLOGHDR;
+        } else {
+            log_write(0, LOG_MAIN, "SA: Action: SA didn't successfully run against message, accepting (time: %d/%d secs | Message-Id: %s). %s", scantime, fulltime, safemesgid, mailinfo);
+   	    return LOCAL_SCAN_ACCEPT;
+        }
     }
 
     header_add(' ', "X-SA-Exim-Scanned: Yes (on %s)\n", primary_hostname);