with the local_sender_retain option.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.9 2004/10/18 11:36:23 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.10 2004/10/19 11:04:26 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
"control" were broken. There should now be diagnostics for all cases when a
control that does not make sense is encountered.
+ 9. Added the /retain_sender option to "control=submission".
+
Exim version 4.43
-----------------
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.2 2004/10/18 09:16:57 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.3 2004/10/19 11:04:26 ph10 Exp $
New Features in Exim
--------------------
CONFIGURE_OWNER. It specifies one additional group that is permitted for
the runtime configuration file when the group write permission is set.
+ 2. The "control=submission" facility has a new option /retain_sender. This
+ has the effect of setting local_sender_retain true and local_from_check
+ false for the incoming message in which it is encountered.
+
Version 4.43
------------
-/* $Cambridge: exim/src/src/acl.c,v 1.2 2004/10/18 11:36:23 ph10 Exp $ */
+/* $Cambridge: exim/src/src/acl.c,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
case CONTROL_SUBMISSION:
submission_mode = TRUE;
- if (Ustrncmp(p, "/domain=", 8) == 0)
- {
- submission_domain = string_copy(p+8);
- }
- else if (*p != 0)
+ while (*p == '/')
+ {
+ if (Ustrncmp(p, "/sender_retain", 14) == 0)
+ {
+ p += 14;
+ active_local_sender_retain = TRUE;
+ active_local_from_check = FALSE;
+ }
+ else if (Ustrncmp(p, "/domain=", 8) == 0)
+ {
+ uschar *pp = p + 8;
+ while (*pp != 0 && *pp != '/') pp++;
+ submission_domain = string_copyn(p+8, pp-p);
+ p = pp;
+ }
+ else break;
+ }
+ if (*p != 0)
{
- *log_msgptr = string_sprintf("syntax error in argument for "
- "\"control\" modifier \"%s\"", arg);
+ *log_msgptr = string_sprintf("syntax error in \"control=%s\"", arg);
return ERROR;
}
break;
-/* $Cambridge: exim/src/src/exim.c,v 1.4 2004/10/18 09:26:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.5 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
int rcount = 0;
int count = argc - recipients_arg;
uschar **list = argv + recipients_arg;
+
+ /* These options cannot be changed dynamically for non-SMTP messages */
+
+ active_local_sender_retain = local_sender_retain;
+ active_local_from_check = local_from_check;
/* Save before any rewriting */
-/* $Cambridge: exim/src/src/globals.c,v 1.2 2004/10/18 09:16:57 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
550, /* STARTTLS */
252 /* VRFY */
};
-
+
+BOOL active_local_from_check = FALSE;
+BOOL active_local_sender_retain = FALSE;
BOOL accept_8bitmime = FALSE;
address_item *addr_duplicate = NULL;
-/* $Cambridge: exim/src/src/globals.h,v 1.2 2004/10/18 09:16:57 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.h,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
extern string_item *acl_warn_logged; /* Logged lines */
extern int acl_wherecodes[]; /* Response codes for ACL fails */
extern uschar *acl_wherenames[]; /* Names for messages */
+extern BOOL active_local_from_check;/* For adding Sender: (switchable) */
+extern BOOL active_local_sender_retain; /* For keeping Sender: (switchable) */
extern address_item *addr_duplicate; /* Duplicate address list */
extern address_item address_defaults; /* Default data for address item */
extern uschar *address_file; /* Name of file when delivering to one */
extern uschar *eldap_dn; /* Where LDAP DNs are left */
extern int load_average; /* Most recently read load average */
extern BOOL local_error_message; /* True if handling one of these */
-extern BOOL local_from_check; /* For adding Sender: */
+extern BOOL local_from_check; /* For adding Sender: (global value) */
extern uschar *local_from_prefix; /* Permitted prefixes */
extern uschar *local_from_suffix; /* Permitted suffixes */
extern uschar *local_interfaces; /* For forcing specific interfaces */
-/* $Cambridge: exim/src/src/receive.c,v 1.2 2004/10/18 11:36:23 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.3 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
blocks.
. If there is a "sender:" header and the message is locally originated,
- throw it away, unless the caller is trusted, or unless local_sender_retain
- is set - which can only happen if local_from_check is false.
+ throw it away, unless the caller is trusted, or unless
+ active_local_sender_retain is set - which can only happen if
+ active_local_from_check is false.
. If recipients are to be extracted from the message, build the
recipients list from the headers, removing any that were on the
. If the sender is local, check that from: is correct, and if not, generate
a Sender: header, unless message comes from a trusted caller, or this
- feature is disabled by no_local_from_check.
+ feature is disabled by active_local_from_check being false.
. If there is no "date" header, generate one, for locally-originated
or submission mode messages only.
/* If there is a "Sender:" header and the message is locally originated,
and from an untrusted caller, or if we are in submission mode for a remote
message, mark it "old" so that it will not be transmitted with the message,
- unless local_sender_retain is set. (This can only be true if
- local_from_check is false.) If there are any resent- headers in the
+ unless active_local_sender_retain is set. (This can only be true if
+ active_local_from_check is false.) If there are any resent- headers in the
message, apply this rule to Resent-Sender: instead of Sender:. Messages
with multiple resent- header sets cannot be tidily handled. (For this
reason, at least one MUA - Pine - turns old resent- headers into X-resent-
headers when resending, leaving just one set.) */
case htype_sender:
- h->type = ((
- (sender_local && !trusted_caller && !local_sender_retain) ||
- submission_mode
+ h->type = ((!active_local_sender_retain &&
+ ((sender_local && !trusted_caller) || submission_mode)
) &&
(!resents_exist||is_resent))?
htype_old : htype_sender;
Sender: header is inserted, as required. */
if (from_header != NULL &&
- (
- (sender_local && local_from_check && !trusted_caller) ||
- (submission_mode && authenticated_id != NULL)
+ (active_local_from_check &&
+ ((sender_local && !trusted_caller) ||
+ (submission_mode && authenticated_id != NULL))
))
{
BOOL make_sender = TRUE;
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.1 2004/10/07 10:39:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.2 2004/10/19 11:04:26 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
message_size = -1;
acl_warn_headers = NULL;
queue_only_policy = FALSE;
-deliver_freeze = FALSE; /* Can be set by ACL */
-submission_mode = FALSE; /* Can be set by ACL */
+deliver_freeze = FALSE; /* Can be set by ACL */
+submission_mode = FALSE; /* Can be set by ACL */
+active_local_from_check = local_from_check; /* Can be set by ACL */
+active_local_sender_retain = local_sender_retain; /* Can be set by ACL */
sender_address = NULL;
raw_sender = NULL; /* After SMTP rewrite, before qualifying */
sender_address_unrewritten = NULL; /* Set only after verify rewrite */