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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: exim-cvs
Betreff: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src verify.c exim/exim-test-orig/AutoTest/confs 617 exim/exim-test-orig/AutoTest/log 617 exim/exim-test-orig/AutoTest/rejectlog
ph10 2005/06/23 11:02:13 BST

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         verify.c 
  Added files:
    exim-test-orig/AutoTest/confs 617 
    exim-test-orig/AutoTest/log 617 
    exim-test-orig/AutoTest/rejectlog 617 
    exim-test-orig/AutoTest/scripts 617 
    exim-test-orig/AutoTest/stdout 617 
  Log:
  Fix crash when callout to an address routed by a verify_only router with
  no transport.


  Revision  Changes    Path
  1.170     +7 -0      exim/exim-doc/doc-txt/ChangeLog
  1.21      +5 -1      exim/exim-src/src/verify.c
  1.1       +35 -0     exim/exim-test-orig/AutoTest/confs/617 (new)
  1.1       +2 -0      exim/exim-test-orig/AutoTest/log/617 (new)
  1.1       +2 -0      exim/exim-test-orig/AutoTest/rejectlog/617 (new)
  1.1       +6 -0      exim/exim-test-orig/AutoTest/scripts/617 (new)
  1.1       +8 -0      exim/exim-test-orig/AutoTest/stdout/617 (new)


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- ChangeLog    22 Jun 2005 15:44:37 -0000    1.169
  +++ ChangeLog    23 Jun 2005 10:02:13 -0000    1.170
  @@ -1,4 +1,4 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.169 2005/06/22 15:44:37 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.170 2005/06/23 10:02:13 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  @@ -186,6 +186,13 @@
         that detects such things. There doesn't seem to be a gcc warning option
         for this - only an attribute that has to be put on the function's
         prototype. I'm sure I haven't caught all of these, but it's a start.
  +
  +PH/27 If a dnslookup or manualroute router is set with verify=only, it need not
  +      specify a transport. However, if an address that was verified by such a
  +      router was the subject of a callout, Exim crashed because it tried to
  +      read the rcpt_include_affixes from the non-existent transport. Now it
  +      just assumes that the setting of that option is false. This bug was
  +      introduced by 4.51/PH/31.



Exim version 4.51

  Index: verify.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/verify.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- verify.c    22 Jun 2005 10:17:23 -0000    1.20
  +++ verify.c    23 Jun 2005 10:02:13 -0000    1.21
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/verify.c,v 1.20 2005/06/22 10:17:23 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/verify.c,v 1.21 2005/06/23 10:02:13 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -550,10 +550,14 @@


       if (new_domain_record.random_result != ccache_accept && done)
         {
  +      /* Get the rcpt_include_affixes flag from the transport if there is one,
  +      but assume FALSE if there is not. */
  +
         done =
           smtp_write_command(&outblock, FALSE, "RCPT TO:<%.1000s>\r\n",
             transport_rcpt_address(addr,
  -            addr->transport->rcpt_include_affixes)) >= 0 &&
  +            (addr->transport == NULL)? FALSE :
  +             addr->transport->rcpt_include_affixes)) >= 0 &&
           smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
             '2', callout);



Index: 617
====================================================================
# Exim test configuration 617

# Macros are set externally in order to get the path
# of the Exim that is being tested, and the directory
# in which the test data lives.

exim_path = EXIM_PATH
primary_hostname = myhost.test.ex
spool_directory = DIR/spool

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

acl_smtp_rcpt = check_rcpt


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

begin acl

  check_rcpt:
    accept  verify = sender/callout



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

begin routers

  r1:
    driver = manualroute
    route_list = * 127.0.0.1
    self = send 
    verify_only   



# End

Index: 617
====================================================================
1999-03-02 09:44:33 U=ph10 sender verify fail for <unknown@???>: response to "RCPT TO:<unknown@???>" from 127.0.0.1 [127.0.0.1] was: 550 unrouteable address
1999-03-02 09:44:33 U=ph10 F=<unknown@???> rejected RCPT <unknown@???>: Sender verify failed

Index: 617
====================================================================
1999-03-02 09:44:33 U=ph10 sender verify fail for <unknown@???>: response to "RCPT TO:<unknown@???>" from 127.0.0.1 [127.0.0.1] was: 550 unrouteable address
1999-03-02 09:44:33 U=ph10 F=<unknown@???> rejected RCPT <unknown@???>: Sender verify failed

Index: 617
====================================================================
0 callout with no transport
exim -bs
mail from:<unknown@???>
rcpt to:<unknown@???>
quit
****

  Index: 617
  ====================================================================
  220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
  250 OK
  550-Verification failed for <unknown@???>
  550-Called:   127.0.0.1
  550-Sent:     RCPT TO:<unknown@???>
  550-Response: 550 unrouteable address
  550 Sender verify failed
  221 myhost.test.ex closing connection