+ (void) strcat(from, uf);
+ (void) fstat(0, &sbuf);
+ (void) lseek(0, position, L_SET);
+
+ /*
+ * Now we rebuild the argument list and chain to sendmail. Note that
+ * the above lseek might fail on irregular files, but we check for
+ * that case below.
+ */
+ i = 0;
+ args[i++] = _PATH_SENDMAIL;
+ args[i++] = "-oee"; /* no errors, just status */
+ args[i++] = "-odq"; /* queue it, don't try to deliver */
+ args[i++] = "-oi"; /* ignore '.' on a line by itself */
+ if (fsys[0] != '\0') { /* set sender's host name */
+ static char junk2[512];
+
+ if (index(fsys, '.') == NULL) {
+ (void) strcat(fsys, ".");
+ (void) strcat(fsys, Domain);
+ }
+ (void) sprintf(junk2, "-oMs%s", fsys);
+ args[i++] = junk2;
+ }
+ /* set protocol used */
+ (void) sprintf(junk, "-oMr%s", Domain);
+ args[i++] = junk;
+ if (from[0] != '\0') { /* set name of ``from'' person */
+ static char junk2[512];
+
+ (void) sprintf(junk2, "-f%s", from);
+ args[i++] = junk2;
+ }
+ for (; *++argv != NULL; i++) {
+ /*
+ * don't copy arguments beginning with - as they will
+ * be passed to sendmail and could be interpreted as flags
+ * should be fixed in sendmail by using getopt(3), and
+ * just passing "--" before regular args.
+ */
+ if (**argv != '-')
+ args[i] = *argv;
+ }
+ args[i] = NULL;