[comp.mail.sendmail] sendmail 5.65b - bug in deliver.c

Andy.Linton@comp.vuw.ac.nz (Andy Linton) (03/19/91)

There is a problem in deliver.c in the new release when used on HP-UX 7.0
which causes mail to long lists to be delivered multiple times.

In deliver.c there is new code to handle:

	Long syslog() entries are folded rather than truncated.

This breaks on HP-UX as the buffer available in syslog is smaller than the
constant LOGSPLIT. The size 128 for LOGSPLIT could possibly be larger (but <
200). I don't have time to fiddle with it at present.

The mulitiple delivery occurs when the sendmail child dies after handing the
mail for delivery to e.g. /bin/mail but before deleting the queue files.

The following code solves the problem:
--
*** deliver.c.orig      Tue Mar 19 10:16:07 1991
--- deliver.c   Tue Mar 19 12:17:05 1991
***************
*** 1216,1222 ****
--- 1216,1226 ----
        const char *stat;
  {
  # ifdef LOG
+ # if defined(hpux)
+ #  define LOGSPLIT 128
+ # else /* hpux */
  #  define LOGSPLIT 900
+ # endif /* hpux */
        register char *p, *q;

        /*