[Exim] [Patch] exim4 readfile does not respect skipping flag

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: exim-users
Assumpte: [Exim] [Patch] exim4 readfile does not respect skipping flag
Hi,

in exim 4.10 the readfile operator does not respect the skipping flag in
expand_string_internal, it still tries to open the file, thats bad if
you want to use a expansion-string like this

deny_router:
driver = redirect
senders = ${if exists \
{/etc/exim/denies/$domain/$local_part}{${readfile \
{/etc/exim/denies/$domain/$local_part}}}}
allow_fail
data = :fail:

It seems to work with this patch.

--- src/expand.c.org Mon Jul 22 10:59:48 2002
+++ src/expand.c Mon Sep 16 16:56:00 2002
@@ -2211,6 +2211,12 @@
          case 3: goto EXPAND_FAILED;
          }


+      /* If skipping, don't try to open the file*/
+      if (skipping)
+        {
+        yield = NULL;
+        continue;
+       };
        f = Ufopen(sub_arg[0], "rb");
        if (f == NULL)
          {