Re: [exim] Batched SMTP and suppress_local_fixups - not work…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Tim Bishop
CC: exim-users
Subject: Re: [exim] Batched SMTP and suppress_local_fixups - not working?
On Tue, 23 Jan 2007, Tim Bishop wrote:

> On closer inspection of the logs that "skipping ACL configuration" line
> happens later on. Comparing a log with -bS and without the former
> doesn't do any ACL stuff in the place where the latter does.


Indeed. It's a bug. The code was never put in place. I have fixed the
problem and committed the patch to CVS, so it should be in tonight's
snapshot. A couple of other things got fixed as well. If you just want
to fix this one thing, the significant patch is below.

Philip

--
Philip Hazel, University of Cambridge Computing Service.



*** exim-4.66/src/exim.c    Mon Jan  8 14:25:36 2007
--- exim.c    Thu Jan 25 15:51:28 2007
***************
*** 4632,4645 ****
          sender_address = raw_sender = real_sender_address;
          sender_address_unrewritten = NULL;
          }
        more = receive_msg(extract_recipients);
        if (message_id[0] == 0)
          {
          if (more) continue;
          exim_exit(EXIT_FAILURE);
          }
        }
!     else exim_exit((rc == 0)? EXIT_SUCCESS : EXIT_FAILURE);
      }


    /* In the non-SMTP case, we have all the information from the command
--- 4637,4672 ----
          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)
          {
          if (more) continue;
          exim_exit(EXIT_FAILURE);
          }
        }
!     else
!       {
!       exim_exit((rc == 0)? EXIT_SUCCESS : EXIT_FAILURE);
!       }
      }


    /* In the non-SMTP case, we have all the information from the command