[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 README.UPDATING exim/exim-src/src structs.h verify.c exim/exim-src/src/transports smtp.c exim/exim-test/confs 0540 exim/exim-tes
ph10 2006/09/25 12:25:37 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src             README.UPDATING 
    exim-src/src         structs.h verify.c 
    exim-src/src/transports smtp.c 
  Added files:
    exim-test/confs      0540 
    exim-test/scripts/0000-Basic 0540 
    exim-test/stdout     0540 
  Log:
  Change callout EHLO/HELO from smtp_active_hostname to the helo_data
  setting from the transport, when there is one.


  Revision  Changes    Path
  1.398     +8 -0      exim/exim-doc/doc-txt/ChangeLog
  1.13      +14 -0     exim/exim-src/README.UPDATING
  1.12      +1 -0      exim/exim-src/src/structs.h
  1.26      +3 -2      exim/exim-src/src/transports/smtp.c
  1.39      +27 -4     exim/exim-src/src/verify.c
  1.1       +53 -0     exim/exim-test/confs/0540 (new)
  1.1       +52 -0     exim/exim-test/scripts/0000-Basic/0540 (new)
  1.1       +57 -0     exim/exim-test/stdout/0540 (new)


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.397
  retrieving revision 1.398
  diff -u -r1.397 -r1.398
  --- ChangeLog    25 Sep 2006 10:14:20 -0000    1.397
  +++ ChangeLog    25 Sep 2006 11:25:37 -0000    1.398
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.397 2006/09/25 10:14:20 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.398 2006/09/25 11:25:37 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -55,6 +55,14 @@
   PH/10 Added the log_reject_target ACL modifier to specify where to log
         rejections.


  +PH/11 Callouts were setting the name used for EHLO/HELO from $smtp_active_
  +      hostname. This is wrong, because it relates to the incoming message (and
  +      probably the interface on which it is arriving) and not to the outgoing
  +      callout (which could be using a different interface). This has been
  +      changed to use the value of the helo_data option from the smtp transport
  +      instead - this is what is used when a message is actually being sent. If
  +      there is no remote transport (possible with a router that sets up host
  +      addresses), $smtp_active_hostname is used.



Exim version 4.63

  Index: README.UPDATING
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/README.UPDATING,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- README.UPDATING    13 Jul 2006 13:53:33 -0000    1.12
  +++ README.UPDATING    25 Sep 2006 11:25:37 -0000    1.13
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-src/README.UPDATING,v 1.12 2006/07/13 13:53:33 ph10 Exp $
  +$Cambridge: exim/exim-src/README.UPDATING,v 1.13 2006/09/25 11:25:37 ph10 Exp $


This document contains detailed information about incompatibilities that might
be encountered when upgrading from one release of Exim to another. The
@@ -26,6 +26,20 @@

The rest of this document contains information about changes in 4.xx releases
that might affect a running system.
+
+
+Exim version 4.64
+-----------------
+
+1. Callouts were setting the name used for EHLO/HELO from $smtp_active_
+hostname. This is wrong, because it relates to the incoming message (and
+probably the interface on which it is arriving) and not to the outgoing
+callout (which could be using a different interface). This has been
+changed to use the value of the helo_data option from the smtp transport
+instead - this is what is used when a message is actually being sent. If
+there is no remote transport (possible with a router that sets up host
+addresses), $smtp_active_hostname is used. This change is mentioned here in
+case somebody is relying on the use of $smtp_active_hostname.


Exim version 4.63

  Index: structs.h
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/structs.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- structs.h    19 Sep 2006 11:28:45 -0000    1.11
  +++ structs.h    25 Sep 2006 11:25:37 -0000    1.12
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/structs.h,v 1.11 2006/09/19 11:28:45 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/structs.h,v 1.12 2006/09/25 11:25:37 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -89,6 +89,7 @@
     uschar *port;
     uschar *protocol;
     uschar *hosts;
  +  uschar *helo_data;
     BOOL   hosts_override;
     BOOL   hosts_randomize;
     BOOL   gethostbyname;


  Index: verify.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/verify.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- verify.c    5 Sep 2006 13:24:10 -0000    1.38
  +++ verify.c    25 Sep 2006 11:25:37 -0000    1.39
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/verify.c,v 1.38 2006/09/05 13:24:10 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/verify.c,v 1.39 2006/09/25 11:25:37 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -389,6 +389,7 @@
     int host_af;
     int port = 25;
     BOOL send_quit = TRUE;
  +  uschar *active_hostname = smtp_active_hostname;
     uschar *helo = US"HELO";
     uschar *interface = NULL;  /* Outgoing interface to use; NULL => any */
     uschar inbuffer[4096];
  @@ -435,6 +436,17 @@
       log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: %s", addr->address,
         addr->message);


  +  /* Expand the helo_data string to find the host name to use. */
  +
  +  if (tf->helo_data != NULL)
  +    {
  +    uschar *s = expand_string(tf->helo_data);
  +    if (active_hostname == NULL)
  +      log_write(0, LOG_MAIN|LOG_PANIC, "<%s>: failed to expand transport's "
  +        "helo_data value for callout: %s", expand_string_message);
  +    else active_hostname = s;
  +    }
  +
     deliver_host = deliver_host_address = NULL;
     deliver_domain = save_deliver_domain;


  @@ -481,7 +493,7 @@
       smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
         '2', callout) &&
       smtp_write_command(&outblock, FALSE, "%s %s\r\n", helo,
  -      smtp_active_hostname) >= 0 &&
  +      active_hostname) >= 0 &&
       smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
         '2', callout);


  @@ -1073,10 +1085,21 @@
         {
         host_item *host_list = addr->host_list;


  -      /* Default, if no remote transport, to NULL for the interface (=> any),
  -      "smtp" for the port, and "smtp" for the protocol. */
  +      /* Make up some data for use in the case where there is no remote
  +      transport. */


  -      transport_feedback tf = { NULL, US"smtp", US"smtp", NULL, FALSE, FALSE };
  +      transport_feedback tf = {
  +        NULL,                       /* interface (=> any) */
  +        US"smtp",                   /* port */
  +        US"smtp",                   /* protocol */
  +        NULL,                       /* hosts */
  +        US"$smtp_active_hostname",  /* helo_data */
  +        FALSE,                      /* hosts_override */
  +        FALSE,                      /* hosts_randomize */
  +        FALSE,                      /* gethostbyname */
  +        TRUE,                       /* qualify_single */
  +        FALSE                       /* search_parents */
  +        };


         /* If verification yielded a remote transport, we want to use that
         transport's options, so as to mimic what would happen if we were really


  Index: smtp.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/transports/smtp.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- smtp.c    9 Mar 2006 15:10:16 -0000    1.25
  +++ smtp.c    25 Sep 2006 11:25:37 -0000    1.26
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/transports/smtp.c,v 1.25 2006/03/09 15:10:16 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/transports/smtp.c,v 1.26 2006/09/25 11:25:37 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -203,8 +203,8 @@
   but before running it in a sub-process. It is used for two things:


     (1) To set the fallback host list in addresses, when delivering.
  -  (2) To pass back the interface, port, and protocol options, for use during
  -      callout verification.
  +  (2) To pass back the interface, port, protocol, and other options, for use
  +      during callout verification.


   Arguments:
     tblock    pointer to the transport instance block
  @@ -241,6 +241,7 @@
     tf->gethostbyname = ob->gethostbyname;
     tf->qualify_single = ob->dns_qualify_single;
     tf->search_parents = ob->dns_search_parents;
  +  tf->helo_data = ob->helo_data;
     }


/* Set the fallback host list for all the addresses that don't have fallback

Index: 0540
====================================================================
# Exim test configuration 0540

exim_path = EXIM_PATH
host_lookup_order = bydns
primary_hostname = myhost.test.ex
rfc1413_query_timeout = 0s
spool_directory = DIR/spool
log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME

# ----- Main settings -----

acl_smtp_rcpt = check_rcpt

queue_only


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

begin acl

  check_rcpt:
    accept  verify = recipient/callout



# ----- Routers -----

begin routers

  r1:
    driver = accept
    transport = ${if match {$domain}{^yes}{t1}{t2}}



# ----- Transports -----

begin transports

  t1:
    driver = smtp
    hosts = 127.0.0.1
    port = PORT_S
    allow_localhost
    helo_data = ${if eq{$domain}{yes1}{localhost}{aname}}


  t2:
    driver = smtp
    hosts = 127.0.0.1
    port = PORT_S
    allow_localhost


# End

Index: 0540
====================================================================
# Affixes in RCPT commands for recipient callouts
need_ipv4
#
server PORT_S 4
220 Welcome
HELO
250 Hi
MAIL FROM
250 OK
RCPT TO
250 OK
QUIT
250 OK
*eof
220 Welcome
HELO
250 Hi
MAIL FROM
250 OK
RCPT TO
250 OK
QUIT
250 OK
*eof
220 Welcome
HELO
250 Hi
MAIL FROM
250 OK
RCPT TO
250 OK
QUIT
250 OK
*eof
220 Welcome
HELO
250 Hi
MAIL FROM
250 OK
RCPT TO
250 OK
QUIT
250 OK
****
exim -odq -bs
mail from:<>
RCPT TO:<abc@yes1>
RCPT TO:<def@yes2>
RCPT TO:<abc@no>
RCPT TO:<def@no>
quit
****

Index: 0540
====================================================================
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250 OK
250 Accepted
250 Accepted
250 Accepted
250 Accepted
221 myhost.test.ex closing connection

******** SERVER ********
Listening on port 1224 ...
Connection request from [127.0.0.1]
220 Welcome
HELO localhost
250 Hi
MAIL FROM:<>
250 OK
RCPT TO:<abc@yes1>
250 OK
QUIT
250 OK
Expected EOF read from client
Listening on port 1224 ...
Connection request from [127.0.0.1]
220 Welcome
HELO aname
250 Hi
MAIL FROM:<>
250 OK
RCPT TO:<def@yes2>
250 OK
QUIT
250 OK
Expected EOF read from client
Listening on port 1224 ...
Connection request from [127.0.0.1]
220 Welcome
HELO myhost.test.ex
250 Hi
MAIL FROM:<>
250 OK
RCPT TO:<abc@no>
250 OK
QUIT
250 OK
Expected EOF read from client
Listening on port 1224 ...
Connection request from [127.0.0.1]
220 Welcome
HELO myhost.test.ex
250 Hi
MAIL FROM:<>
250 OK
RCPT TO:<def@no>
250 OK
QUIT
250 OK
End of script