-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.216 2005/09/06 13:21:06 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.217 2005/09/07 10:15:33 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/35 Installed configuration files for Dragonfly.
+PH/36 When a locally submitted message by a trusted user did not contain a
+ From: header, and the sender address was obtained from -f or from an SMTP
+ MAIL command, and the trusted user did not use -F to supply a sender
+ name, $originator_name was incorrectly used when constructing a From:
+ header. Furthermore, $originator_name was used for submission mode
+ messages from external hosts without From: headers in a similar way,
+ which is clearly wrong.
+
Exim version 4.52
-----------------
-/* $Cambridge: exim/src/src/acl.c,v 1.45 2005/09/06 13:17:36 ph10 Exp $ */
+/* $Cambridge: exim/src/src/acl.c,v 1.46 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
{
uschar *pp = p + 6;
while (*pp != 0 && *pp != '/') pp++;
- originator_name = string_copy(parse_fix_phrase(p+6, pp-p-6,
+ submission_name = string_copy(parse_fix_phrase(p+6, pp-p-6,
big_buffer, big_buffer_size));
p = pp;
}
-/* $Cambridge: exim/src/src/exim.c,v 1.26 2005/08/23 11:25:38 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.27 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
{ badarg = TRUE; break; }
}
originator_name = argrest;
+ sender_name_forced = TRUE;
break;
-/* $Cambridge: exim/src/src/globals.c,v 1.34 2005/08/08 10:48:27 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.35 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
BOOL sender_host_unknown = FALSE;
uschar *sender_ident = NULL;
BOOL sender_local = FALSE;
+BOOL sender_name_forced = FALSE;
uschar *sender_rate = NULL;
uschar *sender_rate_limit = NULL;
uschar *sender_rate_period = NULL;
BOOL strip_trailing_dot = FALSE;
uschar *submission_domain = NULL;
BOOL submission_mode = FALSE;
+uschar *submission_name = NULL;
BOOL synchronous_delivery = FALSE;
BOOL syslog_duplication = TRUE;
int syslog_facility = LOG_MAIL;
-/* $Cambridge: exim/src/src/globals.h,v 1.26 2005/08/22 14:01:37 ph10 Exp $ */
+/* $Cambridge: exim/src/src/globals.h,v 1.27 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
extern BOOL sender_host_unknown; /* TRUE for -bs and -bS except inetd */
extern uschar *sender_ident; /* Sender identity via RFC 1413 */
extern BOOL sender_local; /* TRUE for local senders */
+extern BOOL sender_name_forced; /* Set by -F */
extern uschar *sender_rate; /* Sender rate computed by ACL */
extern uschar *sender_rate_limit; /* Configured rate limit */
extern uschar *sender_rate_period; /* Configured smoothing period */
extern BOOL strip_trailing_dot; /* Remove dots at ends of domains */
extern uschar *submission_domain; /* Domain for submission mode */
extern BOOL submission_mode; /* Can be forced from ACL */
+extern uschar *submission_name; /* User name set from ACL */
extern BOOL synchronous_delivery; /* TRUE if -odi is set */
extern BOOL syslog_duplication; /* FALSE => no duplicate logging */
extern int syslog_facility; /* As defined by Syslog.h */
-/* $Cambridge: exim/src/src/receive.c,v 1.22 2005/08/01 14:41:25 ph10 Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.23 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (from_header == NULL && (sender_host_address == NULL || submission_mode))
{
+ uschar *oname = US"";
+
+ /* Use the originator_name if this is a locally submitted message and the
+ caller is not trusted. For trusted callers, use it only if -F was used to
+ force its value or if we have a non-SMTP message for which -f was not used
+ to set the sender. */
+
+ if (sender_host_address == NULL)
+ {
+ if (!trusted_caller || sender_name_forced ||
+ (!smtp_input && !sender_address_forced))
+ oname = originator_name;
+ }
+
+ /* For non-locally submitted messages, the only time we use the originator
+ name is when it was forced by the /name= option on control=submission. */
+
+ else
+ {
+ if (submission_name != NULL) oname = submission_name;
+ }
+
/* Envelope sender is empty */
if (sender_address[0] == 0)
uschar *fromstart, *fromend;
fromstart = string_sprintf("%sFrom: %s%s", resent_prefix,
- originator_name, (originator_name[0] == 0)? "" : " <");
- fromend = (originator_name[0] == 0)? US"" : US">";
+ oname, (oname[0] == 0)? "" : " <");
+ fromend = (oname[0] == 0)? US"" : US">";
if (sender_local || local_error_message)
{
else
{
header_add(htype_from, "%sFrom: %s%s%s%s\n", resent_prefix,
- originator_name,
- (originator_name[0] == 0)? "" : " <",
+ oname,
+ (oname[0] == 0)? "" : " <",
(sender_address_unrewritten == NULL)?
sender_address : sender_address_unrewritten,
- (originator_name[0] == 0)? "" : ">");
+ (oname[0] == 0)? "" : ">");
from_header = header_last; /* To get it checked for Sender: */
}
if (make_sender)
{
- if (submission_mode && originator_name[0] == 0)
+ if (submission_mode && submission_name == NULL)
header_add(htype_sender, "%sSender: %s\n", resent_prefix,
generated_sender_address);
else
header_add(htype_sender, "%sSender: %s <%s>\n",
- resent_prefix, originator_name, generated_sender_address);
+ resent_prefix,
+ submission_mode? submission_name : originator_name,
+ generated_sender_address);
}
/* Ensure that a non-null envelope sender address corresponds to the
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.23 2005/08/22 14:01:37 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.24 2005/09/07 10:15:33 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
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;
+submission_name = NULL; /* Can be set by ACL */
raw_sender = NULL; /* After SMTP rewrite, before qualifying */
sender_address_unrewritten = NULL; /* Set only after verify rewrite */
sender_verified_list = NULL; /* No senders verified */