summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2021967)
up debugging output. The major change is that test mode (-bt)
doesn't automatically run through ruleset three any more.
SCCS-vsn: usr.sbin/sendmail/src/main.c 5.45
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 5.17
SCCS-vsn: usr.sbin/sendmail/src/version.c 5.92
SCCS-vsn: usr.sbin/sendmail/src/util.c 5.24
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 5.32
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 5.44 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 5.45 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#endif /* not lint */
#define _DEFINE
(void) putchar(j);
printf(" E=");
xputs(m->m_eol);
(void) putchar(j);
printf(" E=");
xputs(m->m_eol);
+ if (m->m_argv != NULL)
+ {
+ char **a = m->m_argv;
+
+ printf(" A=");
+ while (*a != NULL)
+ {
+ if (a != m->m_argv)
+ printf(" ");
+ xputs(*a++);
+ }
+ }
- printf("ADDRESS TEST MODE\nEnter <ruleset> <address>\n");
+ printf("ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)\n");
+ printf("Enter <ruleset> <address>\n");
for (;;)
{
register char **pvp;
for (;;)
{
register char **pvp;
pvp = prescan(++p, ',', pvpbuf);
if (pvp == NULL)
continue;
pvp = prescan(++p, ',', pvpbuf);
if (pvp == NULL)
continue;
p = q;
while (*p != '\0')
{
p = q;
while (*p != '\0')
{
-static char sccsid[] = "@(#)parseaddr.c 5.16 (Berkeley) %G%";
+static char sccsid[] = "@(#)parseaddr.c 5.17 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
for (rwr = RewriteRules[ruleset]; rwr != NULL; )
{
for (rwr = RewriteRules[ruleset]; rwr != NULL; )
{
if (tTd(21, 12))
{
printf("-----trying rule:");
if (tTd(21, 12))
{
printf("-----trying rule:");
avp = pvp;
while ((ap = *avp) != NULL || *rvp != NULL)
{
avp = pvp;
while ((ap = *avp) != NULL || *rvp != NULL)
{
+ if (++loopcount > 100)
+ {
+ syserr("Infinite loop in ruleset %d", ruleset);
+ break;
+ }
rp = *rvp;
if (tTd(21, 35))
{
rp = *rvp;
if (tTd(21, 35))
{
xputs(rp);
printf("\n");
}
xputs(rp);
printf("\n");
}
-static char sccsid[] = "@(#)readcf.c 5.31 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c 5.32 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
LineNumber = 0;
while (fgetfolded(buf, sizeof buf, cf) != NULL)
{
LineNumber = 0;
while (fgetfolded(buf, sizeof buf, cf) != NULL)
{
+ if (buf[0] == '#')
+ continue;
+
/* map $ into \001 (ASCII SOH) for macro expansion */
for (p = buf; *p != '\0'; p++)
{
/* map $ into \001 (ASCII SOH) for macro expansion */
for (p = buf; *p != '\0'; p++)
{
syserr("unknown control line \"%s\"", buf);
}
}
syserr("unknown control line \"%s\"", buf);
}
}
+ if (ferror(cf))
+ {
+ syserr("Error reading %s", cfname);
+ exit(EX_OSFILE);
+ }
+ fclose(cf);
- syserr("`=' expected");
+ syserr("mailer %s: `=' expected", m->m_name);
return;
}
while (isspace(*p))
return;
}
while (isspace(*p))
case 'F': /* flags */
for (; *p != '\0'; p++)
case 'F': /* flags */
for (; *p != '\0'; p++)
- setbitn(*p, m->m_flags);
+ if (!isspace(*p))
+ setbitn(*p, m->m_flags);
break;
case 'S': /* sender rewriting ruleset */
break;
case 'S': /* sender rewriting ruleset */
-static char sccsid[] = "@(#)util.c 5.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c 5.24 (Berkeley) %G%";
#endif /* not lint */
# include <stdio.h>
#endif /* not lint */
# include <stdio.h>
+ case '\001':
+ (void) putchar('$');
+ continue;
+
default:
(void) putchar('^');
(void) putchar(c ^ 0100);
default:
(void) putchar('^');
(void) putchar(c ^ 0100);
-static char sccsid[] = "@(#)version.c 5.91 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c 5.92 (Berkeley) %G%";
-char Version[] = "5.91";
+char Version[] = "5.92";