Found another problem in 'resend'...
The logic that resend uses to determine whether an input line is in the
header of a message is slightly flawed in the situation where an 'Approved:'
line comes as the first line in the *body* of a message.
In this situation, 'resend' sets the variable $restart to 1, and returns
to the start of it's main loop. This causes the variable $pre_hdr to be
set to '1' also.
If $pre_hdr is 1, and the next line of input is not a blank line, the
variable $in_hdr is set to 1. This is flawed, as in this situation, the
next line of input is probably the first line of the 'real' text of
the message, but resend thinks it, and every succeeding non-blank line,
is a header line. The next blank line causes resend to think that the
header is finished, whereupon it spits out a 'Sender:' line and
possibly a 'Reply-To:' line.
Example - a moderated list called 'test', with password 'passwd'...
/usr/ucb/Mail -s "" test
Approved: passwd
this is a test
this is a test
this is a test
this is a test
^D
What resend sees as it's input is:
|
|