Fwd: Re: [Exim] Unexpected callout failure

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Sheldon Hearn
Dátum:  
Címzett: exim-users
Tárgy: Fwd: Re: [Exim] Unexpected callout failure
Any feedback on this patch?

I'm loath to include patches in the FreeBSD port for Exim until I know a
few people are happy with them.

Ciao,
Sheldon.

----- Forwarded message from Philip Hazel <ph10@???> -----

Date: Tue, 15 Jul 2003 15:29:27 +0100 (BST)
From: Philip Hazel <ph10@???>
To: Richard Gilbert <R.Gilbert@???>,
    Ian Jackson <ijackson@???>, gordonb@???
cc: exim-users@???, postmaster@???
Subject: Re: [Exim] Unexpected callout failure


On Wed, 9 Jul 2003, Richard Gilbert wrote:

> I came across this message while searching the archive to answer the
> question as to why callout sender verification was occasionally failing
> with an apparently illegal response to the RSET command.


The patch below should fix this problem. Feedback appreciated...

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.


*** exim-4.20/src/verify.c  Mon May 12 14:39:23 2003
--- verify.c    Tue Jul 15 15:12:09 2003
***************
*** 463,471 ****
        state to send RCPT. Unless there's some problem such as a dropped
        connection, we expect to succeed, because the commands succeeded above. */


!       else
          {
!         if (errno == 0 && randombuffer[0] == '5')
            new_domain_record.random_result = ccache_reject;


          done =
--- 463,471 ----
        state to send RCPT. Unless there's some problem such as a dropped
        connection, we expect to succeed, because the commands succeeded above. */


!       else if (errno == 0)
          {
!         if (randombuffer[0] == '5')
            new_domain_record.random_result = ccache_reject;


          done =
***************
*** 477,483 ****
            smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
              '2', callout);
          }
!    }          /* Random check */


      /* If the host is accepting all local parts, as determined by the "random"
      check, we don't need to waste time doing any further checking. */
--- 477,484 ----
            smtp_read_response(&inblock, responsebuffer, sizeof(responsebuffer),
              '2', callout);
          }
!       else done = FALSE;    /* Some timeout/connection problem */
!    }                /* Random check */


      /* If the host is accepting all local parts, as determined by the "random"
      check, we don't need to waste time doing any further checking. */
***************
*** 531,557 ****
    don't give the IP address because this may be an internal host whose identity
    is not to be widely broadcast. */


!   if (!done && errno == 0)
      {
!     if (*responsebuffer == 0) Ustrcpy(responsebuffer, US"connection dropped");


!     addr->message =
!       string_sprintf("response to \"%s\" from %s [%s] was: %s",
!         big_buffer, host->name, host->address,
!         string_printing(responsebuffer));


!     addr->user_message = is_recipient?
!       string_sprintf("Callout verification failed:\n%s", responsebuffer)
!       :
!       string_sprintf("Called:   %s\nSent:     %s\nResponse: %s",
!         host->address, big_buffer, responsebuffer);


!     /* Hard rejection ends the process */


!     if (responsebuffer[0] == '5')   /* Address rejected */
!       {
!       yield = FAIL;
!       done = TRUE;
        }
      }


--- 532,565 ----
    don't give the IP address because this may be an internal host whose identity
    is not to be widely broadcast. */


!   if (!done)
      {
!     if (errno == ETIMEDOUT)
!       {
!       DEBUG(D_verify) debug_printf("SMTP timeout\n");
!       }
!     else if (errno == 0)
!       {
!       if (*responsebuffer == 0) Ustrcpy(responsebuffer, US"connection dropped");


!       addr->message =
!         string_sprintf("response to \"%s\" from %s [%s] was: %s",
!           big_buffer, host->name, host->address,
!           string_printing(responsebuffer));


!       addr->user_message = is_recipient?
!         string_sprintf("Callout verification failed:\n%s", responsebuffer)
!         :
!         string_sprintf("Called:   %s\nSent:     %s\nResponse: %s",
!           host->address, big_buffer, responsebuffer);


!       /* Hard rejection ends the process */


!       if (responsebuffer[0] == '5')   /* Address rejected */
!         {
!         yield = FAIL;
!         done = TRUE;
!         }
        }
      }




--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##



----- End forwarded message -----