xref: /csrg-svn/usr.sbin/sendmail/src/conf.c (revision 3057)
1294Seric # include <stdio.h>
2294Seric # include <pwd.h>
32967Seric # include "postbox.h"
4404Seric 
5294Seric /*
62967Seric **  CONF.C -- Postbox Configuration Tables.
7294Seric **
8294Seric **	Defines the configuration of this installation.
9294Seric **
101388Seric **	Compilation Flags:
111388Seric **		HASARPA -- set if this machine has a connection to
121388Seric **			the Arpanet.
131388Seric **		HASUUCP -- set if this machine has a connection to
141388Seric **			the UUCP network.
151388Seric **		NETV6MAIL -- set if you want to use "v6mail" that
161388Seric **			comes with the Berkeley network.  Normally
171388Seric **			/bin/mail will work fine, but around Berkeley
181388Seric **			we use v6mail because it is a "fixed target".
192355Seric **			Also, only v6mail has the "/dev/mail" stuff
202355Seric **			in it (for biff(1)).
211388Seric **		V6 -- running on a version 6 system.  This determines
221388Seric **			whether to define certain routines between
231388Seric **			the two systems.  If you are running a funny
241388Seric **			system, e.g., V6 with long tty names, this
251388Seric **			should be checked carefully.
261573Seric **		DUMBMAIL -- set if your /bin/mail doesn't have the
271573Seric **			-d flag.
28294Seric **
291388Seric **	Configuration Variables:
301573Seric **		ArpaHost -- the arpanet name of the host through
311573Seric **			which arpanet mail will be sent.
321388Seric **		MyLocName -- the name of the host on a local network.
331388Seric **			This is used to disambiguate the contents of
341388Seric **			ArpaHost among many hosts who may be sharing
351388Seric **			a gateway.
362099Seric **		DaemonName -- the name of this agent for use in
372099Seric **			error messages, typically "~MAILER~DAEMON~"
382099Seric **			at this host on the local net.
391573Seric **		ArpaLocal -- a list of local names for this host on
401573Seric **			the arpanet.  Only functional if HASARPA set.
411573Seric **		UucpLocal -- ditto for the Arpanet.
421573Seric **		BerkLocal -- ditto for the Berknet.
431388Seric **		Mailer -- a table of mailers known to the system.
441388Seric **			The fields are:
451388Seric **			- the pathname of the mailer.
461388Seric **			- a list of flags describing the properties
471388Seric **			  of this mailer:
481388Seric **			   M_FOPT -- if set, the mailer has a picky "-f"
491388Seric **				option.  In this mode, the mailer will
501388Seric **				only accept the "-f" option if the
511388Seric **				sender is actually "root", "network",
521388Seric **				and possibly (but not necessarily) if
531388Seric **				the -f argument matches the real sender.
541388Seric **				The effect is that if the "-f" option
552967Seric **				is given to postbox then it will be
561388Seric **				passed through (as arguments 1 & 2) to
571388Seric **				the mailer.
581388Seric **			   M_ROPT -- identical to M_FOPT, except uses
591388Seric **				-r instead.
601388Seric **			   M_QUIET -- if set, don't print a message if
611388Seric **				the mailer returns bad status.
621388Seric **			   M_RESTR -- if set, this mailer is restricted
631388Seric **				to use by "daemon"; otherwise, we do a
641388Seric **				setuid(getuid()) before calling the
651388Seric **				mailer.
661388Seric **			   M_HDR -- if set, the mailer wants us to
671388Seric **				insert a UNIX "From" line before
681388Seric **				outputing.
691827Seric **			   M_FHDR -- if set, the header that we
701827Seric **				generate will be used literally, so
711827Seric **				we must force it to be correct.  The
721827Seric **				effect is that we generate a header
731827Seric **				even if one exists.
741388Seric **			   M_NOHOST -- if set, this mailer doesn't care
751388Seric **				about the host part (e.g., the local
761388Seric **				mailer).
771388Seric **			   M_STRIPQ -- if set, strip quote (`"')
781388Seric **				characters out of parameters as you
791388Seric **				transliterate them into the argument
801388Seric **				vector.  For example, the local mailer
811388Seric **				is called directly, so these should be
821388Seric **				stripped, but the program-mailer (i.e.,
831388Seric **				csh) should leave them in.
842897Seric **			   M_NEEDDATE -- this mailer requires a Date:
852897Seric **				field in the message.
862897Seric **			   M_NEEDFROM -- this mailer requires a From:
872897Seric **				field in the message.
882897Seric **			   M_MSGID -- this mailer requires a Message-Id
892897Seric **				field in the message.
902897Seric **			   M_COMMAS -- this mailer wants comma-
912897Seric **				seperated To: and Cc: fields.
922897Seric **			   M_ARPAFMT == M_NEEDDATE|M_NEEDFROM|M_MSGID|
932897Seric **				M_COMMAS.
941388Seric **			- an exit status to use as the code for the
951388Seric **			  error message print if the mailer returns
961388Seric **			  something we don't understand.
971388Seric **			- A list of names that are to be considered
981388Seric **			  "local" (and hence are stripped off) for
991388Seric **			  this mailer.
1001388Seric **			- An argument vector to be passed to the
1011388Seric **			  mailer with the following substitutions:
1021388Seric **			   $f - the from person name.
1031388Seric **			   $u - the target user name.
1041388Seric **			   $h - the target user host.
1051388Seric **			   $c - the hop count.
1061388Seric **			>>>>>>>>>> Entry zero must be for the local
1071388Seric **			>> NOTE >> mailer and entry one must be for
1081388Seric **			>>>>>>>>>> the shell.
1091388Seric **		ParseTab -- a table driving the parsing process.  Each
1101388Seric **			entry contains:
1111388Seric **			- a character that will trigger this entry.
1121388Seric **			- an index into the Mailer table.
1132967Seric **			- a word of flags, described in postbox.h.
1141388Seric **			- an argument.  If we have P_MAP, it is the
1151388Seric **			  character to turn the trigger character into.
1161388Seric **			  If we have P_MOVE, it is the site to send it
1171388Seric **			  to, using the mailer specified above.
1181573Seric **			This table will almost certainly have to be
1191573Seric **			changed on your site if you have anything more
1201573Seric **			than the UUCP net.
1212897Seric **		HdrInfo -- a table describing well-known header fields.
1222897Seric **			Each entry has the field name and some flags,
1232897Seric **			which can be:
124*3057Seric **			- H_EOH -- this field is equivalent to a blank
125*3057Seric **			  line; i.e., it signifies end of header.
126*3057Seric **			- H_DELETE -- delete this field.
127*3057Seric **			There is also a field pointing to a pointer
128*3057Seric **			that should be set to point to this header.
129294Seric */
130294Seric 
131294Seric 
132294Seric 
133294Seric 
134*3057Seric static char SccsId[] = "@(#)conf.c	3.5	03/07/81";
135294Seric 
1361388Seric 
1371388Seric # include <whoami.h>		/* definitions of machine id's at berkeley */
1381388Seric 
1391573Seric # ifdef BERKELEY
1402099Seric 
1411573Seric char	*ArpaHost = "Berkeley";	/* host name of gateway on Arpanet */
1422897Seric char	*UucpHost = "ucbvax";	/* host name of gateway on UUCP net */
1432897Seric # define BerkHost   MyLocName	/* host name of gateway on Berk net */
1442355Seric # define NETV6MAIL		/* use /usr/net/bin/v6mail for local delivery */
1452099Seric 
1461573Seric # else BERKELEY
1472099Seric 
1481573Seric char	*ArpaHost = "[unknown]";
1491573Seric char	*MyLocName = sysname;
1501573Seric # define HASUUCP		/* default to having UUCP net */
1511573Seric char	*UucpLocal[] = { sysname, NULL };
1522099Seric 
1531573Seric # endif BERKELEY
1541573Seric 
1552099Seric 
1562099Seric /* Specific Configurations for Berkeley Machines */
1572099Seric 
1582099Seric /* Berkeley people: mail changes to csvax:eric or they will be lost! */
1592099Seric 
160294Seric # ifdef ING70
161294Seric static char	*BerkLocal[] = { "i", "ingres", "ing70", NULL };
1622099Seric char		*ArpaLocal = { "berkeley", "ucb", NULL };
1631206Seric char		*MyLocName = "Ing70";
1642098Seric char		*DaemonName = "Ing70:~MAILER~DAEMON~";
165294Seric # define HASARPA
166294Seric # define V6
167294Seric # endif ING70
168294Seric 
169294Seric # ifdef INGVAX
170294Seric static char	*BerkLocal[] = { "j", "ingvax", NULL };
1711206Seric char		*MyLocName = "IngVax";
1722098Seric char		*DaemonName = "IngVax:~MAILER~DAEMON~";
173294Seric # endif INGVAX
174294Seric 
175294Seric # ifdef CSVAX
176294Seric static char	*BerkLocal[] = { "v", "csvax", "vax", NULL };
177590Seric static char	*UucpLocal[] = { "ucbvax", "ernie", NULL };
1781206Seric char		*MyLocName = "CSVAX";
1792098Seric char		*DaemonName = "CSVAX:~MAILER~DAEMON~";
180294Seric # define HASUUCP
181294Seric # endif CSVAX
182294Seric 
1832355Seric # ifdef ARPAVAX
1842355Seric static char	*BerkLocal[] = { "r", "arpavax", NULL };
1852355Seric char		*MyLocName = "ARPAVAX";
1862355Seric char		*DaemonName = "ARPAVAX:~MAILER~DAEMON~";
1872355Seric # endif ARPAVAX
1882355Seric 
189294Seric # ifdef CORY
190294Seric static char	*BerkLocal[] = { "y", "cory", NULL };
1911206Seric char		*MyLocName = "Cory";
1922098Seric char		*DaemonName = "Cory:~MAILER~DAEMON~";
193294Seric # endif CORY
194294Seric 
1952420Seric # ifdef ONYX
1962420Seric static char	*BerkLocal[[] = { "x", "onyx", NULL };
1972420Seric char		*MyLocName = "Onyx";
1982420Seric char		*DaemonName = "Onyx:~MAILER~DAEMON~";
1992420Seric # endif ONYX
2002420Seric 
201294Seric # ifdef IMAGE
202294Seric /* untested */
203294Seric static char	*BerkLocal[] = { "m", "image", NULL };
2041206Seric char		*MyLocName = "Image";
2052098Seric char		*DaemonName = "Image:~MAILER~DAEMON~";
206294Seric # define V6
207294Seric # endif IMAGE
208294Seric 
209294Seric # ifdef ESVAX
210294Seric static char	*BerkLocal[] = { "o", "esvax", NULL };
2111206Seric char		*MyLocName = "ESVAX";
2122098Seric char		*DaemonName = "ESVAX:~MAILER~DAEMON~";
213294Seric # endif ESVAX
214294Seric 
215294Seric # ifdef EECS40
216294Seric /* untested */
217294Seric static char	*BerkLocal[] = { "z", "eecs40", NULL };
2181206Seric char		*MyLocName = "EECS40";
2192098Seric char		*DaemonName = "EECS40:~MAILER~DAEMON~";
220294Seric # define V6
221294Seric # endif EECS40
222294Seric 
223590Seric 
224590Seric # ifndef HASARPA
225590Seric # define ArpaLocal	NULL
226590Seric # endif HASARPA
227590Seric 
228590Seric # ifndef HASUUCP
229590Seric # define UucpLocal	NULL
230590Seric # endif HASUUCP
231590Seric 
232590Seric 
2333046Seric /* local mail -- must be #0 */
2343046Seric static char	*LocalArgv[] =
235294Seric {
2363046Seric 	"...local%mail",
2373046Seric 	"-d",
2383046Seric 	"$u",
2393046Seric 	NULL
2403046Seric };
2413046Seric 
2423046Seric static struct mailer	LocalMailer =
2433046Seric {
244294Seric # ifdef NETV6MAIL
2453046Seric 	"/usr/net/bin/v6mail",
246294Seric # else
2473046Seric 	"/bin/mail",
248294Seric # endif
2493046Seric 	M_ROPT|M_NOHOST|M_STRIPQ|M_ARPAFMT,	EX_NOUSER,	NULL,
2503046Seric 	"$f",		NULL,			LocalArgv,
2513046Seric };
2523046Seric 
2533046Seric /* pipes through programs -- must be #1 */
2543046Seric static char	*ProgArgv[] =
2553046Seric {
2563046Seric 	"...prog%mail",
2573046Seric 	"-fc",
2583046Seric 	"$u",
2593046Seric 	NULL
2603046Seric };
2613046Seric 
2623046Seric static struct mailer	ProgMailer =
2633046Seric {
2643046Seric 	"/bin/csh",
2653046Seric 	M_HDR|M_FHDR|M_NOHOST,			EX_UNAVAILABLE,	NULL,
2663046Seric 	"$f",		NULL,			ProgArgv,
2673046Seric };
2683046Seric 
2693046Seric /* local berkeley mail */
2703046Seric static char	*BerkArgv[] =
2713046Seric {
2723046Seric 	"...berk%mail",
2733046Seric 	"-m",
2743046Seric 	"$h",
2753046Seric 	"-t",
2763046Seric 	"$u",
2773046Seric 	"-h",
2783046Seric 	"$c",
2793046Seric 	NULL
2803046Seric };
2813046Seric 
2823046Seric static struct mailer	BerkMailer =
2833046Seric {
2843046Seric 	"/usr/net/bin/sendberkmail",
2853046Seric 	M_FOPT|M_HDR|M_STRIPQ,			EX_UNAVAILABLE,	BerkLocal,
2863046Seric 	"$B:$f",	NULL,			BerkArgv,
2873046Seric };
2883046Seric 
2893046Seric /* arpanet mail */
2903046Seric static char	*ArpaArgv[] =
2913046Seric {
2923046Seric 	"...arpa%mail",
2933046Seric 	"$f",
2943046Seric 	"$h",
2953046Seric 	"$u",
2963046Seric 	NULL
2973046Seric };
2983046Seric 
2993046Seric static struct mailer	ArpaMailer =
3003046Seric {
3013046Seric 	"/usr/lib/mailers/arpa",
3023046Seric 	M_STRIPQ|M_ARPAFMT,			0,		ArpaLocal,
3033046Seric 	"$f@$A",	NULL,			ArpaArgv,
3043046Seric };
3053046Seric 
3063046Seric /* uucp mail (cheat & use Bell's v7 mail) */
3073046Seric static char	*UucpArgv[] =
3083046Seric {
3093046Seric 	"...uucp%mail",
310294Seric # ifdef DUMBMAIL
3113046Seric 	"-d",
312294Seric # endif DUMBMAIL
3133046Seric 	"$h!$u",
3143046Seric 	NULL
315294Seric };
316294Seric 
3173046Seric static struct mailer	UucpMailer =
3183046Seric {
3193046Seric 	"/bin/mail",
3203046Seric 	M_ROPT|M_STRIPQ,			EX_NOUSER,	UucpLocal,
3213046Seric 	"$U!$f",	NULL,			UucpArgv,
3223046Seric };
3233046Seric 
3243046Seric struct mailer	*Mailer[] =
3253046Seric {
3263046Seric 	&LocalMailer,		/* 0 -- must be 0 */
3273046Seric 	&ProgMailer,		/* 1 -- must be 1 */
3283046Seric 	&BerkMailer,		/* 2 */
3293046Seric 	&ArpaMailer,		/* 3 */
3303046Seric 	&UucpMailer,		/* 4 */
3313046Seric };
3323046Seric 
3333046Seric # define NMAILERS	(sizeof Mailer / sizeof Mailer[0])
3343046Seric 
335294Seric # define M_LOCAL	0
3363046Seric # define M_PROG		1
337294Seric # define M_BERK		2
338294Seric # define M_ARPA		3
339294Seric # define M_UUCP		4
340294Seric 
3413046Seric /* list of messages for each mailer (sorted by host) */
3423046Seric ADDRESS		MailList[NMAILERS];
343294Seric 
344294Seric 
3453046Seric 
3461573Seric # ifdef BERKELEY
347294Seric struct parsetab ParseTab[] =
348294Seric {
349294Seric 	':',	M_BERK,		P_ONE,				NULL,
350294Seric # ifdef HASARPA
351294Seric 	'@',	M_ARPA,		P_HLAST|P_USR_UPPER,		NULL,
352294Seric # else
353294Seric 	'@',	M_BERK,		P_HLAST|P_USR_UPPER|P_MOVE,	"ing70",
354294Seric # endif HASARPA
355294Seric 	'^',	-1,		P_MAP,				"!",
356294Seric # ifdef HASUUCP
357294Seric 	'!',	M_UUCP,		0,				NULL,
358294Seric # else
359294Seric 	'!',	M_BERK,		P_MOVE,				"csvax",
360294Seric # endif HASUUCP
361294Seric 	'.',	-1,		P_MAP|P_ONE,			":",
362294Seric 	'\0',	M_LOCAL,	P_MOVE,				"",
363294Seric };
3641573Seric # else BERKELEY
3651573Seric struct parsetab ParseTab[] =
3661573Seric {
3671573Seric # ifdef HASARPA
3681573Seric 	'@',	M_ARPA,		P_HLAST|P_USR_UPPER,		NULL,
3691573Seric # endif HASARPA
3701573Seric # ifdef HASUUCP
3711573Seric 	'^',	-1,		P_MAP,				"!",
3721573Seric 	'!',	M_UUCP,		0,				NULL,
3731573Seric # endif HASUUCP
3741573Seric 	'\0',	M_LOCAL,	P_MOVE,				"",
3751573Seric };
3761573Seric # endif BERKELEY
3772897Seric 
3782897Seric 
3792897Seric /*
3802897Seric **  Header info table
381*3057Seric **	Final (null) entry contains the flags used for any other field.
3822897Seric */
3832897Seric 
3842897Seric struct hdrinfo	HdrInfo[] =
3852897Seric {
386*3057Seric 	"date",		0,			NULL,
387*3057Seric 	"from",		0,			NULL,
388*3057Seric 	"to",		0,			NULL,
389*3057Seric 	"cc",		0,			NULL,
390*3057Seric 	"subject",	0,			NULL,
391*3057Seric 	"message-id",	0,			&MsgId,
392*3057Seric 	"message",	H_EOH,			NULL,
393*3057Seric 	NULL,		0,			NULL,
3942897Seric };
395294Seric /*
3962897Seric **  INITMACS -- initialize predefined macros.
3972897Seric **
3982897Seric **	Parameters:
3992897Seric **		none.
4002897Seric **
4012897Seric **	Returns:
4022897Seric **		none.
4032897Seric **
4042897Seric **	Side Effects:
4052897Seric **		Macros array gets initialized.
4062897Seric */
4072897Seric 
4082897Seric char	*Macro[26];
4092897Seric 
4102897Seric # define MACRO(x)	Macro[x - 'A']
4112897Seric 
4122897Seric initmacs()
4132897Seric {
4142897Seric 	MACRO('A') = ArpaHost;
4152897Seric 	MACRO('B') = BerkHost;
4162897Seric 	MACRO('U') = UucpHost;
4172897Seric }
418294Seric 
419294Seric # ifdef V6
420294Seric /*
421294Seric **  TTYPATH -- Get the path of the user's tty -- Version 6 version.
422294Seric **
423294Seric **	Returns the pathname of the user's tty.  Returns NULL if
424294Seric **	the user is not logged in or if s/he has write permission
425294Seric **	denied.
426294Seric **
427294Seric **	Parameters:
428294Seric **		none
429294Seric **
430294Seric **	Returns:
431294Seric **		pathname of the user's tty.
432294Seric **		NULL if not logged in or write permission denied.
433294Seric **
434294Seric **	Side Effects:
435294Seric **		none.
436294Seric **
437294Seric **	WARNING:
438294Seric **		Return value is in a local buffer.
439294Seric **
440294Seric **	Called By:
441294Seric **		savemail
442294Seric */
443294Seric 
444294Seric # include <sys/types.h>
445294Seric # include <sys/stat.h>
446294Seric 
447294Seric char *
448294Seric ttypath()
449294Seric {
450294Seric 	struct stat stbuf;
451294Seric 	register int i;
452294Seric 	static char pathn[] = "/dev/ttyx";
453294Seric 	extern int errno;
454294Seric 
455294Seric 	/* compute the pathname of the controlling tty */
456294Seric 	if ((i = ttyn(2)) == 'x' && (i = ttyn(1)) == 'x' && (i = ttyn(0)) == 'x')
457294Seric 	{
458294Seric 		errno = 0;
459294Seric 		return (NULL);
460294Seric 	}
461294Seric 	pathn[8] = i;
462294Seric 
463294Seric 	/* see if we have write permission */
4642967Seric 	if (stat(pathn, &stbuf) < 0 || !bitset(02, stbuf.st_mode))
465294Seric 	{
466294Seric 		errno = 0;
467294Seric 		return (NULL);
468294Seric 	}
469294Seric 
470294Seric 	/* see if the user is logged in */
471294Seric 	if (getlogin() == NULL)
472294Seric 		return (NULL);
473294Seric 
474294Seric 	/* looks good */
475294Seric 	return (pathn);
476294Seric }
477294Seric /*
478294Seric **  FDOPEN -- Open a stdio file given an open file descriptor.
479294Seric **
480294Seric **	This is included here because it is standard in v7, but we
481294Seric **	need it in v6.
482294Seric **
483294Seric **	Algorithm:
484294Seric **		Open /dev/null to create a descriptor.
485294Seric **		Close that descriptor.
486294Seric **		Copy the existing fd into the descriptor.
487294Seric **
488294Seric **	Parameters:
489294Seric **		fd -- the open file descriptor.
490294Seric **		type -- "r", "w", or whatever.
491294Seric **
492294Seric **	Returns:
493294Seric **		The file descriptor it creates.
494294Seric **
495294Seric **	Side Effects:
496294Seric **		none
497294Seric **
498294Seric **	Called By:
499294Seric **		deliver
500294Seric **
501294Seric **	Notes:
502294Seric **		The mode of fd must match "type".
503294Seric */
504294Seric 
505294Seric FILE *
506294Seric fdopen(fd, type)
507294Seric 	int fd;
508294Seric 	char *type;
509294Seric {
510294Seric 	register FILE *f;
511294Seric 
512294Seric 	f = fopen("/dev/null", type);
513294Seric 	close(fileno(f));
514294Seric 	fileno(f) = fd;
515294Seric 	return (f);
516294Seric }
517294Seric /*
518294Seric **  INDEX -- Return pointer to character in string
519294Seric **
520294Seric **	For V7 compatibility.
521294Seric **
522294Seric **	Parameters:
523294Seric **		s -- a string to scan.
524294Seric **		c -- a character to look for.
525294Seric **
526294Seric **	Returns:
527294Seric **		If c is in s, returns the address of the first
528294Seric **			instance of c in s.
529294Seric **		NULL if c is not in s.
530294Seric **
531294Seric **	Side Effects:
532294Seric **		none.
533294Seric */
534294Seric 
535294Seric index(s, c)
536294Seric 	register char *s;
537294Seric 	register char c;
538294Seric {
539294Seric 	while (*s != '\0')
540294Seric 	{
541294Seric 		if (*s++ == c)
542294Seric 			return (--s);
543294Seric 	}
544294Seric 	return (NULL);
545294Seric }
546294Seric # endif V6
547294Seric 
548294Seric # ifndef V6
549294Seric /*
550294Seric **  TTYPATH -- Get the path of the user's tty -- Version 7 version.
551294Seric **
552294Seric **	Returns the pathname of the user's tty.  Returns NULL if
553294Seric **	the user is not logged in or if s/he has write permission
554294Seric **	denied.
555294Seric **
556294Seric **	Parameters:
557294Seric **		none
558294Seric **
559294Seric **	Returns:
560294Seric **		pathname of the user's tty.
561294Seric **		NULL if not logged in or write permission denied.
562294Seric **
563294Seric **	Side Effects:
564294Seric **		none.
565294Seric **
566294Seric **	WARNING:
567294Seric **		Return value is in a local buffer.
568294Seric **
569294Seric **	Called By:
570294Seric **		savemail
571294Seric */
572294Seric 
573294Seric # include <sys/types.h>
574294Seric # include <sys/stat.h>
575294Seric 
576294Seric char *
577294Seric ttypath()
578294Seric {
579294Seric 	struct stat stbuf;
580294Seric 	register char *pathn;
581294Seric 	extern int errno;
582294Seric 	extern char *ttyname();
583294Seric 
584294Seric 	/* compute the pathname of the controlling tty */
585294Seric 	if ((pathn = ttyname(2)) == NULL && (pathn = ttyname(1)) == NULL && (pathn = ttyname(0)) == NULL)
586294Seric 	{
587294Seric 		errno = 0;
588294Seric 		return (NULL);
589294Seric 	}
590294Seric 
591294Seric 	/* see if we have write permission */
5922967Seric 	if (stat(pathn, &stbuf) < 0 || !bitset(02, stbuf.st_mode))
593294Seric 	{
594294Seric 		errno = 0;
595294Seric 		return (NULL);
596294Seric 	}
597294Seric 
598294Seric 	/* see if the user is logged in */
599294Seric 	if (getlogin() == NULL)
600294Seric 		return (NULL);
601294Seric 
602294Seric 	/* looks good */
603294Seric 	return (pathn);
604294Seric }
605294Seric # endif V6
6062967Seric /*
6072967Seric **  CHECKCOMPAT -- check for From and To person compatible.
6082967Seric **
6092967Seric **	This routine can be supplied on a per-installation basis
6102967Seric **	to determine whether a person is allowed to send a message.
6112967Seric **	This allows restriction of certain types of internet
6122967Seric **	forwarding or registration of users.
6132967Seric **
6142967Seric **	If the hosts are found to be incompatible, an error
6152967Seric **	message should be given using "usrerr" and FALSE should
6162967Seric **	be returned.
6172967Seric **
6182967Seric **	Parameters:
6192967Seric **		to -- the person being sent to.
6202967Seric **
6212967Seric **	Returns:
6222967Seric **		TRUE -- ok to send.
6232967Seric **		FALSE -- not ok.
6242967Seric **
6252967Seric **	Side Effects:
6262967Seric **		none (unless you include the usrerr stuff)
6272967Seric */
6282967Seric 
6292967Seric bool
6302967Seric checkcompat(to)
6312967Seric 	register ADDRESS *to;
6322967Seric {
6332967Seric 	return (TRUE);
6342967Seric }
635