Sam Roberts [mutt-users] <19/06/01 12:50 -0400>: 
> Huh? What will work? mailx? And the man page for mail also
> only describes it's use as an interactive mail program, not
> for programmatic injection of mail into the mail transfer
> system.
 
 Do me a favor, try it first.

> > suresh@blackehlo:~$ cat test.txt |sendmail -v [EMAIL PROTECTED] 
>[EMAIL PROTECTED]
> 
> Why thanks for that even MORE terse example of sendmails command
> line. I hope it didn't take you too much time, since it surely
> does not describe what sendmail did.
 
 OK ... cat = reads in the contents of the file test.txt

 As for sendmail,

 -v = verbose (giving you that ESMTP transaction)
 [EMAIL PROTECTED] => it is from [EMAIL PROTECTED] (sets the envelope sender)

 the mail is sent to [EMAIL PROTECTED]

> > 250 2.1.5 <[EMAIL PROTECTED]>... Recipient ok
> > 354 Enter mail, end with "." on a line by itself
> > >>> .
> 
> Note that a 0-length message doesn't even come close to being
> an RFC822 mail message. Hopefully the receiving MTA will be
> adding some headers.
 
 No ... not zero length.  You missed this ...

 >>> MAIL From:<[EMAIL PROTECTED]> SIZE=4751
                                         ^^^^
                                         4 kb

> But which ones? Will From: be your user name, or will it be made
> equivalent to the envelope sender you provided on the cmd

see above.

> line? Will a message-id: and date: be added? What about a subject?

All these can be added in test.txt

> And if was an rfc822 message, would any headers it had
> be honored? And what about BCC: fields, would they be stripped?
 
BCC?  RCPT TO: is all that counts in a ESMTP transaction.

See this - and guess what's the to and what's the bcc

EHLO test
MAIL FROM: <[EMAIL PROTECTED]>
RCPT TO: <b@foo>
RCPT TO: <c@foo>
RCPT TO: <d@foo>
DATA
From: [EMAIL PROTECTED] (A User)
To: b@foo (B at Foo)
Date: Wed, 20 Jun 2001 00:03:43 +0530
Subject: Test
Message-Id: <[EMAIL PROTECTED]>

Hi B, C and D

This is a test message
.
QUIT

> My point is that the documentation of how submitted mail
> is processed by mail, mailx, or sendmail is conspiculously
> absent, a problem I'm sure you're aware of since you
> (rightly) seem to have an appreciation for the value of RTFM.
> It's a gaping hole in Unix documentation.
 
 Unix is user friendly - but it is very choosy about its friends ;)

        --suresh

-- 
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin  

Reply via email to