[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: exim-cvs
Subject: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src exim.c exim/exim-test/confs 0535 0548 exim/exim-test/log 0535 exim/exim-test/mail 0535.userx exim/exim-test/scripts/0000-Basi
ph10 2007/01/25 15:51:28 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         exim.c 
    exim-test/confs      0535 0548 
    exim-test/log        0535 
    exim-test/mail       0535.userx 
    exim-test/scripts/0000-Basic 0535 
    exim-test/stderr     0381 0386 0465 0487 3400 
  Log:
  Ensure acl_not_smtp_start is called for -bS input.


  Revision  Changes    Path
  1.463     +6 -0      exim/exim-doc/doc-txt/ChangeLog
  1.54      +34 -23    exim/exim-src/src/exim.c
  1.2       +1 -0      exim/exim-test/confs/0535
  1.2       +1 -0      exim/exim-test/confs/0548
  1.2       +6 -0      exim/exim-test/log/0535
  1.2       +20 -0     exim/exim-test/mail/0535.userx
  1.2       +12 -0     exim/exim-test/scripts/0000-Basic/0535
  1.5       +1 -0      exim/exim-test/stderr/0381
  1.5       +1 -0      exim/exim-test/stderr/0386
  1.5       +3 -0      exim/exim-test/stderr/0465
  1.5       +1 -0      exim/exim-test/stderr/0487
  1.6       +1 -0      exim/exim-test/stderr/3400


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.462
  retrieving revision 1.463
  diff -u -r1.462 -r1.463
  --- ChangeLog    23 Jan 2007 15:08:45 -0000    1.462
  +++ ChangeLog    25 Jan 2007 15:51:28 -0000    1.463
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.462 2007/01/23 15:08:45 ph10 Exp $
  +$Cambridge: exim/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
-------------------------------------------
@@ -53,6 +53,12 @@
PH/08 Added $smtp_count_at_connection_start, deliberately with a long name.

   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

  Index: exim.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/exim.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- exim.c    17 Jan 2007 11:29:39 -0000    1.53
  +++ exim.c    25 Jan 2007 15:51:28 -0000    1.54
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/exim.c,v 1.53 2007/01/17 11:29:39 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/exim.c,v 1.54 2007/01/25 15:51:28 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -4487,16 +4487,17 @@


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
     {
  @@ -4523,8 +4524,8 @@
     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
  @@ -4617,20 +4618,13 @@
     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)
       {
  @@ -4643,6 +4637,23 @@
           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)
           {


  Index: 0535
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/confs/0535,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0535    28 Jun 2006 16:00:24 -0000    1.1
  +++ 0535    25 Jan 2007 15:51:28 -0000    1.2
  @@ -24,6 +24,7 @@
          control = suppress_local_fixups
          add_header = X-Added: $recipients


+
# ----- Routers -----

begin routers

  Index: 0548
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/confs/0548,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0548    22 Jan 2007 15:17:04 -0000    1.1
  +++ 0548    25 Jan 2007 15:51:28 -0000    1.2
  @@ -15,6 +15,7 @@
   acl_smtp_connect = acl_connect
   acl_smtp_rcpt = acl_rcpt
   qualify_domain = test.ex
  +queue_run_in_order



# ----- ACLs -----

  Index: 0535
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/log/0535,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0535    28 Jun 2006 16:00:24 -0000    1.1
  +++ 0535    25 Jan 2007 15:51:28 -0000    1.2
  @@ -4,3 +4,9 @@
   1999-03-02 09:44:33 10HmaY-0005vi-00 <= nofix@??? U=CALLER P=local S=sss
   1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@???> 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@???> R=r1 T=t1
  +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
  +1999-03-02 09:44:33 10HmbA-0005vi-00 <= nofix@??? U=CALLER P=local-bsmtp S=sss
  +1999-03-02 09:44:33 10HmbA-0005vi-00 => userx <userx@???> R=r1 T=t1
  +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed


  Index: 0535.userx
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/mail/0535.userx,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0535.userx    28 Jun 2006 16:00:24 -0000    1.1
  +++ 0535.userx    25 Jan 2007 15:51:28 -0000    1.2
  @@ -18,3 +18,23 @@


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@???; Tue, 2 Mar 1999 09:44:33 +0000
  +Message-Id: <E10HmaZ-0005vi-00@???>
  +From: x@y
  +Date: Tue, 2 Mar 1999 09:44:33 +0000
  +
  +No headers supplied.
  +
  +From nofix@??? Tue Mar 02 09:44:33 1999
  +Received: from CALLER by myhost.test.ex with local-bsmtp (Exim x.yz)
  +    (envelope-from <nofix@???>)
  +    id 10HmbA-0005vi-00
  +    for userx@???; Tue, 2 Mar 1999 09:44:33 +0000
  +X-Added: userx@???
  +
  +No headers supplied.
  +


  Index: 0535
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0535,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 0535    28 Jun 2006 16:00:24 -0000    1.1
  +++ 0535    25 Jan 2007 15:51:28 -0000    1.2
  @@ -5,3 +5,15 @@
   exim -odi -f nofix@??? userx@???
   No headers supplied.
   ****
  +exim -odi -bS
  +mail from:<x@y>
  +rcpt to:<userx@???>
  +data
  +No headers supplied.
  +.
  +mail from:<nofix@???>
  +rcpt to:<userx@???>
  +data
  +No headers supplied.
  +.
  +****


  Index: 0381
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0381,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 0381    14 Jul 2006 14:00:16 -0000    1.4
  +++ 0381    25 Jan 2007 15:51:28 -0000    1.5
  @@ -13,6 +13,7 @@
   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


  Index: 0386
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0386,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 0386    26 Jul 2006 14:39:14 -0000    1.4
  +++ 0386    25 Jan 2007 15:51:28 -0000    1.5
  @@ -133,6 +133,7 @@
   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


  Index: 0465
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0465,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 0465    14 Jul 2006 14:00:16 -0000    1.4
  +++ 0465    25 Jan 2007 15:51:28 -0000    1.5
  @@ -10,6 +10,7 @@
     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
  @@ -40,6 +41,7 @@
     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
  @@ -101,6 +103,7 @@
     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


  Index: 0487
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/0487,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 0487    26 Jul 2006 14:39:14 -0000    1.4
  +++ 0487    25 Jan 2007 15:51:28 -0000    1.5
  @@ -12,6 +12,7 @@
   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


  Index: 3400
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stderr/3400,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- 3400    14 Jul 2006 14:00:16 -0000    1.5
  +++ 3400    25 Jan 2007 15:51:28 -0000    1.6
  @@ -368,6 +368,7 @@
   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