In message <199903251721.AA156662490@broccoli.graphics.cornell.edu>, you wrote:
>>>Anybody here know how to get 8.9.1 to do the right thing?
>>Try this alias instead. It might work. I think it will.
>>foo: "|/usr/bin/tail +2 | /usr/sbin/sendmail -oi -fowner-foo foo-out"
>Ok, remarkably enough this does work, which means the blank line
>is getting prepended to the message _before_ it is passed to the
>command in the alias.
No. Not a blank line.
The first line that sendmail will write to any command that you invoke via
/etc/aliases will (unless you have hacked up your sendmail.cf file to do
something odd) be an "envelope From_" line... in other words a line that
starts with the word "From" followed by a single blank space, and then
followed by the sender's address and then a blank and then the date/time.
Any message that has such a line at the start of it is considred to be in
what is commonly known as "standard UNIX mailbob/maildrop format".
That's swell, if you are going to append what sendmail give to your command
to some standard format UNIX mailbox/maildrop file, but that is NOT at all
what YOU were doing with this stuff. In your case, you were handing this
stuff off to a new and different instance of sendmail.
That new and different instance of sendmail was expecting to see a set of
standard *mail headers* at the start of the text you were feeding it on
its stdin... in other words a set of lines, each of which contained a
sequence of non-rfc822-special characters FOLLOWED BY A COLON and then
perhaps followed by some other stuff.
Instead, the first line is saw was the envelope From_ line. That line
*does not* qualify as a mail header. (Sendmail tried to parse that, got down
to the first blank space after the "From", and said ``Hey! What the hay!
This ain't no mail header! It must be the start of body text. I'll make
up a complete set of header myself and prepend those.)
The revised alias definition I gave you just slices off that initial envelope
from line, so that it won't be the to confuse the instance of sendmail you
invoke within the alias definition.
>Surely there's a way to prevent the blank line from happening in the
I believe that there probably _is_ a way to prevent the initial *envelope
From* line from being generated when and if sendmail is trying to "deliver"
a message to a program. Read the part about "mailer options" in the Bat
Book or in the Sendmail op.ps document. BUT I'LL BET THAT YOU DO NOT WANT
TO CHANGE THIS. If you change this option for your "prog" mailer, you will
very likely be breaking some other things elsewhere. So if I were you, I
wouldn't even try it. Just use the revised alias I gave you.
>I find it hard to believe that everyone running a recent
>version of sendmail is adding tail +2 to all their list aliases.
Hardly anyone is taking messages that sendmail is trying to deliver, locally,
and then trying to pipe those *back* into sendmail again! (And even _you_
probably don't _have_ to do this. If you knew how to hack Sendmail rulesets
well enough... a skill which even I myself do not have... then you could pro-
bably do everything you want to do _without_ even invoking a second instance
>Or do programs like majordomo's 'wrapper' check for this and do it
Beats me. I are not a Majordomo hack.
-- Ron Guilmette, Roseville, California ---------- E-Scrub Technologies, Inc.
-- Deadbolt(tm) Personal E-Mail Filter demo: http://www.e-scrub.com/deadbolt/
-- Wpoison (web harvester poisoning) - demo: http://www.e-scrub.com/wpoison/
"Ping can be used offensively, and it's shipped with every windows CD"
-- Steve Atkins