will fit on non-ID PDP-11's (ugh); put the ugly UUCP hack on a
compilation flag also to emphasize that it sucks eggs; makefile
cleanup.
SCCS-vsn: usr.sbin/sendmail/src/conf.c 3.40
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 3.59
SCCS-vsn: usr.sbin/sendmail/src/version.c 3.68
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.56
SCCS-vsn: usr.sbin/sendmail/src/srvrsmtp.c 3.11
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 3.6
SCCS-vsn: usr.sbin/sendmail/src/queue.c 3.7
-static char SccsId[] = "@(#)conf.c 3.39 %G%";
+static char SccsId[] = "@(#)conf.c 3.40 %G%";
\f/*
** Header info table
** Final (null) entry contains the flags used for any other field.
\f/*
** Header info table
** Final (null) entry contains the flags used for any other field.
char *ConfFile = "/usr/lib/sendmail.cf"; /* runtime configuration */
char *StatFile = "/usr/lib/sendmail.st"; /* statistics summary */
char *HelpFile = "/usr/lib/sendmail.hf"; /* help file */
char *ConfFile = "/usr/lib/sendmail.cf"; /* runtime configuration */
char *StatFile = "/usr/lib/sendmail.st"; /* statistics summary */
char *HelpFile = "/usr/lib/sendmail.hf"; /* help file */
char *QueueDir = "/usr/spool/mqueue"; /* queue of saved mail */
char *QueueDir = "/usr/spool/mqueue"; /* queue of saved mail */
+# else QUEUE
+char *QueueDir = "/tmp"; /* location of temp files */
+# endif QUEUE
char *XcriptFile = "/tmp/mailxXXXXXX"; /* template for transcript */
char *XcriptFile = "/tmp/mailxXXXXXX"; /* template for transcript */
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-static char SccsId[] = "@(#)deliver.c 3.58 %G%";
+static char SccsId[] = "@(#)deliver.c 3.59 %G%";
/*
** DELIVER -- Deliver a message to a list of addresses.
/*
** DELIVER -- Deliver a message to a list of addresses.
if (*mvp == NULL)
{
/* running SMTP */
if (*mvp == NULL)
{
/* running SMTP */
clever = TRUE;
*pvp = NULL;
i = smtpinit(m, pv, (ADDRESS *) NULL);
giveresponse(i, TRUE, m);
clever = TRUE;
*pvp = NULL;
i = smtpinit(m, pv, (ADDRESS *) NULL);
giveresponse(i, TRUE, m);
if (i == EX_TEMPFAIL)
{
QueueUp = TRUE;
tempfail = TRUE;
}
if (i == EX_TEMPFAIL)
{
QueueUp = TRUE;
tempfail = TRUE;
}
+# endif QUEUE
+# else SMTP
+ syserr("SMTP style mailer");
+ return (EX_SOFTWARE);
+# endif SMTP
- if (i == EX_TEMPFAIL)
- {
- QueueUp = TRUE;
- to->q_flags |= QQUEUEUP;
- }
- else if (i != EX_OK)
- to->q_flags |= QBADADDR;
- giveresponse(i, TRUE, m);
+# ifdef QUEUE
+ if (i == EX_TEMPFAIL)
+ {
+ QueueUp = TRUE;
+ to->q_flags |= QQUEUEUP;
+ }
+ else
+# endif QUEUE
+ {
+ to->q_flags |= QBADADDR;
+ giveresponse(i, TRUE, m);
+ }
+# else SMTP
+ syserr("trying to be clever");
+# endif SMTP
/* see if any addresses still exist */
if (tobuf[0] == '\0')
{
/* see if any addresses still exist */
if (tobuf[0] == '\0')
{
if (clever)
smtpquit(pv[0]);
if (clever)
smtpquit(pv[0]);
editfcn = putmessage;
if (ctladdr == NULL)
ctladdr = &From;
editfcn = putmessage;
if (ctladdr == NULL)
ctladdr = &From;
if (clever)
{
i = smtpfinish(m, editfcn);
smtpquit(pv[0]);
}
else
if (clever)
{
i = smtpfinish(m, editfcn);
smtpquit(pv[0]);
}
else
i = sendoff(m, pv, editfcn, ctladdr);
/*
i = sendoff(m, pv, editfcn, ctladdr);
/*
if (i == EX_TEMPFAIL)
{
QueueUp = TRUE;
for (to = tochain; to != NULL; to = to->q_tchain)
to->q_flags |= QQUEUEUP;
}
if (i == EX_TEMPFAIL)
{
QueueUp = TRUE;
for (to = tochain; to != NULL; to = to->q_tchain)
to->q_flags |= QQUEUEUP;
}
/* if this mailer speaks smtp, create a return pipe */
if (clever && pipe(rpvect) < 0)
{
/* if this mailer speaks smtp, create a return pipe */
if (clever && pipe(rpvect) < 0)
{
(void) close(mpvect[1]);
return (-1);
}
(void) close(mpvect[1]);
return (-1);
}
DOFORK(XFORK);
/* pid is set by DOFORK */
DOFORK(XFORK);
/* pid is set by DOFORK */
if (Verbose)
message(Arpa_Info, statmsg);
}
if (Verbose)
message(Arpa_Info, statmsg);
}
else if (stat == EX_TEMPFAIL)
{
if (Verbose)
message(Arpa_Info, "transmission deferred");
}
else if (stat == EX_TEMPFAIL)
{
if (Verbose)
message(Arpa_Info, "transmission deferred");
}
# ifdef LOG
syslog(LOG_INFO, "%s->%s: %ld: %s", From.q_paddr, To, MsgSize, statmsg);
# endif LOG
# ifdef LOG
syslog(LOG_INFO, "%s->%s: %ld: %s", From.q_paddr, To, MsgSize, statmsg);
# endif LOG
if (!bitset(M_NHDR, m->m_flags))
{
if (!bitset(M_NHDR, m->m_flags))
{
- register char *p = rindex(m->m_mailer, '/');
+# ifdef UGLYUUCP
+ char *p = rindex(m->m_mailer, '/');
if (p != NULL && strcmp(p, "/uux") == 0 &&
strcmp(m->m_name, "uucp") == 0)
(void) expand("From $f $d remote from $h", buf,
&buf[sizeof buf - 1]);
else
if (p != NULL && strcmp(p, "/uux") == 0 &&
strcmp(m->m_name, "uucp") == 0)
(void) expand("From $f $d remote from $h", buf,
&buf[sizeof buf - 1]);
else
(void) expand("$l", buf, &buf[sizeof buf - 1]);
fprintf(fp, "%s\n", buf);
}
(void) expand("$l", buf, &buf[sizeof buf - 1]);
fprintf(fp, "%s\n", buf);
}
# include <syslog.h>
# endif LOG
# include <syslog.h>
# endif LOG
-static char SccsId[] = "@(#)main.c 3.55 %G%";
+static char SccsId[] = "@(#)main.c 3.56 %G%";
/*
** SENDMAIL -- Post mail to a set of destinations.
/*
** SENDMAIL -- Post mail to a set of destinations.
if (p[2] == 's')
{
/* running smtp */
if (p[2] == 's')
{
/* running smtp */
+# else SMTP
+ syserr("I don't speak SMTP");
+# endif SMTP
/* explicit fall-through */
case 'q': /* run queue files at intervals */
/* explicit fall-through */
case 'q': /* run queue files at intervals */
queuemode = TRUE;
QueueIntvl = atoi(&p[1]);
queuemode = TRUE;
QueueIntvl = atoi(&p[1]);
+# else QUEUE
+ syserr("I don't know about queues");
+# endif QUEUE
if (Daemon)
getrequests();
if (Daemon)
getrequests();
if (queuemode)
runqueue(TRUE);
if (queuemode)
runqueue(TRUE);
/*
** If collecting stuff from the queue, go start doing that.
*/
/*
** If collecting stuff from the queue, go start doing that.
*/
runqueue(FALSE);
finis();
}
runqueue(FALSE);
finis();
}
if (Transcript != NULL)
(void) unlink(Transcript);
if (QueueUp)
if (Transcript != NULL)
(void) unlink(Transcript);
if (QueueUp)
+# else QUEUE
+ syserr("finis: trying to queue %s", InFileName);
+# endif QUEUE
+ }
else
(void) unlink(InFileName);
exit(ExitStat);
else
(void) unlink(InFileName);
exit(ExitStat);
# include <signal.h>
# include <errno.h>
# include <signal.h>
# include <errno.h>
-static char SccsId[] = "@(#)queue.c 3.6 %G%";
+# ifndef QUEUE
+static char SccsId[] = "@(#)queue.c 3.7 %G% (no queueing)";
+# else QUEUE
+
+static char SccsId[] = "@(#)queue.c 3.7 %G%";
/*
** QUEUEUP -- queue a message up for future transmission.
/*
** QUEUEUP -- queue a message up for future transmission.
/* arrange to remove files from queue */
QueueUp = FALSE;
}
/* arrange to remove files from queue */
QueueUp = FALSE;
}
-static char SccsId[] = "@(#)srvrsmtp.c 3.10 %G%";
+# ifndef SMTP
+static char SccsId[] = "@(#)srvrsmtp.c 3.11 %G% (no SMTP)";
+# else SMTP
+
+static char SccsId[] = "@(#)srvrsmtp.c 3.11 %G%";
/*
** SMTP -- run the SMTP protocol.
/*
** SMTP -- run the SMTP protocol.
message("550", "User unknown");
}
}
message("550", "User unknown");
}
}
# include <sysexits.h>
# include "sendmail.h"
# include <sysexits.h>
# include "sendmail.h"
-static char SccsId[] = "@(#)usersmtp.c 3.5 %G%";
+# ifndef SMTP
+static char SccsId[] = "@(#)usersmtp.c 3.6 %G% (no SMTP)";
+# else SMTP
+
+static char SccsId[] = "@(#)usersmtp.c 3.6 %G%";
/*
** SMTPINIT -- initialize SMTP.
/*
** SMTPINIT -- initialize SMTP.
fputs(buf, stdout);
fputs(buf, SmtpOut);
}
fputs(buf, stdout);
fputs(buf, SmtpOut);
}
-static char SccsId[] = "@(#)SendMail version 3.67 of %G%";
+static char SccsId[] = "@(#)SendMail version 3.68 of %G%";
-char Version[] = "3.67 [%G%]";
+char Version[] = "3.68 [%G%]";