SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 6.11
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 6.11
SCCS-vsn: usr.sbin/sendmail/src/main.c 6.19
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 6.16
SCCS-vsn: usr.sbin/sendmail/src/conf.c 6.16
-static char sccsid[] = "@(#)conf.c 6.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 6.16 (Berkeley) %G%";
#endif /* not lint */
# include <sys/ioctl.h>
#endif /* not lint */
# include <sys/ioctl.h>
while (wait((int *)&status) > 0)
continue;
# endif /* WNOHANG */
while (wait((int *)&status) > 0)
continue;
# endif /* WNOHANG */
+# ifdef SYSTEM5
+ (void) signal(SIGCHLD, reapchild);
+# endif
}
\f/*
** UNSETENV -- remove a variable from the environment
}
\f/*
** UNSETENV -- remove a variable from the environment
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 6.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 6.19 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
*q++ = '\0';
if (*optarg != '\0')
define('r', newstr(optarg), CurEnv);
*q++ = '\0';
if (*optarg != '\0')
define('r', newstr(optarg), CurEnv);
+ if (q != NULL && *q != '\0')
define('s', newstr(q), CurEnv);
break;
define('s', newstr(q), CurEnv);
break;
-static char sccsid[] = "@(#)parseaddr.c 6.15 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c 6.16 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
if (bslashmode)
{
/* kludge \! for naive users */
if (bslashmode)
{
/* kludge \! for naive users */
+ if (cmntcnt > 0)
+ c = NOCHAR;
+ else if (c != '!')
*q++ = '\\';
bslashmode = FALSE;
if (cmntcnt > 0)
*q++ = '\\';
bslashmode = FALSE;
if (cmntcnt > 0)
-static char sccsid[] = "@(#)recipient.c 6.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c 6.11 (Berkeley) %G%";
#endif /* not lint */
# include <sys/types.h>
#endif /* not lint */
# include <sys/types.h>
register char *p;
register ADDRESS *al; /* list of addresses to send to */
bool firstone; /* set on first address sent */
register char *p;
register ADDRESS *al; /* list of addresses to send to */
bool firstone; /* set on first address sent */
- bool selfref; /* set if this list includes ctladdr */
char delimiter; /* the address delimiter */
ADDRESS *sibl; /* sibling pointer in tree */
ADDRESS *prev; /* previous sibling */
char delimiter; /* the address delimiter */
ADDRESS *sibl; /* sibling pointer in tree */
ADDRESS *prev; /* previous sibling */
delimiter = ',';
firstone = TRUE;
delimiter = ',';
firstone = TRUE;
al = NULL;
for (p = list; *p != '\0'; )
al = NULL;
for (p = list; *p != '\0'; )
a->q_flags |= QPRIMARY;
if (ctladdr != NULL && sameaddr(ctladdr, a))
a->q_flags |= QPRIMARY;
if (ctladdr != NULL && sameaddr(ctladdr, a))
+ ctladdr->q_flags |= QSELFREF;
al = a;
firstone = FALSE;
}
/* if this alias doesn't include itself, delete ctladdr */
al = a;
firstone = FALSE;
}
/* if this alias doesn't include itself, delete ctladdr */
- if (!selfref && ctladdr != NULL)
+ if (ctladdr != NULL && !bitset(QSELFREF, ctladdr->q_flags))
usrerr("Cannot open %s", fname);
return ret;
}
usrerr("Cannot open %s", fname);
return ret;
}
struct stat st;
if (fstat(fileno(fp), &st) < 0)
struct stat st;
if (fstat(fileno(fp), &st) < 0)
+ {
+ int ret = errno;
+
+ clrevent(ev);
syserr("Cannot fstat %s!", fname);
syserr("Cannot fstat %s!", fname);
ctladdr->q_uid = st.st_uid;
ctladdr->q_gid = st.st_gid;
ctladdr->q_flags |= QGOODUID;
ctladdr->q_uid = st.st_uid;
ctladdr->q_gid = st.st_gid;
ctladdr->q_flags |= QGOODUID;
-static char sccsid[] = "@(#)usersmtp.c 6.10 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.11 (Berkeley) %G% (with SMTP)";
-static char sccsid[] = "@(#)usersmtp.c 6.10 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.11 (Berkeley) %G% (without SMTP)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
smtpmessage("NOOP", m, mci);
r = reply(m, mci, e, ReadTimeout);
smtpmessage("NOOP", m, mci);
r = reply(m, mci, e, ReadTimeout);
+ if (r < 0 || REPLYTYPE(r) != 2)
smtpquit(m, mci, e);
return r;
}
smtpquit(m, mci, e);
return r;
}
+ /* save temporary failure messages for posterity */
+ if (SmtpReplyBuffer[0] == '4' && SmtpError[0] == '\0')
+ (void) strcpy(SmtpError, SmtpReplyBuffer);
+
/* reply code 421 is "Service Shutting Down" */
if (r == SMTPCLOSING && mci->mci_state != MCIS_SSD)
{
/* reply code 421 is "Service Shutting Down" */
if (r == SMTPCLOSING && mci->mci_state != MCIS_SSD)
{
- /* save temporary failure messages for posterity */
- if (SmtpReplyBuffer[0] == '4' && SmtpError[0] == '\0')
- (void) strcpy(SmtpError, SmtpReplyBuffer);
-