diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-02-13 12:02:59 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2006-02-13 12:02:59 +0000 |
commit | 6a3f1455e3402f214d60abb87969660844770d91 (patch) | |
tree | fd7649c9fe634361c4f10ef8cf235711ac0b65d7 /src | |
parent | 9675b3847f805018897fc71dcc5c98b78defd510 (diff) |
Add control=freeze/no_tell feature.
Diffstat (limited to 'src')
-rw-r--r-- | src/ACKNOWLEDGMENTS | 5 | ||||
-rw-r--r-- | src/src/acl.c | 17 | ||||
-rw-r--r-- | src/src/globals.c | 3 | ||||
-rw-r--r-- | src/src/globals.h | 3 | ||||
-rw-r--r-- | src/src/readconf.c | 7 | ||||
-rw-r--r-- | src/src/smtp_in.c | 3 |
6 files changed, 29 insertions, 9 deletions
diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index 54b7da044..455b39fe5 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.39 2005/12/12 15:58:53 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.40 2006/02/13 12:02:59 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 12 December 2005 +Last updated: 13 February 2006 THE OLD LIST @@ -243,5 +243,6 @@ Joachim Wieland Patches for PostgreSQL socket support and other Patch for hosts_avoid_esmtp Stephen Wilcox Patch for ignore_enotdir problem David Woodhouse SQLite support proof of concept code + control=freeze/no_tell basic code **** diff --git a/src/src/acl.c b/src/src/acl.c index f5949f04f..6efc313d1 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.54 2006/02/07 11:19:00 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.55 2006/02/13 12:02:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -528,7 +528,7 @@ static control_def controls_list[] = { { US"caseful_local_part", CONTROL_CASEFUL_LOCAL_PART, FALSE }, { US"caselower_local_part", CONTROL_CASELOWER_LOCAL_PART, FALSE }, { US"enforce_sync", CONTROL_ENFORCE_SYNC, FALSE }, - { US"freeze", CONTROL_FREEZE, FALSE }, + { US"freeze", CONTROL_FREEZE, TRUE }, { US"no_enforce_sync", CONTROL_NO_ENFORCE_SYNC, FALSE }, { US"no_multiline_responses", CONTROL_NO_MULTILINE, FALSE }, { US"queue_only", CONTROL_QUEUE_ONLY, FALSE }, @@ -2375,7 +2375,7 @@ for (; cb != NULL; cb = cb->next) { /* A nested ACL that returns "discard" makes sense only for an "accept" or "discard" verb. */ - +\ case ACLC_ACL: rc = acl_check_internal(where, addr, arg, level+1, user_msgptr, log_msgptr); if (rc == DISCARD && verb != ACL_ACCEPT && verb != ACL_DISCARD) @@ -2489,6 +2489,17 @@ for (; cb != NULL; cb = cb->next) case CONTROL_FREEZE: deliver_freeze = TRUE; deliver_frozen_at = time(NULL); + freeze_tell = freeze_tell_config; /* Reset to configured value */ + if (Ustrncmp(p, "/no_tell", 8) == 0) + { + p += 8; + freeze_tell = NULL; + } + if (*p != 0) + { + *log_msgptr = string_sprintf("syntax error in \"control=%s\"", arg); + return ERROR; + } break; case CONTROL_QUEUE_ONLY: diff --git a/src/src/globals.c b/src/src/globals.c index 275b7c8f0..11470fbe4 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.c,v 1.47 2006/02/10 16:29:20 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.c,v 1.48 2006/02/13 12:02:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -545,6 +545,7 @@ uschar *found_extension = NULL; #endif uid_t fixed_never_users[] = { FIXED_NEVER_USERS }; uschar *freeze_tell = NULL; +uschar *freeze_tell_config = NULL; uschar *fudged_queue_times = US""; uschar *gecos_name = NULL; diff --git a/src/src/globals.h b/src/src/globals.h index e3628167f..c884dfaf2 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.h,v 1.34 2006/02/10 14:25:43 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.h,v 1.35 2006/02/13 12:02:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -333,6 +333,7 @@ extern uid_t fixed_never_users[]; /* Can't be overridden */ extern uschar *found_extension; /* demime acl condition: file extension found */ #endif extern uschar *freeze_tell; /* Message on (some) freezings */ +extern uschar *freeze_tell_config; /* The configured setting */ extern uschar *fudged_queue_times; /* For use in test harness */ extern uschar *gecos_name; /* To be expanded when pattern matches */ diff --git a/src/src/readconf.c b/src/src/readconf.c index 5623b87f4..62b6d5b85 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/readconf.c,v 1.18 2006/02/08 14:28:51 ph10 Exp $ */ +/* $Cambridge: exim/src/src/readconf.c,v 1.19 2006/02/13 12:02:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2819,6 +2819,11 @@ if (timezone_string != NULL && *timezone_string == 0) timezone_string = NULL; if (remote_max_parallel <= 0) remote_max_parallel = 1; +/* Save the configured setting of freeze_tell, so we can re-instate it at the +start of a new SMTP message. */ + +freeze_tell_config = freeze_tell; + /* The primary host name may be required for expansion of spool_directory and log_file_path, so make sure it is set asap. It is obtained from uname(), but if that yields an unqualified value, make a FQDN by using gethostbyname to diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 04bffd017..cc6486a40 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.30 2006/02/10 14:25:43 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.31 2006/02/13 12:02:59 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -806,6 +806,7 @@ message_size = -1; acl_warn_headers = NULL; queue_only_policy = FALSE; deliver_freeze = FALSE; /* Can be set by ACL */ +freeze_tell = freeze_tell_config; /* Can be set by ACL */ fake_response = OK; /* Can be set by ACL */ #ifdef WITH_CONTENT_SCAN no_mbox_unspool = FALSE; /* Can be set by ACL */ |