From 55f617e6f03e9e96b121cdde8289102d3a460b4e Mon Sep 17 00:00:00 2001 From: gshapiro Date: Sat, 8 Feb 2003 20:35:51 +0000 Subject: Resolve conflicts from sendmail 8.12.7 import --- contrib/sendmail/src/conf.c | 64 +++++++++++++++++++++++++++++++++-------- contrib/sendmail/src/conf.h | 5 +++- contrib/sendmail/src/headers.c | 6 ++-- contrib/sendmail/src/mailq.1 | 26 +++++++++++++++-- contrib/sendmail/src/mci.c | 4 ++- contrib/sendmail/src/savemail.c | 22 ++------------ 6 files changed, 88 insertions(+), 39 deletions(-) (limited to 'contrib/sendmail/src') diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c index e97b09d..3460c1a 100644 --- a/contrib/sendmail/src/conf.c +++ b/contrib/sendmail/src/conf.c @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: conf.c,v 8.972.2.5 2002/08/16 14:56:01 ca Exp $") +SM_RCSID("@(#)$Id: conf.c,v 8.972.2.25 2002/12/12 21:19:29 ca Exp $") #include @@ -30,7 +30,6 @@ SM_RCSID("@(#)$Id: conf.c,v 8.972.2.5 2002/08/16 14:56:01 ca Exp $") # include #endif /* HASULIMIT && defined(HPUX11) */ - static void setupmaps __P((void)); static void setupmailers __P((void)); static void setupqueues __P((void)); @@ -366,6 +365,12 @@ setdefaults(e) #if MILTER InputFilters[0] = NULL; #endif /* MILTER */ +#if _FFR_REJECT_LOG + RejectLogInterval = 3 HOURS; +#endif /* _FFR_REJECT_LOG */ +#if _FFR_REQ_DIR_FSYNC_OPT + RequiresDirfsync = true; +#endif /* _FFR_REQ_DIR_FSYNC_OPT */ setupmaps(); setupqueues(); setupmailers(); @@ -2172,6 +2177,10 @@ refuseconnections(name, e, d, active) { static time_t lastconn[MAXDAEMONS]; static int conncnt[MAXDAEMONS]; +#if _FFR_REJECT_LOG + static time_t firstrejtime[MAXDAEMONS]; + static time_t nextlogtime[MAXDAEMONS]; +#endif /* _FFR_REJECT_LOG */ #if XLA if (!xla_smtp_ok()) @@ -2209,12 +2218,35 @@ refuseconnections(name, e, d, active) sm_getla(); if (RefuseLA > 0 && CurrentLA >= RefuseLA) { +# if _FFR_REJECT_LOG + time_t now; + +# define R2_MSG_LA "have been rejecting connections on daemon %s for %s" +# endif /* _FFR_REJECT_LOG */ # define R_MSG_LA "rejecting connections on daemon %s: load average: %d" sm_setproctitle(true, e, R_MSG_LA, name, CurrentLA); if (LogLevel > 8) - sm_syslog(LOG_INFO, NOQID, R_MSG_LA, name, CurrentLA); + sm_syslog(LOG_NOTICE, NOQID, R_MSG_LA, name, CurrentLA); +#if _FFR_REJECT_LOG + now = curtime(); + if (firstrejtime[d] == 0) + { + firstrejtime[d] = now; + nextlogtime[d] = now + RejectLogInterval; + } + else if (nextlogtime[d] < now) + { + sm_syslog(LOG_ERR, NOQID, R2_MSG_LA, name, + pintvl(now - firstrejtime[d], true)); + nextlogtime[d] = now + RejectLogInterval; + } +#endif /* _FFR_REJECT_LOG */ return true; } +#if _FFR_REJECT_LOG + else + firstrejtime[d] = 0; +#endif /* _FFR_REJECT_LOG */ if (DelayLA > 0 && CurrentLA >= DelayLA) { @@ -3069,13 +3101,13 @@ static char *DefaultUserShells[] = # ifdef sgi "/sbin/sh", /* SGI's shells really live in /sbin */ "/usr/bin/sh", - "/sbin/bsh", /* classic borne shell */ + "/sbin/bsh", /* classic Bourne shell */ "/bin/bsh", "/usr/bin/bsh", "/sbin/csh", /* standard csh */ "/bin/csh", "/usr/bin/csh", - "/sbin/jsh", /* classic borne shell w/ job control*/ + "/sbin/jsh", /* classic Bourne shell w/ job control*/ "/bin/jsh", "/usr/bin/jsh", "/bin/ksh", /* Korn shell */ @@ -3681,9 +3713,6 @@ chownsafe(fd, safedir) # endif /* RLIMIT_NEEDS_SYS_TIME_H */ # include #endif /* HASSETRLIMIT */ -#ifndef FD_SETSIZE -# define FD_SETSIZE 256 -#endif /* ! FD_SETSIZE */ void resetlimits() @@ -5887,6 +5916,9 @@ char *FFRCompileOptions[] = #if _FFR_DAEMON_NETUNIX "_FFR_DAEMON_NETUNIX", #endif /* _FFR_DAEMON_NETUNIX */ +#if _FFR_DEAL_WITH_ERROR_SSL + "_FFR_DEAL_WITH_ERROR_SSL", +#endif /* _FFR_DEAL_WITH_ERROR_SSL */ #if _FFR_DEPRECATE_MAILER_FLAG_I "_FFR_DEPRECATE_MAILER_FLAG_I", #endif /* _FFR_DEPRECATE_MAILER_FLAG_I */ @@ -5960,6 +5992,9 @@ char *FFRCompileOptions[] = "_FFR_MAX_FORWARD_ENTRIES", #endif /* _FFR_MAX_FORWARD_ENTRIES */ #if MILTER +# if _FFR_MILTER_421 + "_FFR_MILTER_421", +# endif /* _FFR_MILTER_421 */ # if _FFR_MILTER_PERDAEMON "_FFR_MILTER_PERDAEMON", # endif /* _FFR_MILTER_PERDAEMON */ @@ -5968,10 +6003,6 @@ char *FFRCompileOptions[] = /* Steven Pitzl */ "_FFR_NODELAYDSN_ON_HOLD", #endif /* _FFR_NODELAYDSN_ON_HOLD */ -#if _FFR_NONSTOP_PERSISTENCE -/* Suggested by Jan Krueger of digitalanswers communications consulting gmbh. */ - "_FFR_NONSTOP_PERSISTENCE", -#endif /* _FFR_NONSTOP_PERSISTENCE */ #if _FFR_NO_PIPE "_FFR_NO_PIPE", #endif /* _FFR_NO_PIPE */ @@ -5997,6 +6028,12 @@ char *FFRCompileOptions[] = #if _FFR_REDIRECTEMPTY "_FFR_REDIRECTEMPTY", #endif /* _FFR_REDIRECTEMPTY */ +#if _FFR_REJECT_LOG + "_FFR_REJECT_LOG", +#endif /* _FFR_REJECT_LOG */ +#if _FFR_REQ_DIR_FSYNC_OPT + "_FFR_REQ_DIR_FSYNC_OPT", +#endif /* _FFR_REQ_DIR_FSYNC_OPT */ #if _FFR_RESET_MACRO_GLOBALS "_FFR_RESET_MACRO_GLOBALS", #endif /* _FFR_RESET_MACRO_GLOBALS */ @@ -6029,6 +6066,9 @@ char *FFRCompileOptions[] = /* Chris Adams of HiWAAY Informations Services */ "_FFR_SPT_ALIGN", #endif /* _FFR_SPT_ALIGN */ +#if _FFR_STRIPBACKSL + "_FFR_STRIPBACKSL", +#endif /* _FFR_STRIPBACKSL */ #if _FFR_TIMERS "_FFR_TIMERS", #endif /* _FFR_TIMERS */ diff --git a/contrib/sendmail/src/conf.h b/contrib/sendmail/src/conf.h index f14f3c4..8e48ec6 100644 --- a/contrib/sendmail/src/conf.h +++ b/contrib/sendmail/src/conf.h @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 8.563 2002/06/04 02:13:50 geir Exp $ + * $Id: conf.h,v 8.563.2.3 2002/10/31 03:28:36 ca Exp $ */ /* @@ -63,6 +63,9 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */ #define MAXLINE 2048 /* max line length */ #define MAXNAME 256 /* max length of a name */ +#ifndef MAXAUTHINFO +# define MAXAUTHINFO 100 /* max length of authinfo token */ +#endif /* ! MAXAUTHINFO */ #define MAXPV 256 /* max # of parms to mailers */ #define MAXATOM 1000 /* max atoms per address */ #define MAXRWSETS 200 /* max # of sets of rewriting rules */ diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c index 385d7a0..a474de0 100644 --- a/contrib/sendmail/src/headers.c +++ b/contrib/sendmail/src/headers.c @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: headers.c,v 8.266.4.1 2002/08/16 14:56:01 ca Exp $") +SM_RCSID("@(#)$Id: headers.c,v 8.266.4.2 2002/09/23 23:42:02 ca Exp $") static size_t fix_mime_header __P((char *)); static int priencode __P((char *)); @@ -930,7 +930,7 @@ logsender(e, msgid) ", daemon=%.20s", p); sbp += strlen(sbp); } - sm_syslog(LOG_INFO, e->e_id, "%.850s, relay=%.100s", sbuf, name); + sm_syslog(LOG_INFO, e->e_id, "%.850s, relay=%s", sbuf, name); #else /* (SYSLOG_BUFSIZE) >= 256 */ @@ -962,7 +962,7 @@ logsender(e, msgid) sbp += strlen(sbp); } sm_syslog(LOG_INFO, e->e_id, - "%.400srelay=%.100s", sbuf, name); + "%.400srelay=%s", sbuf, name); #endif /* (SYSLOG_BUFSIZE) >= 256 */ } /* diff --git a/contrib/sendmail/src/mailq.1 b/contrib/sendmail/src/mailq.1 index 26d7096..dae4e32 100644 --- a/contrib/sendmail/src/mailq.1 +++ b/contrib/sendmail/src/mailq.1 @@ -9,15 +9,16 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: mailq.1,v 8.19 2002/04/12 05:07:58 gshapiro Exp $ +.\" $Id: mailq.1,v 8.19.2.1 2002/09/26 23:03:39 gshapiro Exp $ .\" -.TH MAILQ 1 "$Date: 2000/12/23 19:37:48 $" +.TH MAILQ 1 "$Date: 2002/09/26 23:03:39 $" .SH NAME mailq \- print the mail queue .SH SYNOPSIS .B mailq .RB [ \-Ac ] +.RB [ \-q... ] .RB [ \-v ] .SH DESCRIPTION .B Mailq @@ -54,6 +55,27 @@ Show the mail submission queue specified in instead of the MTA queue specified in .IR /etc/mail/sendmail.cf . .TP +\fB\-q\fR[\fI!\fR]I substr +Limit processed jobs to those containing +.I substr +as a substring of the queue id or not when +.I ! +is specified. +.TP +\fB\-q\fR[\fI!\fR]R substr +Limit processed jobs to those containing +.I substr +as a substring of one of the recipients or not when +.I ! +is specified. +.TP +\fB\-q\fR[\fI!\fR]S substr +Limit processed jobs to those containing +.I substr +as a substring of the sender or not when +.I ! +is specified. +.TP .B \-v Print verbose information. This adds the priority of the message and diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c index 7d1a4de..690d3ef 100644 --- a/contrib/sendmail/src/mci.c +++ b/contrib/sendmail/src/mci.c @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: mci.c,v 8.205 2002/05/24 18:53:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: mci.c,v 8.205.2.2 2002/11/26 19:15:19 gshapiro Exp $") #if NETINET || NETINET6 # include @@ -1246,8 +1246,10 @@ mci_print_persistent(pathname, hostname) locked ? '*' : ' ', hostname, pintvl(curtime() - mcib.mci_lastuse, true)); if (mcib.mci_rstatus != NULL) + { (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "%.*s\n", width, mcib.mci_rstatus); + } else if (mcib.mci_exitstat == EX_TEMPFAIL && mcib.mci_errno != 0) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "Deferred: %.*s\n", width - 10, diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c index 61e6bb8..b9d7b59 100644 --- a/contrib/sendmail/src/savemail.c +++ b/contrib/sendmail/src/savemail.c @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: savemail.c,v 8.299 2002/05/24 20:50:17 gshapiro Exp $") +SM_RCSID("@(#)$Id: savemail.c,v 8.299.2.1 2002/10/23 15:08:47 ca Exp $") static void errbody __P((MCI *, ENVELOPE *, char *)); static bool pruneroute __P((char *)); @@ -547,25 +547,7 @@ returntosender(msg, returnq, flags, e) macdefine(&ee->e_macro, A_PERM, 'r', ""); macdefine(&ee->e_macro, A_PERM, 's', "localhost"); macdefine(&ee->e_macro, A_PERM, '_', "localhost"); -#if SASL - macdefine(&ee->e_macro, A_PERM, macid("{auth_type}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{auth_authen}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{auth_author}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{auth_ssf}"), ""); -#endif /* SASL */ -#if STARTTLS - macdefine(&ee->e_macro, A_PERM, macid("{cert_issuer}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{cert_subject}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{cipher_bits}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{cipher}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{tls_version}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{verify}"), ""); -# if _FFR_TLS_1 - macdefine(&ee->e_macro, A_PERM, macid("{alg_bits}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{cn_issuer}"), ""); - macdefine(&ee->e_macro, A_PERM, macid("{cn_subject}"), ""); -# endif /* _FFR_TLS_1 */ -#endif /* STARTTLS */ + clrsessenvelope(ee); ee->e_puthdr = putheader; ee->e_putbody = errbody; -- cgit v1.1