Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!darkstar!ucscb.UCSC.EDU!james From: james@ucscb.UCSC.EDU (James C. Bohem) Newsgroups: comp.mail.mush Subject: Re: Need Help with Mush 7.2.2 and SCO UNIX submit. Summary: 7.2.2 changes Message-ID: <15157@darkstar.ucsc.edu> Date: 29 Apr 91 16:34:46 GMT References: <1991Apr24.053145.1083@rfengr.com> <15112@darkstar.ucsc.edu> Sender: usenet@darkstar.ucsc.edu Organization: University of California, Santa Cruz; Open Access Computing Lines: 393 In article <15112@darkstar.ucsc.edu> james@ucscb.UCSC.EDU (James C. Bohem) writes: >Here are patches for 7.2.0 (I'll send out 7.2.2 just as soon as >I have time to build it...) for SCO Unix to use execmail rather >than submit, and fix the locking problem with EACCES(S). You >will need to add -DSCOUNIX to your makefile. And here's the 7.2.2 diffs, fixed for locking and delivery via execmail. You still need to define SCOUNIX somewhere. Also, one not-yet mentioned problem: you need to #include when compiling for SCO Unix 3.2 with SELECT defined to pick up struct timeval. *** config.h Mon Apr 29 08:36:24 1991 --- config.h-dist Sun Mar 17 10:06:52 1991 *************** *** 1,18 **** - /* config.h 1.1 (c) copyright 1986 (Dan Heller) */ /* Default names and locations for files */ #define MAILRC ".mushrc" #define ALTERNATE_RC ".mailrc" ! #define DEFAULT_RC "/usr/sco/lib/mush/mushrc" ! #define ALT_DEF_RC "/usr/lib/mail/mailrc" ! #define COMMAND_HELP "/usr/sco/lib/mush/cmd_help" #ifdef SUNTOOL ! # define TOOL_HELP "/usr/sco/lib/mush/tool_help" #endif /* SUNTOOL */ #define ALTERNATE_HOME "/tmp" /* Path must be read/write to EVERYONE */ #define EDFILE ".edXXXXXX" /* file/pathname added to user's "home" */ /* * Define INTERNAL_MALLOC and recompile if you have trouble with mush * core-dumping due to malloc/free errors. Also, if you run a System 5 --- 1,55 ---- /* config.h 1.1 (c) copyright 1986 (Dan Heller) */ /* Default names and locations for files */ #define MAILRC ".mushrc" #define ALTERNATE_RC ".mailrc" ! #define DEFAULT_RC "/usr/lib/Mushrc" ! #define ALT_DEF_RC "/usr/lib/Mail.rc" ! #define SIGNATURE ".signature" ! #define FORTUNE "/usr/games/fortune" ! #define COMMAND_HELP "/usr/lib/cmd_help" #ifdef SUNTOOL ! # define TOOL_HELP "/usr/lib/tool_help" #endif /* SUNTOOL */ #define ALTERNATE_HOME "/tmp" /* Path must be read/write to EVERYONE */ #define EDFILE ".edXXXXXX" /* file/pathname added to user's "home" */ + #define LS_COMMAND "ls" + #define LPR "lpr" + #define DEF_PRINTER "lp" + /* If your lpr command understands only -P or -d (or some other flag) then + * define PRINTER_OPT to the appropriate value. If you want to be able to + * use either one, don't define this at all. The defaults (when neither + * -P nor -d is used on the mush "lpr" command line) are as noted here. + * If your lpr requires that the option and the printer name be separate + * arguments, include a trailing space in this definition. + */ + #ifdef SYSV + #define PRINTER_OPT "-d" + #endif /* SYSV */ + #ifdef BSD + #define PRINTER_OPT "-P" + #endif /* BSD */ + + /* default settings for some variable strings */ + #define DEF_PROMPT "Msg %m of %t: " + #define DEF_PAGER "more" /* set to "internal" to use internal pager */ + #define DEF_SHELL "csh" + #define DEF_EDITOR "vi" + #define DEF_FOLDER "~/Mail" /* default Mail folder */ + #define DEF_MBOX "~/mbox" /* default mbox */ + #define DEF_INDENT_STR "> " /* indent included mail */ + #define DEF_ESCAPE "~" + #define DEF_HDR_FMT "%25f %7d (%l/%c) \"%s\"" /* default hdr_format */ + #define DEF_CURSES_HELP \ + "display save mail reply next-msg back-msg screen-next screen-back" + + /* Headers that will NOT be included when forwarding mail */ + #define IGNORE_ON_FWD "status,priority,return-receipt-to" + + #define MAXMSGS 1000 /* Maximum number of messages we can read */ + #define HDRSIZ (2*BUFSIZ) /* This should not be < BUFSIZ! */ + /* * Define INTERNAL_MALLOC and recompile if you have trouble with mush * core-dumping due to malloc/free errors. Also, if you run a System 5 *************** *** 32,39 **** * specified as offsets from GMT, e.g. Pacific Standard Time is -0800. */ /* #define TIMEZONE T->tm_zone /**/ ! #define USA /**/ ! /* mail delivery system macros and defines... */ --- 69,75 ---- * specified as offsets from GMT, e.g. Pacific Standard Time is -0800. */ /* #define TIMEZONE T->tm_zone /**/ ! /* #define USA /**/ /* mail delivery system macros and defines... */ *************** *** 40,67 **** /* * If you are using MMDF, define MMDF here. */ ! #if defined(M_UNIX) && defined(M_XENIX) ! # define MMDF ! #endif /* M_UNIX && M_XENIX */ ! #ifdef MMDF /* * If MMDF delivers mail the user's home directory, define HOMEMAIL. * Also check the definition of the delivery file name MAILFILE, below. */ ! /* #define HOMEMAIL */ ! /* #define MAIL_DELIVERY "exec /usr/mmdf/bin/submit -mlnr" ! /* #define VERBOSE_ARG "Ww" ! /* #define MTA_EXIT 9 /* exit status for successful submit */ ! /* #else /* MMDF */ /* * If you are not using MMDF, check these definitions. */ ! #define MAIL_DELIVERY "/usr/lib/mail/execmail" ! #if defined(MMDF) && defined(M_UNIX) /* execmail under sco unix understands */ ! # define VERBOSE_ARG "-v" /* undef if none exists */ ! # define METOO_ARG "-m" /* man sendmail for more info. */ ! #endif #define MTA_EXIT 0 /* exit status for successful mail delivery */ #endif /* MMDF */ --- 76,98 ---- /* * If you are using MMDF, define MMDF here. */ ! /* #define MMDF /**/ #ifdef MMDF /* * If MMDF delivers mail the user's home directory, define HOMEMAIL. * Also check the definition of the delivery file name MAILFILE, below. */ ! /* #define HOMEMAIL /**/ ! #define MAIL_DELIVERY "exec /usr/mmdf/bin/submit -mlnr" ! #define VERBOSE_ARG "Ww" ! #define MTA_EXIT 9 /* exit status for successful submit */ ! #else /* MMDF */ /* * If you are not using MMDF, check these definitions. */ ! #define MAIL_DELIVERY "/usr/lib/sendmail -i" /* "-i" works like "-oi" */ ! #define VERBOSE_ARG "-v" /* undef if none exists */ ! #define METOO_ARG "-m" /* man sendmail for more info. */ #define MTA_EXIT 0 /* exit status for successful mail delivery */ #endif /* MMDF */ *************** *** 87,103 **** * sophisticated locking modules provided with MMDF. Remember to alter the * Makefile so as to access the MMDF library at the link step. */ ! /* #define LCKDFLDIR "/usr/spool/mail" */ #endif /* MMDF */ /* If your mailer does not understand commas between addresses, you should * define NO_COMMAS. This includes pre-3.0 smail and default MTAs used on * xenix, and sys-v systems. ! * This does NOT apply to MMDF or sendmail. */ ! #ifndef MMDF #define NO_COMMAS /**/ ! #endif /* * Most RFC822 compliant mailers (sendmail) will add the headers From: --- 118,138 ---- * sophisticated locking modules provided with MMDF. Remember to alter the * Makefile so as to access the MMDF library at the link step. */ ! /* #define LCKDFLDIR "/usr/spool/mmdf/lockfiles" /* (for example) */ ! #else /* !MMDF */ ! #ifdef M_XENIX ! #define DOT_LOCK /* DOT_LOCK should be used for SCO Xenix */ ! #endif /* M_XENIX */ #endif /* MMDF */ /* If your mailer does not understand commas between addresses, you should * define NO_COMMAS. This includes pre-3.0 smail and default MTAs used on * xenix, and sys-v systems. ! * This does NOT apply to MMDF or sendmail, in most cases. */ ! #ifdef SUN_4_1 /* SunOS 4.1 has warped sendmail.cf */ #define NO_COMMAS /**/ ! #endif /* SUN_4_1 /* * Most RFC822 compliant mailers (sendmail) will add the headers From: *************** *** 111,122 **** */ /* #define PICKY_MAILER /**/ - /* Headers that will NOT be included when forwarding mail */ - #define IGNORE_ON_FWD "status,priority" /* comma or space separated list */ - - #define MAXMSGS 2000 /* maximum number of messages we can read */ - #define HDRSIZ BUFSIZ /* This should not be < BUFSIZ! (but can be >) */ - /* If your system supports the vprintf() functions, True for sys-v and * later sun versions (3.0+ ?). Typically not true for BSD systems, but * that will probably change in the future. --- 146,151 ---- *************** *** 130,162 **** */ /* #define GETWD /**/ - #define LS_COMMAND "ls" - #define FORTUNE "/usr/games/fortune" - #define LPR "lpr" - #define SIGNATURE ".signature" #ifdef HOMEMAIL ! #define MAILFILE ".mailbox" /* or whatever */ #else /* HOMEMAIL */ #define MAILDIR "/usr/spool/mail" #endif /* HOMEMAIL */ - - /* default settings for some variable strings */ - #define DEF_PROMPT "Msg %m of %t: " - #define DEF_PAGER "more" /* set to "internal" to use internal pager */ - #define DEF_SHELL "csh" - #define DEF_EDITOR "vi" - #define DEF_FOLDER "~/Mail" /* default Mail folder */ - #define DEF_MBOX "~/mbox" /* default mbox */ - #define DEF_INDENT_STR "> " /* indent included mail */ - #define DEF_PRINTER "" - #define DEF_ESCAPE "~" - #define DEF_HDR_FMT "%25f %7d (%l/%c) \"%s\"" /* default hdr_format */ - #define DEF_CURSES_HELP \ - "display save mail reply next-msg back-msg screen-next screen-back" - - #ifdef M_XENIX - # ifndef MMDF - # define DOT_LOCK /* why isn't this defined? */ - # endif /* !MMDF */ - # define quit quitter - #endif /* M_XENIX */ --- 159,166 ---- */ /* #define GETWD /**/ #ifdef HOMEMAIL ! #define MAILFILE "Mailbox" /* or whatever */ #else /* HOMEMAIL */ #define MAILDIR "/usr/spool/mail" #endif /* HOMEMAIL */ *** curs_io.c Mon Apr 29 08:59:52 1991 --- curs_io.c.orig Mon Apr 29 08:59:09 1991 *************** *** 5,14 **** #include "bindings.h" #include "glob.h" - #if defined(M_UNIX) && defined(SELECT) - #include - #endif /* M_UNIX && SELECT */ - static backspace(); #if !defined(M_XENIX) || (defined(M_XENIX) && !defined(CURSES)) --- 5,10 ---- *** mail.c Mon Apr 29 08:56:23 1991 --- mail.c.orig Mon Apr 29 08:51:49 1991 *************** *** 1110,1120 **** if (!istool && (ison(flags, VERBOSE) || do_set(set_options, "verbose"))) { turnon(flags, VERBOSE); /* prevent fork when "verbose" has changed */ oldchld = signal(SIGCHLD, SIG_DFL); /* let pclose() do the wait() */ ! #if defined(MMDF) && !defined(SCOUNIX) b = &buf[strlen(sprintf(buf, "%s%s", p, VERBOSE_ARG))]; #else /* MMDF */ b = &buf[strlen(sprintf(buf, "%s %s", p, VERBOSE_ARG))]; ! #endif /* MMDF && !SCOUNIX */ } else #endif /* VERBOSE_ARG */ b = buf + Strcpy(buf, p); --- 1110,1120 ---- if (!istool && (ison(flags, VERBOSE) || do_set(set_options, "verbose"))) { turnon(flags, VERBOSE); /* prevent fork when "verbose" has changed */ oldchld = signal(SIGCHLD, SIG_DFL); /* let pclose() do the wait() */ ! #ifdef MMDF b = &buf[strlen(sprintf(buf, "%s%s", p, VERBOSE_ARG))]; #else /* MMDF */ b = &buf[strlen(sprintf(buf, "%s %s", p, VERBOSE_ARG))]; ! #endif /* MMDF */ } else #endif /* VERBOSE_ARG */ b = buf + Strcpy(buf, p); *************** *** 1294,1302 **** return fork_pid; } ! #if defined(MMDF) && !defined(SCOUNIX) *(addr_list-1) = '\0'; ! #endif /* MMDF && !SCOUNIX */ if (debug > 2) { files[0] = stdout; if (!*addr_list) --- 1294,1302 ---- return fork_pid; } ! #ifdef MMDF *(addr_list-1) = '\0'; ! #endif /* MMDF */ if (debug > 2) { files[0] = stdout; if (!*addr_list) *************** *** 1314,1320 **** if (ison(flags, VERBOSE)) wprint("Sending letter ... "), (void) fflush(stdout); ! #if defined(MMDF) && !defined(SCOUNIX) /* give address list to submit */ for (p = addr_list; *p && (p = any(p, ",<")); p++) if (*p == ',') --- 1314,1320 ---- if (ison(flags, VERBOSE)) wprint("Sending letter ... "), (void) fflush(stdout); ! #ifdef MMDF /* give address list to submit */ for (p = addr_list; *p && (p = any(p, ",<")); p++) if (*p == ',') *************** *** 1323,1329 **** p = index(p, '>'); if (*addr_list) (void) fprintf(files[0], "%s\n\n", addr_list); ! #endif /* MMDF && !SCOUNIX */ /* see if log is set. This is just to add message headers. No msg body. */ if (p = do_set(set_options, "logfile")) { --- 1323,1329 ---- p = index(p, '>'); if (*addr_list) (void) fprintf(files[0], "%s\n\n", addr_list); ! #endif /* MMDF */ /* see if log is set. This is just to add message headers. No msg body. */ if (p = do_set(set_options, "logfile")) { *** lock.c Mon Apr 29 08:51:41 1991 --- lock.c.orig Mon Apr 29 08:46:17 1991 *************** *** 96,102 **** #undef EWOULDBLOCK #endif /* EWOULDBLOCK */ #ifdef M_UNIX ! #define EWOULDBLOCK EACCES /* SCO bug that may eventually be fixed */ #else /* !M_UNIX */ #define EWOULDBLOCK EAGAIN #endif /* M_UNIX */ --- 96,102 ---- #undef EWOULDBLOCK #endif /* EWOULDBLOCK */ #ifdef M_UNIX ! #define EWOULDBLOCK EACCESS /* SCO bug that may eventually be fixed */ #else /* !M_UNIX */ #define EWOULDBLOCK EAGAIN #endif /* M_UNIX */ *************** *** 234,244 **** #ifdef LCKDFLDIR if (Access(filename, any(mode, "aw+") ? W_OK : R_OK) == 0) #else /* !LCKDFLDIR */ - # if defined(MMDF) && defined(SCOUNIX) - if (errno == EACCES || errno == EAGAIN) - # else if (errno == EWOULDBLOCK) - # endif /* MMDF && SCOUNIX */ #endif /* LCKDFLDIR */ { if (isoff(glob_flags, REDIRECT)) --- 234,240 ----