for (fd = store(from, 0); *argv; ++argv) deliver(fd, *argv, bouncequota);
HoldErrs = TRUE; fd = store(from, 0, NULL); HoldErrs = FALSE; if (fd < 0) { flush_error(); exit(ExitVal); } for (; *argv != NULL; ++argv) deliver(fd, *argv);
main(argc, argv)	int argc;	char *argv[];{	struct passwd *pw;	int ch, fd;	uid_t uid;	char *from;	extern char *optarg;	extern int optind;	extern void dolmtp __P((bool));	/* make sure we have some open file descriptors */	for (fd = 10; fd < 30; fd++)		(void) close(fd);	/* use a reasonable umask */	(void) umask(0077);# ifdef LOG_MAIL	openlog("mail.local", 0, LOG_MAIL);# else /* LOG_MAIL */	openlog("mail.local", 0);# endif /* LOG_MAIL */	from = NULL;	while ((ch = getopt(argc, argv, "7bdf:r:l")) != -1)	{		switch(ch)		{		  case '7':		/* Do not advertise 8BITMIME */			EightBitMime = FALSE;			break;		  case 'b':		/* bounce mail when over quota. */			bouncequota = TRUE;			break;		  case 'd':		/* Backward compatible. */			break;		  case 'f':		  case 'r':		/* Backward compatible. */			if (from != NULL)			{				mailerr(NULL, "multiple -f options");				usage();			}			from = optarg;			break;		  case 'l':			LMTPMode = TRUE;			break;		  case '?':		  default:			usage();		}	}	argc -= optind;	argv += optind;	/* initialize biff structures */	notifybiff(NULL);	if (LMTPMode)		dolmtp(bouncequota);	if (*argv == '\0')		usage();	/*	**  If from not specified, use the name from getlogin() if the	**  uid matches, otherwise, use the name from the password file	**  corresponding to the uid.	*/	uid = getuid();	if (from == NULL && ((from = getlogin()) == NULL ||			     (pw = getpwnam(from)) == NULL ||			     pw->pw_uid != uid))		from = (pw = getpwuid(uid)) != NULL ? pw->pw_name : "???";	/*	**  There is no way to distinguish the error status of one delivery	**  from the rest of the deliveries.  So, if we failed hard on one	**  or more deliveries, but had no failures on any of the others, we	**  return a hard failure.  If we failed temporarily on one or more	**  deliveries, we return a temporary failure regardless of the other	**  failures.  This results in the delivery being reattempted later	**  at the expense of repeated failures and multiple deliveries.	*/	for (fd = store(from, 0); *argv; ++argv)		deliver(fd, *argv, bouncequota);	exit(ExitVal);	/* NOTREACHED */	return ExitVal;}