changes to recognize special mailer types (e.g., file) early
[unix-history] / usr / src / usr.sbin / sendmail / src / main.c
index 386f2c9..f5a44ab 100644 (file)
@@ -13,7 +13,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     6.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     6.4 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -559,18 +559,32 @@ main(argc, argv, envp)
        expand("\001j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv);
        MyHostName = jbuf;
 
        expand("\001j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv);
        MyHostName = jbuf;
 
-       /* the indices of local and program mailers */
+       /* the indices of built-in mailers */
        st = stab("local", ST_MAILER, ST_FIND);
        if (st == NULL)
                syserr("No local mailer defined");
        else
                LocalMailer = st->s_mailer;
        st = stab("local", ST_MAILER, ST_FIND);
        if (st == NULL)
                syserr("No local mailer defined");
        else
                LocalMailer = st->s_mailer;
+
        st = stab("prog", ST_MAILER, ST_FIND);
        if (st == NULL)
                syserr("No prog mailer defined");
        else
                ProgMailer = st->s_mailer;
 
        st = stab("prog", ST_MAILER, ST_FIND);
        if (st == NULL)
                syserr("No prog mailer defined");
        else
                ProgMailer = st->s_mailer;
 
+       st = stab("*file*", ST_MAILER, ST_FIND);
+       if (st == NULL)
+               syserr("No *file* mailer defined");
+       else
+               FileMailer = st->s_mailer;
+
+       st = stab("*include*", ST_MAILER, ST_FIND);
+       if (st == NULL)
+               syserr("No *include* mailer defined");
+       else
+               InclMailer = st->s_mailer;
+
+
        /* operate in queue directory */
        if (chdir(QueueDir) < 0)
        {
        /* operate in queue directory */
        if (chdir(QueueDir) < 0)
        {