[EMAIL PROTECTED] wrote on 17.01.2002 15:55 -0800:

> I created a file called /tmp/a with the following lines
> 
> Subject: Test
> To: [EMAIL PROTECTED]
> Mime-Version: 1.0
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
> Test

You always need an empty line between header and body or
everything will be considered as 'header'.
Also make shure the last line ends with a (invisible) newline.

> I then run the following as root on Redhat 7.1
> 
> Cat /tmp/a | /usr/lib/courier/bin/sendmail [EMAIL PROTECTED]

Dont know nothing about capital `Cat`, hope this was just a typo.
Maybe DeadRat has a binary or script with this name (and unknown
functionality) installed ?

This is also a good candidate for the 'useless use of cat', (see
http://www.ling.helsinki.fi/~reriksso/unix/award.html) one should
execute the example above as:

/usr/lib/courier/bin/sendmail [EMAIL PROTECTED] < /tmp/a

(dont abuse the 'domain.com', 'example.com' would be much better)

> The following was returned
> 
> /usr/lib/courier/bin/sendmail: Subject:: command not found
> /usr/lib/courier/bin/sendmail: To:: command not found
> /usr/lib/courier/bin/sendmail: Mime-Version:: command not found
> /usr/lib/courier/bin/sendmail: Content-Type:: command not found
> /usr/lib/courier/bin/sendmail: Content-Transfer-Encoding:: command not

Your shell (or Cat) seems badly confused, and I am missing the
messages about Cat and Test: here. Makes the confusion complete.

Different shells have different behaviour, thats why the script in
my previous post starts with #!/bin/sh, the universally preferred
and recommended shell for scripting (avoid csh at any cost).
Depending on your shell commands will work differently in scripts.

To use /bin/sh simply type `sh`, and the prompt will change.

> Have I configured courier incorrectly?

Courier's sendmail is not capable of such verbose messages, would
only say something like '...unexpected EOF from submit...' :)

Roland


_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to