-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.462 2007/01/23 15:08:45 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.463 2007/01/25 15:51:28 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
PH/09 Installed PCRE release 7.0.
+PH/10 The acl_not_smtp_start ACL was, contrary to the documentation, not being
+ run for batched SMTP input. It is now run at the start of every message
+ in the batch. While fixing this I discovered that the process information
+ (output by running exiwhat) was not always getting set for -bs and -bS
+ input. This is fixed, and it now also says "batched" for BSMTP.
+
Exim version 4.66
-----------------
-/* $Cambridge: exim/src/src/exim.c,v 1.53 2007/01/17 11:29:39 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.54 2007/01/25 15:51:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (fstat(1, &statbuf) < 0) (void)dup2(0, 1);
-/* Set up the incoming protocol name and the state of the program. Root
-is allowed to force received protocol via the -oMr option above, and if we are
-in a non-local SMTP state it means we have come via inetd and the process info
-has already been set up. We don't set received_protocol here for smtp input,
-as it varies according to batch/HELO/EHLO/AUTH/TLS. */
+/* Set up the incoming protocol name and the state of the program. Root is
+allowed to force received protocol via the -oMr option above. If we have come
+via inetd, the process info has already been set up. We don't set
+received_protocol here for smtp input, as it varies according to
+batch/HELO/EHLO/AUTH/TLS. */
if (smtp_input)
{
- if (sender_local) set_process_info("accepting a local SMTP message from <%s>",
- sender_address);
+ if (!is_inetd) set_process_info("accepting a local %sSMTP message from <%s>",
+ smtp_batched_input? "batched " : "",
+ (sender_address!= NULL)? sender_address : originator_login);
}
else
{
return EXIT_FAILURE;
}
-/* If this is smtp input of any kind, handle the start of the SMTP
-session.
+/* If this is smtp input of any kind, real or batched, handle the start of the
+SMTP session.
NOTE: We do *not* call smtp_log_no_mail() if smtp_start_session() fails,
because a log line has already been written for all its failure exists
store_reset(reset_point);
message_id[0] = 0;
- /* In the SMTP case, we have to handle the initial SMTP input and build the
- recipients list, before calling receive_msg() to read the message proper.
- Whatever sender address is actually given in the SMTP transaction is
- actually ignored for local senders - we use the actual sender, which is
- normally either the underlying user running this process or a -f argument
- provided by a trusted caller. It is saved in real_sender_address.
-
- However, if this value is NULL, we are dealing with a trusted caller when
- -f was not used; in this case, the SMTP sender is allowed to stand.
-
- Also, if untrusted_set_sender is set, we permit sender addresses that match
- anything in its list.
-
- The variable raw_sender_address holds the sender address before rewriting. */
+ /* Handle the SMTP case; call smtp_setup_mst() to deal with the initial SMTP
+ input and build the recipients list, before calling receive_msg() to read the
+ message proper. Whatever sender address is given in the SMTP transaction is
+ often ignored for local senders - we use the actual sender, which is normally
+ either the underlying user running this process or a -f argument provided by
+ a trusted caller. It is saved in real_sender_address. The test for whether to
+ accept the SMTP sender is encapsulated in receive_check_set_sender(). */
if (smtp_input)
{
sender_address = raw_sender = real_sender_address;
sender_address_unrewritten = NULL;
}
+
+ /* For batched SMTP, we have to run the acl_not_smtp_start ACL, since it
+ isn't really SMTP, so no other ACL will run until the acl_not_smtp one at
+ the very end. The result of the ACL is ignored (as for other non-SMTP
+ messages). It is run for its potential side effects. */
+
+ if (smtp_batched_input && acl_not_smtp_start != NULL)
+ {
+ uschar *user_msg, *log_msg;
+ enable_dollar_recipients = TRUE;
+ (void)acl_check(ACL_WHERE_NOTSMTP_START, NULL, acl_not_smtp_start,
+ &user_msg, &log_msg);
+ enable_dollar_recipients = FALSE;
+ }
+
+ /* Now get the data for the message */
+
more = receive_msg(extract_recipients);
if (message_id[0] == 0)
{
control = suppress_local_fixups
add_header = X-Added: $recipients
+
# ----- Routers -----
begin routers
acl_smtp_connect = acl_connect
acl_smtp_rcpt = acl_rcpt
qualify_domain = test.ex
+queue_run_in_order
# ----- ACLs -----
1999-03-02 09:44:33 10HmaY-0005vi-00 <= nofix@test.ex U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= x@y U=CALLER P=local-bsmtp S=sss
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= nofix@test.ex U=CALLER P=local-bsmtp S=sss
+1999-03-02 09:44:33 10HmbA-0005vi-00 => userx <userx@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
No headers supplied.
+From x@y Tue Mar 02 09:44:33 1999
+Received: from CALLER by myhost.test.ex with local-bsmtp (Exim x.yz)
+ (envelope-from <x@y>)
+ id 10HmaZ-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
+From: x@y
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+No headers supplied.
+
+From nofix@test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER by myhost.test.ex with local-bsmtp (Exim x.yz)
+ (envelope-from <nofix@test.ex>)
+ id 10HmbA-0005vi-00
+ for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+X-Added: userx@test.ex
+
+No headers supplied.
+
exim -odi -f nofix@test.ex userx@test.ex
No headers supplied.
****
+exim -odi -bS
+mail from:<x@y>
+rcpt to:<userx@test.ex>
+data
+No headers supplied.
+.
+mail from:<nofix@test.ex>
+rcpt to:<userx@test.ex>
+data
+No headers supplied.
+.
+****
sender_fullhost = [V4NET.99.99.97]
sender_rcvhost = [V4NET.99.99.97] (ident=CALLER)
set_process_info: pppp handling incoming connection from [V4NET.99.99.97] via -oMa
+set_process_info: pppp accepting a local SMTP message from <CALLER>
host in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
sender_fullhost = [V4NET.11.12.13]
sender_rcvhost = [V4NET.11.12.13] (ident=CALLER)
set_process_info: pppp handling incoming connection from [V4NET.11.12.13] via -oMa
+set_process_info: pppp accepting a local SMTP message from <CALLER>
host in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
uid=EXIM_UID gid=EXIM_GID pid=pppp
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
sender address = NULL
+set_process_info: pppp accepting a local SMTP message from <CALLER>
in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
uid=EXIM_UID gid=EXIM_GID pid=pppp
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
sender address = NULL
+set_process_info: pppp accepting a local SMTP message from <CALLER>
in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
uid=EXIM_UID gid=EXIM_GID pid=pppp
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
sender address = NULL
+set_process_info: pppp accepting a local SMTP message from <CALLER>
in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
getpwnam() succeeded uid=CALLER_UID gid=CALLER_GID
originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
sender address = NULL
+set_process_info: pppp accepting a local SMTP message from <CALLER>
in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER
sender_fullhost = [10.0.0.5]
sender_rcvhost = [10.0.0.5] (ident=CALLER)
set_process_info: pppp handling incoming connection from [10.0.0.5] via -oMa
+set_process_info: pppp accepting a local SMTP message from <CALLER>
host in hosts_connection_nolog? no (option unset)
LOG: smtp_connection MAIN
SMTP connection from CALLER