~ubuntu-branches/ubuntu/hardy/exim4/hardy-proposed

« back to all changes in this revision

Viewing changes to src/transports/lmtp.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Haber
  • Date: 2005-07-02 06:08:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050702060834-qk17pd52kb9nt3bj
Tags: 4.52-1
* new upstream version 4.51. (mh)
  * adapt 70_remove_exim-users_references
  * remove 37_gnutlsparams
  * adapt 36_pcre
  * adapt 31_eximmanpage
* fix package priorities to have them in sync with override again. (mh)
* Fix error in nb (Norwegian) translation.
  Thanks to Helge Hafting. (mh). Closes: #315775
* Standards-Version: 3.6.2, no changes needed. (mh)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Cambridge: exim/exim-src/src/transports/lmtp.c,v 1.5 2005/06/27 14:29:44 ph10 Exp $ */
 
2
 
1
3
/*************************************************
2
4
*     Exim - an Internet mail transport agent    *
3
5
*************************************************/
4
6
 
5
 
/* Copyright (c) University of Cambridge 1995 - 2004 */
 
7
/* Copyright (c) University of Cambridge 1995 - 2005 */
6
8
/* See the file NOTICE for conditions of use and distribution. */
7
9
 
8
10
 
139
141
 
140
142
if (*errno_value == ERRNO_FILTER_FAIL)
141
143
  {
142
 
  *message = string_sprintf("transport filter process failed (%d)", more_errno);
 
144
  *message = string_sprintf("transport filter process failed (%d)%s",
 
145
    more_errno,
 
146
    (more_errno == EX_EXECFAILED)? ": unable to execute command" : "");
143
147
  return FALSE;
144
148
  }
145
149
 
351
355
    while (*t != 0)
352
356
      {
353
357
      while (*t != 0 && *t != '\n') t++;
354
 
      debug_printf("  %s %*s\n", (s == ptr)? "LMTP<<" : "      ", t-s, s);
 
358
      debug_printf("  %s %*s\n", (s == ptr)? "LMTP<<" : "      ",
 
359
        (int)(t-s), s);
355
360
      if (*t == 0) break;
356
361
      s = t = t + 1;
357
362
      }
583
588
    if (errno != 0 || buffer[0] == 0) goto RESPONSE_FAILED;
584
589
    addr->message = string_sprintf("LMTP error after %s: %s", big_buffer,
585
590
      string_printing(buffer));
586
 
    if (buffer[0] == '5') addr->transport_return = FAIL;
 
591
    if (buffer[0] == '5') addr->transport_return = FAIL; else
 
592
      {
 
593
      int bincode = (buffer[1] - '0')*10 + buffer[2] - '0';
 
594
      addr->basic_errno = ERRNO_RCPT4XX;
 
595
      addr->more_errno |= bincode << 8;
 
596
      }
587
597
    }
588
598
  }
589
599
 
684
694
save_errno = errno;
685
695
addrlist->message = NULL;
686
696
 
687
 
if(check_response(&save_errno, addrlist->more_errno,
 
697
if (check_response(&save_errno, addrlist->more_errno,
688
698
    buffer, &code, &(addrlist->message)))
689
699
  {
690
700
  (void) lmtp_write_command(fd_in, "QUIT\r\n");
730
740
 
731
741
(void)child_close(pid, timeout);
732
742
 
733
 
if (fd_in >= 0) (void) close(fd_in);
734
 
if (fd_out >= 0) (void) fclose(out);
 
743
if (fd_in >= 0) (void)close(fd_in);
 
744
if (fd_out >= 0) (void)fclose(out);
735
745
 
736
746
DEBUG(D_transport)
737
747
  debug_printf("%s transport yields %d\n", tblock->name, yield);