[comp.mail.sendmail] sendmail woes with UNIX-NIFTP

jim@cs.strath.ac.uk (Jim Reid) (08/18/88)

Our spool filesystem got filled up one weekend with an enormous number
of identical "temporary" files for incoming mail. We traced this down
to sendmail's feature of considering lines beginning with a dot as end
of file. It should come as no surprise that the failing mail contained
just such a line.

When this mail was passed to sendmail, it took everything up to the
line with the dot and then went away. This caused unix-niftp to get a
SIGPIPE which it duly returned to the sending mail site as a temporary
mailer error, causing them to re-send the mail and so repeating the
cycle until the disk space ran out.

This can be fixed by setting sendmail's i option to ignore lines
containing dots. There are two ways to do this. The first is just to
add a line "Oi" to sendmail.cf. This works, but will break SMTP mail
which uses this dot at the start of line convention to mean end of
data. The other way is for unix-niftp to invoke sendmail with an extra
argument of -oi. This meant tweaking the mailfmt structure entry for
sendmail in niftp/lib/gen/conf.c. Here's how it should look:

	struct mailfmt mailfmt[CONF_MAX] = {
	............
	{ "sendmail",  "%s -t", "%s -ba -oi -oMs%s", ADD_TO | ADD_SUBJ | ADD_BLANK},
	............
	}

[To Piete Brooks: please see this hack gets intergrated into the
unix-niftp master sources.]

Note that simply editing the MAILPROG entry in /etc/niftptailor will
have disastrous results. This causes unix-niftp to use its own mailer
that ends up calling sendmail with the wrong arguments, so screwing up
all incoming JANET mail!

		Jim

robert@vax1.computing-maths.cardiff.ac.uk (Robert Evans) (08/23/88)

In Revision 5.0.1.6 of core-niftp it IS possible to make the required
alteration (ie add argument -oi to sendmail's invocation) in /etc/niftptailor.

Instead of amending the source of conf.c to:
|	struct mailfmt mailfmt[CONF_MAX] = {
|	............
|	{ "sendmail", "%s -t", "%s -ba -oi -oMs%s", ADD_TO|ADD_SUBJ|ADD_BLANK},
|	............
|	}

add entries:
MAILPROG	/usr/lib/sendmail
MAILFMT		sendmail, "%s -t", "%s -ba -oi -oMs%s", 7

to /etc/niftptailor.   The MAILFMT line replaces the format used when
sendmail is the mailer.
7 is the bitmap corresponding to ADD_TO|ADD_SUBJ|ADD_BLANK.

(Piete Brooks mentions this in file README.mail with Rev 5.0.1.6).


-- 
-- 
  Robert Evans, Dept of Computing Maths, University College Cardiff,
  PO Box 916, Cardiff, Wales, UK, CF2 4YN.  Tel: +44 (0)222 874000 x 5518
  E-mail: R.Evans@computing-maths.cardiff.ac.uk     UUCP: R.Evans@cf-cm.UUCP