Re: [Exim] Retry rules ignored on failing recipient

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Dean Brooks
CC: exim-users
Subject: Re: [Exim] Retry rules ignored on failing recipient
On Mon, 16 Oct 2000, Philip Hazel wrote:

>
> Ah. Maybe it is cycling through this group of messages which are all
> waiting for the same host. I think I can see how this might happen. I
> will set up some tests and see if I can reproduce the problem, and if so
> I will fix it. If not, I'll get back to you for more info.


My hunch was right. I found it. Here's a patch against 3.16.

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



*** exim-3.16/src/transports/smtp.c Thu Jul 20 12:08:51 2000
--- transports/smtp.c    Mon Oct 16 15:15:49 2000
***************
*** 476,481 ****
--- 476,482 ----
  int sock;
  BOOL ok = FALSE;
  BOOL send_rset = TRUE;
+ BOOL completed_address = FALSE;
  BOOL send_quit = TRUE;
  BOOL setting_up = TRUE;
  smtp_transport_options_block *ob =
***************
*** 728,733 ****
--- 729,735 ----
  address_count = 0;
  ok = FALSE;
  send_rset = TRUE;
+ completed_address = FALSE;



/* Initiate a message transfer. The user_null_sender flag is set if a local
***************
*** 856,862 ****

    if (smtp_read_response(sock,buffer,sizeof(buffer),'2',ob->command_timeout))
      {
!     ok = TRUE;
      addr->transport_return = PENDING_OK;


      /* If addr->dr_retry_exists is set, there was a routing or directing
--- 858,864 ----


    if (smtp_read_response(sock,buffer,sizeof(buffer),'2',ob->command_timeout))
      {
!     ok = completed_address = TRUE;
      addr->transport_return = PENDING_OK;


      /* If addr->dr_retry_exists is set, there was a routing or directing
***************
*** 909,915 ****
--- 911,920 ----
      fprintf(message_log, "%s %s\n", tod_stamp(tod_log), addr->message);


      if (buffer[0] == '5')
+       {
        addr->transport_return = FAIL;
+       completed_address = TRUE;
+       }
      else
        {
        /* Log temporary errors if there are more hosts to be tried. */
***************
*** 1180,1186 ****
    "yield=%d first_address=%d\n", ok, send_quit, send_rset, continue_more,
    yield, first_addr);


! if (ok && send_quit)
    {
    BOOL more;
    if (first_addr != NULL || continue_more ||
--- 1185,1191 ----
    "yield=%d first_address=%d\n", ok, send_quit, send_rset, continue_more,
    yield, first_addr);


! if (completed_address && ok && send_quit)
    {
    BOOL more;
    if (first_addr != NULL || continue_more ||