Deleted Added
full compact
usersmtp.c (110560) usersmtp.c (112810)
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: usersmtp.c,v 8.437.2.8 2002/12/12 17:40:07 ca Exp $")
16SM_RCSID("@(#)$Id: usersmtp.c,v 8.437.2.9 2003/03/15 23:57:52 gshapiro Exp $")
17
18#include <sysexits.h>
19
20
21extern void markfailure __P((ENVELOPE *, ADDRESS *, MCI *, int, bool));
22static void datatimeout __P((void));
23static void esmtp_check __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
24static void helo_options __P((char *, bool, MAILER *, MCI *, ENVELOPE *));

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

2818
2819int
2820smtpgetstat(m, mci, e)
2821 MAILER *m;
2822 MCI *mci;
2823 ENVELOPE *e;
2824{
2825 int r;
17
18#include <sysexits.h>
19
20
21extern void markfailure __P((ENVELOPE *, ADDRESS *, MCI *, int, bool));
22static void datatimeout __P((void));
23static void esmtp_check __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
24static void helo_options __P((char *, bool, MAILER *, MCI *, ENVELOPE *));

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

2818
2819int
2820smtpgetstat(m, mci, e)
2821 MAILER *m;
2822 MCI *mci;
2823 ENVELOPE *e;
2824{
2825 int r;
2826 int off;
2826 int status, xstat;
2827 char *enhsc;
2828
2829 enhsc = NULL;
2830
2831 /* check for the results of the transaction */
2832 r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc);
2833 if (r < 0)

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

2839 status = xstat = EX_OK;
2840 else if (REPLYCLASS(r) != 5)
2841 status = xstat = EX_PROTOCOL;
2842 else if (REPLYTYPE(r) == 5)
2843 status = EX_UNAVAILABLE;
2844 else
2845 status = EX_PROTOCOL;
2846 if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
2827 int status, xstat;
2828 char *enhsc;
2829
2830 enhsc = NULL;
2831
2832 /* check for the results of the transaction */
2833 r = reply(m, mci, e, TimeOuts.to_datafinal, NULL, &enhsc);
2834 if (r < 0)

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

2840 status = xstat = EX_OK;
2841 else if (REPLYCLASS(r) != 5)
2842 status = xstat = EX_PROTOCOL;
2843 else if (REPLYTYPE(r) == 5)
2844 status = EX_UNAVAILABLE;
2845 else
2846 status = EX_PROTOCOL;
2847 if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
2847 (r = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
2848 r += 5;
2848 (off = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
2849 off += 5;
2849 else
2850 else
2850 r = 4;
2851 e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[r]);
2852 mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)),
2853 SmtpReplyBuffer);
2851 off = 4;
2852 e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[off]);
2853 mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)), SmtpReplyBuffer);
2854 if (LogLevel > 1 && status == EX_PROTOCOL)
2855 {
2856 sm_syslog(LOG_CRIT, e->e_id,
2857 "%.100s: SMTP DATA-3 protocol error: %s",
2858 CurHostName,
2859 shortenstring(SmtpReplyBuffer, 403));
2860 }
2861 return status;

--- 461 unchanged lines hidden ---
2854 if (LogLevel > 1 && status == EX_PROTOCOL)
2855 {
2856 sm_syslog(LOG_CRIT, e->e_id,
2857 "%.100s: SMTP DATA-3 protocol error: %s",
2858 CurHostName,
2859 shortenstring(SmtpReplyBuffer, 403));
2860 }
2861 return status;

--- 461 unchanged lines hidden ---