[exim-dev] Warn when list processing stops

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ian Wienand
Date:  
À: exim-dev
Sujet: [exim-dev] Warn when list processing stops
Hi,

We managed to get an unresolvable host in relay_from_hosts which
rather unexpectedly stopped processing anything after the bogus entry
in the list.

Of course one can read the documentation to find out about the
+ignore_unknown parameter, but who reads that :) I feel it would be
nice if exim warned you that it was ignoring the rest of the list in
the log file, which is the first place you look when you suddenly stop
relaying mail.

I'm not really sure what the exact message should be, a proposed patch
is attached.

-i
ianw@???
http://www.gelato.unsw.edu.au
diff -ur exim4-4.52/src/match.c ./exim4-4.52-new/src/match.c
--- exim4-4.52/src/match.c    2005-07-01 21:09:15.000000000 +1000
+++ ./exim4-4.52-new/src/match.c    2005-09-02 14:41:27.000000000 +1000
@@ -712,7 +712,11 @@
           {
           HDEBUG(D_lists) debug_printf("%s %s (%s)\n", ot,
             include_unknown? "yes":"no", error);
-          if (!include_unknown) return FAIL;
+          if (!include_unknown)
+        {
+          log_write(0, LOG_MAIN, "%s: list processing stopped", error);
+          return FAIL;
+        }
           log_write(0, LOG_MAIN, "%s: accepted by +include_unknown", error);
           return OK;
           }
@@ -803,7 +807,11 @@
           HDEBUG(D_lists) debug_printf("%s %s (%s)\n", ot,
             include_unknown? "yes":"no", error);
           (void)fclose(f);
-          if (!include_unknown) return FAIL;
+          if (!include_unknown) 
+        {
+          log_write(0, LOG_MAIN, "%s: list processing stopped", error);
+          return FAIL;
+        }
           log_write(0, LOG_MAIN, "%s: accepted by +include_unknown", error);
           return OK;
           }