SCCS-vsn: usr.sbin/sendmail/src/macro.c 8.6
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.76
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 8.48
SCCS-vsn: usr.sbin/sendmail/src/domain.c 8.30
#ifndef lint
#if NAMED_BIND
#ifndef lint
#if NAMED_BIND
-static char sccsid[] = "@(#)domain.c 8.29 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c 8.30 (Berkeley) %G% (with name server)";
-static char sccsid[] = "@(#)domain.c 8.29 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c 8.30 (Berkeley) %G% (without name server)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
u_short pref, localpref, type;
char *fallbackMX = FallBackMX;
static bool firsttime = TRUE;
u_short pref, localpref, type;
char *fallbackMX = FallBackMX;
static bool firsttime = TRUE;
bool trycanon = FALSE;
u_short prefer[MAXMXHOSTS];
int weight[MAXMXHOSTS];
bool trycanon = FALSE;
u_short prefer[MAXMXHOSTS];
int weight[MAXMXHOSTS];
/* this entry is bogus */
fallbackMX = FallBackMX = NULL;
}
/* this entry is bogus */
fallbackMX = FallBackMX = NULL;
}
- else if (droplocalhost &&
- (st = stab(fallbackMX, ST_CLASS, ST_FIND)) != NULL &&
- bitnset('w', st->s_class))
+ else if (droplocalhost && wordinclass(fallbackMX, 'w'))
{
/* don't use fallback for this pass */
fallbackMX = NULL;
{
/* don't use fallback for this pass */
fallbackMX = NULL;
(RES_UNC_T) bp, buflen)) < 0)
break;
cp += n;
(RES_UNC_T) bp, buflen)) < 0)
break;
cp += n;
- if (droplocalhost &&
- (st = stab(bp, ST_CLASS, ST_FIND)) != NULL &&
- bitnset('w', st->s_class))
+ if (droplocalhost && wordinclass(bp, 'w'))
{
if (tTd(8, 3))
printf("found localhost (%s) in MX list, pref=%d\n",
{
if (tTd(8, 3))
printf("found localhost (%s) in MX list, pref=%d\n",
-static char sccsid[] = "@(#)macro.c 8.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)macro.c 8.6 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
printf("0x%x\n", mid);
return mid;
}
printf("0x%x\n", mid);
return mid;
}
+\f/*
+** WORDINCLASS -- tell if a word is in a specific class
+**
+** Parameters:
+** word -- the name of the word to look up.
+** cl -- the class name.
+**
+** Returns:
+** TRUE if word can be found in cl.
+** FALSE otherwise.
+*/
+
+bool
+wordinclass(word, cl)
+ char *word;
+ char cl;
+{
+ register STAB *s;
+
+ s = stab(word, ST_CLASS, ST_FIND);
+ return s != NULL && bitnset(cl, s->s_class);
+}
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.75 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.76 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
{
#ifdef LOG
register char *j = macvalue('j', CurEnv);
{
#ifdef LOG
register char *j = macvalue('j', CurEnv);
syslog(LOG_DEBUG, "--- dumping state on %s: $j = %s ---",
when,
j == NULL ? "<NULL>" : j);
if (j != NULL)
{
syslog(LOG_DEBUG, "--- dumping state on %s: $j = %s ---",
when,
j == NULL ? "<NULL>" : j);
if (j != NULL)
{
- s = stab(j, ST_CLASS, ST_FIND);
- if (s == NULL || !bitnset('w', s->s_class))
+ if (!wordinclass(j, 'w'))
syslog(LOG_DEBUG, "*** $j not in $=w ***");
}
syslog(LOG_DEBUG, "--- open file descriptors: ---");
syslog(LOG_DEBUG, "*** $j not in $=w ***");
}
syslog(LOG_DEBUG, "--- open file descriptors: ---");
-static char sccsid[] = "@(#)parseaddr.c 8.47 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c 8.48 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"