[exim] [patch] "do nothing" ACL modifier

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Magnus Holmgren
Dátum:  
Címzett: exim-users
Tárgy: [exim] [patch] "do nothing" ACL modifier
Here is a sudden patch that adds (I hope) an ACL modifier that does nothing.
The RHS is expanded and the result is discarded.

It has sometimes been discussed how and where updating SQL queries should be
executed. You *can* for example say

condition = ${lookup mysql {UPDATE hosts SET ... WHERE ...} {true}{true}}

if the result doesn't matter. But a modifier that specifically discards the
result is more self-documenting.

The modifier could also be called "ignore" or "nevermind".

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)

Index: src/acl.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/acl.c,v
retrieving revision 1.72
diff -u -r1.72 acl.c
--- src/acl.c    6 Feb 2007 12:19:27 -0000    1.72
+++ src/acl.c    7 Feb 2007 02:22:28 -0000
@@ -61,6 +61,7 @@
 #ifdef WITH_OLD_DEMIME
        ACLC_DEMIME,
 #endif
+       ACLC_DISREGARD,
 #ifdef EXPERIMENTAL_DOMAINKEYS
        ACLC_DK_DOMAIN_SOURCE,
        ACLC_DK_POLICY,
@@ -122,6 +123,7 @@
 #ifdef WITH_OLD_DEMIME
   US"demime",
 #endif
+  US"disregard",
 #ifdef EXPERIMENTAL_DOMAINKEYS
   US"dk_domain_source",
   US"dk_policy",
@@ -245,6 +247,7 @@
 #ifdef WITH_OLD_DEMIME
   TRUE,    /* demime */
 #endif
+  TRUE,    /* disregard */
 #ifdef EXPERIMENTAL_DOMAINKEYS
   TRUE,    /* dk_domain_source */
   TRUE,    /* dk_policy */
@@ -304,6 +307,7 @@
 #ifdef WITH_OLD_DEMIME
   FALSE,   /* demime */
 #endif
+  TRUE,    /* disregard */
 #ifdef EXPERIMENTAL_DOMAINKEYS
   FALSE,   /* dk_domain_source */
   FALSE,   /* dk_policy */
@@ -392,6 +396,8 @@
   ~((1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP)),   /* demime */
   #endif


+  0,                                               /* disregard */
+
   #ifdef EXPERIMENTAL_DOMAINKEYS
   (1<<ACL_WHERE_AUTH)|                             /* dk_domain_source */
     (1<<ACL_WHERE_CONNECT)|(1<<ACL_WHERE_HELO)|
@@ -2764,6 +2770,9 @@
     break;
     #endif


+    case ACLC_DISREGARD:
+    break;
+
     #ifdef EXPERIMENTAL_DOMAINKEYS
     case ACLC_DK_DOMAIN_SOURCE:
     if (dk_verify_block == NULL) { rc = FAIL; break; };