X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/184e88237dea64ce48076cdd0184612d057cbafd..4c590bd11647b7440bd982a8c72ebcf5c66564b0:/src/src/acl.c diff --git a/src/src/acl.c b/src/src/acl.c index 73f0614af..d0ed0a51c 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.68 2007/01/08 10:50:17 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.72 2007/02/06 12:19:27 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -186,7 +186,10 @@ enum { #endif CONTROL_FAKEDEFER, CONTROL_FAKEREJECT, - CONTROL_NO_MULTILINE + CONTROL_NO_MULTILINE, + CONTROL_NO_PIPELINING, + CONTROL_NO_DELAY_FLUSH, + CONTROL_NO_CALLOUT_FLUSH }; /* ACL control names; keep in step with the table above! This list is used for @@ -214,10 +217,15 @@ static uschar *controls[] = { #ifdef WITH_CONTENT_SCAN US"no_mbox_unspool", #endif - US"no_multiline" + US"fakedefer", + US"fakereject", + US"no_multiline", + US"no_pipelining", + US"no_delay_flush", + US"no_callout_flush" }; -/* Flags to indicate for which conditions /modifiers a string expansion is done +/* Flags to indicate for which conditions/modifiers a string expansion is done at the outer level. In the other cases, expansion already occurs in the checking functions. */ @@ -586,6 +594,15 @@ static unsigned int control_forbids[] = { (1<next) no_multiline_responses = TRUE; break; + case CONTROL_NO_PIPELINING: + pipelining_enable = FALSE; + break; + + case CONTROL_NO_DELAY_FLUSH: + disable_delay_flush = TRUE; + break; + + case CONTROL_NO_CALLOUT_FLUSH: + disable_callout_flush = TRUE; + break; + case CONTROL_FAKEDEFER: case CONTROL_FAKEREJECT: fake_response = (control_type == CONTROL_FAKEDEFER) ? DEFER : FAIL; @@ -2708,13 +2740,18 @@ for (; cb != NULL; cb = cb->next) can't. The poll() function does not do the right thing, and in any case it is not always available. - NOTE: If ever this state of affairs changes, remember that we may be + NOTE 1: If ever this state of affairs changes, remember that we may be dealing with stdin/stdout here, in addition to TCP/IP connections. - Whatever is done must work in both cases. To detected the stdin/stdout - case, check for smtp_in or smtp_out being NULL. */ + Also, delays may be specified for non-SMTP input, where smtp_out and + smtp_in will be NULL. Whatever is done must work in all cases. + + NOTE 2: The added feature of flushing the output before a delay must + apply only to SMTP input. Hence the test for smtp_out being non-NULL. + */ else { + if (smtp_out != NULL && !disable_delay_flush) mac_smtp_fflush(); while (delay > 0) delay = sleep(delay); } }