diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
| commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
| tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /contrib/sendmail/src/srvrsmtp.c | |
| parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) | |
Diffstat (limited to 'contrib/sendmail/src/srvrsmtp.c')
| -rw-r--r-- | contrib/sendmail/src/srvrsmtp.c | 52 | 
1 files changed, 26 insertions, 26 deletions
| diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c index f4ffe8c0dfa62..fba103c6f0456 100644 --- a/contrib/sendmail/src/srvrsmtp.c +++ b/contrib/sendmail/src/srvrsmtp.c @@ -14,9 +14,9 @@  #ifndef lint  #if SMTP -static char sccsid[] = "@(#)srvrsmtp.c	8.187 (Berkeley) 10/23/1998 (with SMTP)"; +static char sccsid[] = "@(#)srvrsmtp.c	8.181 (Berkeley) 6/15/98 (with SMTP)";  #else -static char sccsid[] = "@(#)srvrsmtp.c	8.187 (Berkeley) 10/23/1998 (without SMTP)"; +static char sccsid[] = "@(#)srvrsmtp.c	8.181 (Berkeley) 6/15/98 (without SMTP)";  #endif  #endif /* not lint */ @@ -127,7 +127,7 @@ smtp(nullserver, e)  	char *id;  	volatile int nrcpts = 0;	/* number of RCPT commands */  	bool doublequeue; -	volatile bool discard; +	bool discard;  	volatile int badcommands = 0;	/* count of bad commands */  	volatile int nverifies = 0;	/* count of VRFY/EXPN commands */  	volatile int n_etrn = 0;	/* count of ETRN commands */ @@ -163,7 +163,7 @@ smtp(nullserver, e)  	/* check_relay may have set discard bit, save for later */  	discard = bitset(EF_DISCARD, e->e_flags); -	sm_setproctitle(TRUE, "server %s startup", CurSmtpClient); +	setproctitle("server %s startup", CurSmtpClient);  #if DAEMON  	if (LogLevel > 11)  	{ @@ -222,7 +222,7 @@ smtp(nullserver, e)  		/* read the input line */  		SmtpPhase = "server cmd read"; -		sm_setproctitle(TRUE, "server %s cmd read", CurSmtpClient); +		setproctitle("server %s cmd read", CurSmtpClient);  		p = sfgets(inp, sizeof inp, InChannel, TimeOuts.to_nextcommand,  				SmtpPhase); @@ -243,15 +243,15 @@ smtp(nullserver, e)  				CurSmtpClient);  			/* -			**  If have not accepted mail (DATA), do not bounce -			**  bad addresses back to sender. +			** If have not accepted mail (DATA), do not bounce +			** bad addresses back to sender.  			*/  			if (bitset(EF_CLRQUEUE, e->e_flags))  				e->e_sendqueue = NULL;  			if (InChild)  				ExitStat = EX_QUIT; -			finis(TRUE, ExitStat); +			finis();  		}  		/* clean up end of line */ @@ -267,9 +267,9 @@ smtp(nullserver, e)  				inp);  		if (e->e_id == NULL) -			sm_setproctitle(TRUE, "%s: %.80s", CurSmtpClient, inp); +			setproctitle("%s: %.80s", CurSmtpClient, inp);  		else -			sm_setproctitle(TRUE, "%s %s: %.80s", e->e_id, CurSmtpClient, inp); +			setproctitle("%s %s: %.80s", e->e_id, CurSmtpClient, inp);  		/* break off command */  		for (p = inp; isascii(*p) && isspace(*p); p++) @@ -457,7 +457,7 @@ smtp(nullserver, e)  			{  				errno = 0;  				syserr("503 Nested MAIL command: MAIL %s", p); -				finis(TRUE, ExitStat); +				finis();  			}  			/* make sure we know who the sending host is */ @@ -498,7 +498,7 @@ smtp(nullserver, e)  				goto undo_subproc_no_pm;  			nrcpts = 0;  			e->e_flags |= EF_LOGSENDER|EF_CLRQUEUE; -			sm_setproctitle(TRUE, "%s %s: %.80s", e->e_id, CurSmtpClient, inp); +			setproctitle("%s %s: %.80s", e->e_id, CurSmtpClient, inp);  			/* child -- go do the processing */  			if (setjmp(TopFrame) > 0) @@ -512,7 +512,7 @@ smtp(nullserver, e)  					QuickAbort = FALSE;  					SuprErrs = TRUE;  					e->e_flags &= ~EF_FATALERRS; -					finis(TRUE, ExitStat); +					finis();  				}  				break;  			} @@ -633,14 +633,8 @@ smtp(nullserver, e)  			if (p == NULL)  				break;  			a = parseaddr(p, NULLADDR, RF_COPYALL, ' ', &delimptr, e); -			if (Errors > 0) -				break; -			if (a == NULL) -			{ -				usrerr("501 Missing recipient"); +			if (a == NULL || Errors > 0)  				break; -			} -  			if (delimptr != NULL && *delimptr != '\0')  				*delimptr++ = '\0'; @@ -814,6 +808,8 @@ smtp(nullserver, e)  				if (!shouldqueue(e->e_msgpriority, e->e_ctime))  				{ +					extern pid_t dowork __P((char *, bool, bool, ENVELOPE *)); +  					unlockqueue(e);  					(void) dowork(id, TRUE, TRUE, e);  				} @@ -822,7 +818,7 @@ smtp(nullserver, e)    abortmessage:  			/* if in a child, pop back to our parent */  			if (InChild) -				finis(TRUE, ExitStat); +				finis();  			/* clean up a bit */  			gotmail = FALSE; @@ -841,7 +837,7 @@ smtp(nullserver, e)  			e->e_sendqueue = NULL;  			e->e_flags |= EF_CLRQUEUE;  			if (InChild) -				finis(TRUE, ExitStat); +				finis();  			/* clean up a bit */  			gotmail = FALSE; @@ -920,7 +916,7 @@ smtp(nullserver, e)  				vrfyqueue = vrfyqueue->q_next;  			}  			if (InChild) -				finis(TRUE, ExitStat); +				finis();  			break;  		  case CMDETRN:		/* etrn -- force queue flush */ @@ -996,7 +992,7 @@ doquit:  				sm_syslog(LOG_INFO, NULL,  					"Null connection from %.100s",  					CurSmtpClient); -			finis(TRUE, ExitStat); +			finis();  		  case CMDVERB:		/* set verbose mode */  			if (bitset(PRIV_NOEXPN, PrivacyFlags) || @@ -1421,7 +1417,7 @@ runinchild(label, e)  			auto int st;  			/* parent -- wait for child to complete */ -			sm_setproctitle(TRUE, "server %s child wait", CurSmtpClient); +			setproctitle("server %s child wait", CurSmtpClient);  			st = waitfor(childpid);  			if (st == -1)  				syserr("451 %s: lost child", label); @@ -1433,7 +1429,7 @@ runinchild(label, e)  			if (WEXITSTATUS(st) == EX_QUIT)  			{  				disconnect(1, e); -				finis(TRUE, ExitStat); +				finis();  			}  			/* restore the child signal */ @@ -1451,6 +1447,10 @@ runinchild(label, e)  			(void) releasesignal(SIGCHLD);  		}  	} + +	/* open alias database */ +	initmaps(FALSE, e); +  	return (0);  } | 
