X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Facl.c;h=e0f01694b96ce2f3a8be57a1a2cb3b3f54c81ec0;hb=c61f2b4f6b4216c8bbd17f371f4b63035b2b739a;hp=9c613442292ae2fea33ee7635fd5a93fd0586d01;hpb=8f1283799014bd970817d6d0c21fb8fb860f5264;p=exim.git diff --git a/src/src/acl.c b/src/src/acl.c index 9c6134422..e0f01694b 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.78 2007/08/22 10:10:23 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.81 2008/01/17 13:03:35 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -55,6 +55,9 @@ enum { ACLC_ACL, ACLC_CONDITION, ACLC_CONTINUE, ACLC_CONTROL, +#ifdef EXPERIMENTAL_DCC + ACLC_DCC, +#endif #ifdef WITH_CONTENT_SCAN ACLC_DECODE, #endif @@ -117,6 +120,9 @@ static uschar *conditions[] = { US"condition", US"continue", US"control", +#ifdef EXPERIMENTAL_DCC + US"dcc", +#endif #ifdef WITH_CONTENT_SCAN US"decode", #endif @@ -174,6 +180,9 @@ enum { #ifdef EXPERIMENTAL_DOMAINKEYS CONTROL_DK_VERIFY, #endif + #ifdef EXPERIMENTAL_DKIM + CONTROL_DKIM_VERIFY, + #endif CONTROL_ERROR, CONTROL_CASEFUL_LOCAL_PART, CONTROL_CASELOWER_LOCAL_PART, @@ -207,6 +216,9 @@ static uschar *controls[] = { #ifdef EXPERIMENTAL_DOMAINKEYS US"dk_verify", #endif + #ifdef EXPERIMENTAL_DKIM + US"dkim_verify", + #endif US"error", US"caseful_local_part", US"caselower_local_part", @@ -241,6 +253,9 @@ static uschar cond_expand_at_top[] = { TRUE, /* condition */ TRUE, /* continue */ TRUE, /* control */ +#ifdef EXPERIMENTAL_DCC + TRUE, /* dcc */ +#endif #ifdef WITH_CONTENT_SCAN TRUE, /* decode */ #endif @@ -301,6 +316,9 @@ static uschar cond_modifiers[] = { FALSE, /* condition */ TRUE, /* continue */ TRUE, /* control */ +#ifdef EXPERIMENTAL_DCC + FALSE, /* dcc */ +#endif #ifdef WITH_CONTENT_SCAN FALSE, /* decode */ #endif @@ -387,6 +405,11 @@ static unsigned int cond_forbids[] = { 0, /* control */ + #ifdef EXPERIMENTAL_DCC + (unsigned int) + ~((1<next) break; #endif + #ifdef EXPERIMENTAL_DKIM + case CONTROL_DKIM_VERIFY: + dkim_do_verify = 1; + break; + #endif + case CONTROL_ERROR: return ERROR; @@ -2734,6 +2771,26 @@ for (; cb != NULL; cb = cb->next) } break; + #ifdef EXPERIMENTAL_DCC + case ACLC_DCC: + { + /* Seperate the regular expression and any optional parameters. */ + uschar *ss = string_nextinlist(&arg, &sep, big_buffer, big_buffer_size); + /* Run the dcc backend. */ + rc = dcc_process(&ss); + /* Modify return code based upon the existance of options. */ + while ((ss = string_nextinlist(&arg, &sep, big_buffer, big_buffer_size)) + != NULL) { + if (strcmpic(ss, US"defer_ok") == 0 && rc == DEFER) + { + /* FAIL so that the message is passed to the next ACL */ + rc = FAIL; + } + } + } + break; + #endif + #ifdef WITH_CONTENT_SCAN case ACLC_DECODE: rc = mime_decode(&arg); @@ -3456,11 +3513,11 @@ while (acl != NULL) *log_msgptr = *user_msgptr = NULL; acl_temp_details = FALSE; - if (where == ACL_WHERE_QUIT && + if ((where == ACL_WHERE_QUIT || where == ACL_WHERE_NOTQUIT) && acl->verb != ACL_ACCEPT && acl->verb != ACL_WARN) { - *log_msgptr = string_sprintf("\"%s\" is not allowed in a QUIT ACL", + *log_msgptr = string_sprintf("\"%s\" is not allowed in a QUIT or not-QUIT ACL", verbs[acl->verb]); return ERROR; }