Re: [Exim] transport_filter/temp_errors problems

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Paul Fisher
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] transport_filter/temp_errors problems
--
On Tue, Aug 27, 2002 at 09:48:47AM +0100, Philip Hazel wrote:
>
> Wishlisted.


I went ahead and added support for "temp_errors = *" and updated
spec.txt. A small patch against 4.10 is attached. Please let me know
if I need to make any changes to it.

(Many thanks for all the Exim hacking over the years.)
--
diff -u -r exim-4.10-old/doc/spec.txt exim-4.10/doc/spec.txt
--- exim-4.10-old/doc/spec.txt    Tue Aug 27 08:48:58 2002
+++ exim-4.10/doc/spec.txt    Tue Aug 27 08:41:10 2002
@@ -12551,10 +12551,12 @@


 temp_errors                   Type: string list            Default: see below


-    This option contains a colon-separated list of numbers. If "ignore_status"
-    is false and the command exits with a return code that matches one of the
-    numbers, the failure is treated as temporary and the delivery is deferred.
-    Other non-zero return codes are treated as permanent errors. The default
+    This option contains a colon-separated list of numbers, and optionally,
+    an asterisk. If "ignore_status" is false and the command exits with a
+    return code that matches one of the numbers, the failure is treated as
+    temporary and the delivery is deferred. Other non-zero return codes are
+    treated as permanent errors. If this option contains an asterisk, then
+    all non-zero return codes are treated as temporary errors. The default
     setting contains the codes defined by EX_TEMPFAIL and EX_CANTCREAT in
     sysexits.h. If Exim is compiled on a system that does not define these
     macros, it assumes values of 75 and 73, respectively.
diff -u -r exim-4.10-old/src/transports/pipe.c exim-4.10/src/transports/pipe.c
--- exim-4.10-old/src/transports/pipe.c    Tue Aug 27 08:48:57 2002
+++ exim-4.10/src/transports/pipe.c    Tue Aug 27 10:32:16 2002
@@ -139,11 +139,11 @@


 if (ob->temp_errors != NULL)
   {
-  size_t p = Ustrspn(ob->temp_errors, "0123456789: ");
+  size_t p = Ustrspn(ob->temp_errors, "*0123456789: ");
   if (ob->temp_errors[p] != 0)
     log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
-      "temp_errors option must be a list of numbers in the %s transport",
-        tblock->name);
+      "temp_errors option must be a list of numbers or an asterisk "
+        "in the %s transport", tblock->name);
   }


/* Only one of return_output/return_fail_output or log_output/log_fail_output
@@ -912,7 +912,11 @@

       while ((p = string_nextinlist(&s, &sep, buffer, sizeof(buffer))) != NULL)
         {
-        if (rc == Uatoi(p)) { addr->transport_return = DEFER; break; }
+        if (*p == '*' || rc == Uatoi(p))
+          {
+          addr->transport_return = DEFER;
+          break;
+          }
         }


       /* Ensure the message contains the expanded command and arguments. This
--