Deleted Added
full compact
savemail.c (111367) savemail.c (132946)
1/*
1/*
2 * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
16SM_RCSID("@(#)$Id: savemail.c,v 8.299.2.1 2002/10/23 15:08:47 ca Exp $")
16SM_RCSID("@(#)$Id: savemail.c,v 8.303 2004/01/14 02:56:51 ca Exp $")
17
18static void errbody __P((MCI *, ENVELOPE *, char *));
19static bool pruneroute __P((char *));
20
21/*
22** SAVEMAIL -- Save mail on error
23**
24** If mailing back errors, mail it back to the originator

--- 44 unchanged lines hidden (view full) ---

69 SM_MBDB_T user;
70
71
72 if (tTd(6, 1))
73 {
74 sm_dprintf("\nsavemail, errormode = %c, id = %s, ExitStat = %d\n e_from=",
75 e->e_errormode, e->e_id == NULL ? "NONE" : e->e_id,
76 ExitStat);
17
18static void errbody __P((MCI *, ENVELOPE *, char *));
19static bool pruneroute __P((char *));
20
21/*
22** SAVEMAIL -- Save mail on error
23**
24** If mailing back errors, mail it back to the originator

--- 44 unchanged lines hidden (view full) ---

69 SM_MBDB_T user;
70
71
72 if (tTd(6, 1))
73 {
74 sm_dprintf("\nsavemail, errormode = %c, id = %s, ExitStat = %d\n e_from=",
75 e->e_errormode, e->e_id == NULL ? "NONE" : e->e_id,
76 ExitStat);
77 printaddr(&e->e_from, false);
77 printaddr(sm_debug_file(), &e->e_from, false);
78 }
79
80 if (e->e_id == NULL)
81 {
82 /* can't return a message with no id */
83 return panic;
84 }
85

--- 87 unchanged lines hidden (view full) ---

173
174 case ESM_REPORT:
175
176 /*
177 ** If the user is still logged in on the same terminal,
178 ** then write the error messages back to hir (sic).
179 */
180
78 }
79
80 if (e->e_id == NULL)
81 {
82 /* can't return a message with no id */
83 return panic;
84 }
85

--- 87 unchanged lines hidden (view full) ---

173
174 case ESM_REPORT:
175
176 /*
177 ** If the user is still logged in on the same terminal,
178 ** then write the error messages back to hir (sic).
179 */
180
181#if USE_TTYPATH
181 p = ttypath();
182 p = ttypath();
183#else /* USE_TTYPATH */
184 p = NULL;
185#endif /* USE_TTYPATH */
186
182 if (p == NULL || sm_io_reopen(SmFtStdio,
183 SM_TIME_DEFAULT,
184 p, SM_IO_WRONLY, NULL,
185 smioout) == NULL)
186 {
187 state = ESM_MAIL;
188 break;
189 }

--- 323 unchanged lines hidden (view full) ---

513
514 if (msg == NULL)
515 msg = "Unable to deliver mail";
516
517 if (tTd(6, 1))
518 {
519 sm_dprintf("\n*** Return To Sender: msg=\"%s\", depth=%d, e=%p, returnq=",
520 msg, returndepth, e);
187 if (p == NULL || sm_io_reopen(SmFtStdio,
188 SM_TIME_DEFAULT,
189 p, SM_IO_WRONLY, NULL,
190 smioout) == NULL)
191 {
192 state = ESM_MAIL;
193 break;
194 }

--- 323 unchanged lines hidden (view full) ---

518
519 if (msg == NULL)
520 msg = "Unable to deliver mail";
521
522 if (tTd(6, 1))
523 {
524 sm_dprintf("\n*** Return To Sender: msg=\"%s\", depth=%d, e=%p, returnq=",
525 msg, returndepth, e);
521 printaddr(returnq, true);
526 printaddr(sm_debug_file(), returnq, true);
522 if (tTd(6, 20))
523 {
524 sm_dprintf("Sendq=");
527 if (tTd(6, 20))
528 {
529 sm_dprintf("Sendq=");
525 printaddr(e->e_sendqueue, true);
530 printaddr(sm_debug_file(), e->e_sendqueue, true);
526 }
527 }
528
529 if (++returndepth >= MAXRETURNS)
530 {
531 if (returndepth != MAXRETURNS)
532 syserr("554 5.3.0 returntosender: infinite recursion on %s",
533 returnq->q_paddr);

--- 1149 unchanged lines hidden ---
531 }
532 }
533
534 if (++returndepth >= MAXRETURNS)
535 {
536 if (returndepth != MAXRETURNS)
537 syserr("554 5.3.0 returntosender: infinite recursion on %s",
538 returnq->q_paddr);

--- 1149 unchanged lines hidden ---