SCCS-vsn: usr.sbin/sendmail/src/headers.c 6.28
SCCS-vsn: usr.sbin/sendmail/src/main.c 6.51
SCCS-vsn: usr.sbin/sendmail/src/domain.c 6.18
SCCS-vsn: usr.sbin/sendmail/src/collect.c 6.13
SCCS-vsn: usr.sbin/sendmail/src/version.c 6.50
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 6.28
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 6.38
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 6.59
SCCS-vsn: usr.sbin/sendmail/src/queue.c 6.44
-static char sccsid[] = "@(#)collect.c 6.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)collect.c 6.13 (Berkeley) %G%";
#endif /* not lint */
# include <errno.h>
#endif /* not lint */
# include <errno.h>
** Examples are who is the from person & the date.
*/
** Examples are who is the from person & the date.
*/
+ eatheader(e, !requeueflag);
/*
** Add an Apparently-To: line if we have no recipient lines.
/*
** Add an Apparently-To: line if we have no recipient lines.
-static char sccsid[] = "@(#)deliver.c 6.58 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c 6.59 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
int otherowners;
register ENVELOPE *ee;
ENVELOPE *splitenv = NULL;
int otherowners;
register ENVELOPE *ee;
ENVELOPE *splitenv = NULL;
int pid;
#ifdef LOCKF
struct flock lfd;
int pid;
#ifdef LOCKF
struct flock lfd;
if (mode != SM_VERIFY &&
shouldqueue(e->e_msgpriority, e->e_ctime))
mode = SM_QUEUE;
if (mode != SM_VERIFY &&
shouldqueue(e->e_msgpriority, e->e_ctime))
mode = SM_QUEUE;
+ announcequeueup = mode == SM_QUEUE;
+ else
+ announcequeueup = FALSE;
#ifndef lint
#ifdef NAMED_BIND
#ifndef lint
#ifdef NAMED_BIND
-static char sccsid[] = "@(#)domain.c 6.17 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c 6.18 (Berkeley) %G% (with name server)";
-static char sccsid[] = "@(#)domain.c 6.17 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c 6.18 (Berkeley) %G% (without name server)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
- prefer[0] = 0;
- weight[0] = 0;
-
- /* sort the records */
- for (i = 0; i < nmx; i++)
- for (j = i + 1; j < nmx; j++)
+ /* sort the records */
+ for (i = 0; i < nmx; i++)
- if (prefer[i] > prefer[j] ||
- (prefer[i] == prefer[j] && weight[i] > weight[j]))
+ for (j = i + 1; j < nmx; j++)
- register int temp;
- register char *temp1;
-
- temp = prefer[i];
- prefer[i] = prefer[j];
- prefer[j] = temp;
- temp1 = mxhosts[i];
- mxhosts[i] = mxhosts[j];
- mxhosts[j] = temp1;
- temp = weight[i];
- weight[i] = weight[j];
- weight[j] = temp;
+ if (prefer[i] > prefer[j] ||
+ (prefer[i] == prefer[j] && weight[i] > weight[j]))
+ {
+ register int temp;
+ register char *temp1;
+
+ temp = prefer[i];
+ prefer[i] = prefer[j];
+ prefer[j] = temp;
+ temp1 = mxhosts[i];
+ mxhosts[i] = mxhosts[j];
+ mxhosts[j] = temp1;
+ temp = weight[i];
+ weight[i] = weight[j];
+ weight[j] = temp;
+ }
- }
- if (seenlocal && prefer[i] >= localpref)
- {
- /*
- * truncate higher pref part of list; if we're
- * the best choice left, we should have realized
- * awhile ago that this was a local delivery.
- */
- if (i == 0)
+ if (seenlocal && prefer[i] >= localpref)
- *rcode = EX_CONFIG;
- return (-1);
+ /*
+ * truncate higher pref part of list; if we're
+ * the best choice left, we should have realized
+ * awhile ago that this was a local delivery.
+ */
+ if (i == 0)
+ {
+ *rcode = EX_CONFIG;
+ return (-1);
+ }
+ nmx = i;
+ break;
-static char sccsid[] = "@(#)headers.c 6.27 (Berkeley) %G%";
+static char sccsid[] = "@(#)headers.c 6.28 (Berkeley) %G%";
#endif /* not lint */
# include <errno.h>
#endif /* not lint */
# include <errno.h>
**
** Parameters:
** e -- the envelope to process.
**
** Parameters:
** e -- the envelope to process.
+** full -- if set, do full processing (e.g., compute
+** message priority).
** Aborts the message if the hop count is exceeded.
*/
** Aborts the message if the hop count is exceeded.
*/
{
register HDR *h;
register char *p;
{
register HDR *h;
register char *p;
}
/* save the message-id for logging */
}
/* save the message-id for logging */
- if (!bitset(EF_QUEUERUN, e->e_flags) && h->h_value != NULL &&
+ if (full && h->h_value != NULL &&
strcmp(h->h_field, "message-id") == 0)
{
msgid = h->h_value;
strcmp(h->h_field, "message-id") == 0)
{
msgid = h->h_value;
p = hvalue("precedence", e);
if (p != NULL)
e->e_class = priencode(p);
p = hvalue("precedence", e);
if (p != NULL)
e->e_class = priencode(p);
- if (!bitset(EF_QUEUERUN, e->e_flags))
e->e_msgpriority = e->e_msgsize
- e->e_class * WkClassFact
+ e->e_nrcpts * WkRecipFact;
e->e_msgpriority = e->e_msgsize
- e->e_class * WkClassFact
+ e->e_nrcpts * WkRecipFact;
- if (!bitset(EF_QUEUERUN, e->e_flags) && LogLevel > 4)
+ if (full && LogLevel > 4)
{
char *name;
char hbuf[MAXNAME];
{
char *name;
char hbuf[MAXNAME];
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 6.50 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 6.51 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
/* collect body for UUCP return */
if (OpMode != MD_VERIFY)
/* collect body for UUCP return */
if (OpMode != MD_VERIFY)
- collect(FALSE, CurEnv);
+ collect(FALSE, FALSE, CurEnv);
finis();
}
if (OpMode == MD_VERIFY)
finis();
}
if (OpMode == MD_VERIFY)
CurEnv->e_to = NULL;
if (OpMode != MD_VERIFY || GrabTo)
CurEnv->e_to = NULL;
if (OpMode != MD_VERIFY || GrabTo)
- collect(FALSE, CurEnv);
+ collect(FALSE, FALSE, CurEnv);
errno = 0;
/* collect statistics */
errno = 0;
/* collect statistics */
#ifndef lint
#ifdef QUEUE
#ifndef lint
#ifdef QUEUE
-static char sccsid[] = "@(#)queue.c 6.43 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c 6.44 (Berkeley) %G% (with queueing)";
-static char sccsid[] = "@(#)queue.c 6.43 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c 6.44 (Berkeley) %G% (without queueing)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
}
e->e_flags |= EF_INQUEUE;
}
e->e_flags |= EF_INQUEUE;
+ eatheader(e, requeueflag);
if (requeueflag)
queueup(e, TRUE, FALSE);
if (requeueflag)
queueup(e, TRUE, FALSE);
-static char sccsid[] = "@(#)savemail.c 6.27 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 6.28 (Berkeley) %G%";
#endif /* not lint */
# include <pwd.h>
#endif /* not lint */
# include <pwd.h>
CurEnv = ee;
define('f', "\201n", ee);
define('x', "Mail Delivery Subsystem", ee);
CurEnv = ee;
define('f', "\201n", ee);
define('x', "Mail Delivery Subsystem", ee);
/* actually deliver the error message */
sendall(ee, SM_DEFAULT);
/* actually deliver the error message */
sendall(ee, SM_DEFAULT);
-static char sccsid[] = "@(#)srvrsmtp.c 6.37 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.38 (Berkeley) %G% (with SMTP)";
-static char sccsid[] = "@(#)srvrsmtp.c 6.37 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 6.38 (Berkeley) %G% (without SMTP)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
+ /* check to see if we need to re-expand aliases */
+ for (a = e->e_sendqueue; a != NULL; a = a->q_next)
+ {
+ if (bitset(QVERIFIED, a->q_flags))
+ break;
+ }
+
/* collect the text of the message */
SmtpPhase = "collect";
setproctitle("%s %s: %s", e->e_id, CurHostName, inp);
/* collect the text of the message */
SmtpPhase = "collect";
setproctitle("%s %s: %s", e->e_id, CurHostName, inp);
+ collect(TRUE, a != NULL, e);
e->e_xfp = freopen(queuename(e, 'x'), "w", e->e_xfp);
id = e->e_id;
e->e_xfp = freopen(queuename(e, 'x'), "w", e->e_xfp);
id = e->e_id;
- /* check to see if we need to re-expand aliases */
- for (a = e->e_sendqueue; a != NULL; a = a->q_next)
- {
- if (bitset(QVERIFIED, a->q_flags))
- break;
- }
-
/* send to all recipients */
sendall(e, Verbose ? SM_DELIVER : SM_QUEUE);
e->e_to = NULL;
/* send to all recipients */
sendall(e, Verbose ? SM_DELIVER : SM_QUEUE);
e->e_to = NULL;
-static char sccsid[] = "@(#)version.c 6.49 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c 6.50 (Berkeley) %G%";
-char Version[] = "ALPHA-6.49";
+char Version[] = "ALPHA-6.50";