ACL modifier
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 7 May 2016 22:55:46 +0000 (23:55 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 7 May 2016 22:55:46 +0000 (23:55 +0100)
doc/doc-docbook/spec.xfpt
doc/doc-txt/NewStuff
src/src/acl.c

index 2018af992b694535a37c1fe9af6e0e8320f8b6b4..8b615f83102e951017c9b9d9ddf1f98fe3f75229 100644 (file)
@@ -28583,6 +28583,14 @@ all the conditions are true, wherever it appears in an ACL command, whereas
 effect.
 
 
 effect.
 
 
+.vitem &*queue*&&~=&~<&'text'&>
+This modifier specifies the use of a named queue for spool files
+for the message.
+This could be used, for example, for known high-volume burst sources
+of traffic, or for quarantine of messages.
+Separate queue-runner processes will be needed for named queues.
+
+
 .vitem &*remove_header*&&~=&~<&'text'&>
 This modifier specifies one or more header names in a colon-separated list
  that are to be removed from an incoming message, assuming, of course, that
 .vitem &*remove_header*&&~=&~<&'text'&>
 This modifier specifies one or more header names in a colon-separated list
  that are to be removed from an incoming message, assuming, of course, that
index 1207c4974e8bd9d4e191a343e123318f1bdbb51e..aabeff3383c06427b19bf484222d2846c6aad117 100644 (file)
@@ -13,7 +13,8 @@ Version 4.88
     interpreter in taint mode.
 
  2. Facility for named queues.  A commandline argument can specify
     interpreter in taint mode.
 
  2. Facility for named queues.  A commandline argument can specify
-    the queue name for a queue-runner.
+    the queue name for a queue-runner, and an ACL modifier can set
+    the queue to be used for a message.
 
 
 Version 4.87
 
 
 Version 4.87
index 474b0d1819be12537f84228cb5c9cfc69458fbc2..ec1505bf0023f685ae7c5f301fae005479493b2f 100644 (file)
@@ -88,6 +88,7 @@ enum { ACLC_ACL,
 #ifdef WITH_CONTENT_SCAN
        ACLC_MIME_REGEX,
 #endif
 #ifdef WITH_CONTENT_SCAN
        ACLC_MIME_REGEX,
 #endif
+       ACLC_QUEUE,
        ACLC_RATELIMIT,
        ACLC_RECIPIENTS,
 #ifdef WITH_CONTENT_SCAN
        ACLC_RATELIMIT,
        ACLC_RECIPIENTS,
 #ifdef WITH_CONTENT_SCAN
@@ -108,7 +109,7 @@ enum { ACLC_ACL,
        ACLC_VERIFY };
 
 /* ACL conditions/modifiers: "delay", "control", "continue", "endpass",
        ACLC_VERIFY };
 
 /* ACL conditions/modifiers: "delay", "control", "continue", "endpass",
-"message", "log_message", "log_reject_target", "logwrite", and "set" are
+"message", "log_message", "log_reject_target", "logwrite", "queue" and "set" are
 modifiers that look like conditions but always return TRUE. They are used for
 their side effects. */
 
 modifiers that look like conditions but always return TRUE. They are used for
 their side effects. */
 
@@ -152,13 +153,16 @@ static uschar *conditions[] = {
 #ifdef WITH_CONTENT_SCAN
   US"mime_regex",
 #endif
 #ifdef WITH_CONTENT_SCAN
   US"mime_regex",
 #endif
+  US"queue",
   US"ratelimit",
   US"recipients",
 #ifdef WITH_CONTENT_SCAN
   US"regex",
 #endif
   US"remove_header",
   US"ratelimit",
   US"recipients",
 #ifdef WITH_CONTENT_SCAN
   US"regex",
 #endif
   US"remove_header",
-  US"sender_domains", US"senders", US"set",
+  US"sender_domains",
+  US"senders",
+  US"set",
 #ifdef WITH_CONTENT_SCAN
   US"spam",
 #endif
 #ifdef WITH_CONTENT_SCAN
   US"spam",
 #endif
@@ -298,6 +302,7 @@ static uschar cond_expand_at_top[] = {
 #ifdef WITH_CONTENT_SCAN
   TRUE,    /* mime_regex */
 #endif
 #ifdef WITH_CONTENT_SCAN
   TRUE,    /* mime_regex */
 #endif
+  TRUE,    /* queue */
   TRUE,    /* ratelimit */
   FALSE,   /* recipients */
 #ifdef WITH_CONTENT_SCAN
   TRUE,    /* ratelimit */
   FALSE,   /* recipients */
 #ifdef WITH_CONTENT_SCAN
@@ -360,6 +365,7 @@ static uschar cond_modifiers[] = {
 #ifdef WITH_CONTENT_SCAN
   FALSE,   /* mime_regex */
 #endif
 #ifdef WITH_CONTENT_SCAN
   FALSE,   /* mime_regex */
 #endif
+  TRUE,    /* queue */
   FALSE,   /* ratelimit */
   FALSE,   /* recipients */
 #ifdef WITH_CONTENT_SCAN
   FALSE,   /* ratelimit */
   FALSE,   /* recipients */
 #ifdef WITH_CONTENT_SCAN
@@ -507,6 +513,7 @@ static unsigned int cond_forbids[] = {
   ~(1<<ACL_WHERE_MIME),                            /* mime_regex */
   #endif
 
   ~(1<<ACL_WHERE_MIME),                            /* mime_regex */
   #endif
 
+  0,                                               /* queue */
   0,                                               /* ratelimit */
 
   (unsigned int)
   0,                                               /* ratelimit */
 
   (unsigned int)
@@ -3518,7 +3525,7 @@ for (; cb != NULL; cb = cb->next)
       rc = match_isinlist(dkim_cur_signer,
                           &arg,0,NULL,NULL,MCL_STRING,TRUE,NULL);
     else
       rc = match_isinlist(dkim_cur_signer,
                           &arg,0,NULL,NULL,MCL_STRING,TRUE,NULL);
     else
-       rc = FAIL;
+      rc = FAIL;
     break;
 
     case ACLC_DKIM_STATUS:
     break;
 
     case ACLC_DKIM_STATUS:
@@ -3677,6 +3684,10 @@ for (; cb != NULL; cb = cb->next)
     break;
     #endif
 
     break;
     #endif
 
+    case ACLC_QUEUE:
+    queue_name = string_copy_malloc(arg);
+    break;
+
     case ACLC_RATELIMIT:
     rc = acl_ratelimit(arg, where, log_msgptr);
     break;
     case ACLC_RATELIMIT:
     rc = acl_ratelimit(arg, where, log_msgptr);
     break;