[Tfug] Diverted stdin problem

jblais joe.blais at pti-instruments.com
Thu Dec 6 19:02:44 MST 2007


I'm talking to myself - so I'm stoopid!

So, this worked manually:

 $ sendmail idiot at me.com < message

I just started to learn about sendmail !!

I copied a bit of junk ('nitty-gritty' stuff) out of the sent.mail file that
the email app creates from successful attempts, and put it into a file
called 'message'.  Then I manually did the sendmail command above, and it
worked.  My guess is that the program I found (email), takes parameters from
its own config file, then does stuff to envoke vi or whatever to "bundle" a
simple email app that users can just say 'email to.you at whatever' and envokes
the editor, and sends it when done.  So 'email' created a "message" file
itself with 'nitty-gritty', and calls 'sendmail' in a way similar thing to
what I did manually.  So perhaps when I call the '< /tmp/my.txt' to push in
the text I want to send into the 'email' app, it then does 'sendmail address
< message'  or whatever.  Then the shell gets confused with which redirect
to sent to sendmail, and which goes to email, which is why it successfully
sent an email the body of which was 'nitty-gritty' rather than text....

So-- now my problem is:  what is in the 'nitty-gritty' part of 'message' so
that I can generate 'message' myself and make a system call directly to
sendmail?

joe


> -----Original Message-----
> From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org]On Behalf Of
> jblais
> Sent: Thursday, December 06, 2007 5:46 PM
> To: Tucson Free Unix Group
> Subject: Re: [Tfug] Diverted stdin problem
>
>
> I'm replying to myself but--
> Might
>  $ execl( "/bin/bash",  ....
> be better than
>  $ execl( "/bin/sh",  ....
> -- is sh a link to bash, thus getting me yet one more level deeper so that
> <   doesn't work anymore?
> Joe
>
>
> > -----Original Message-----
> > From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org]On Behalf Of
> > jblais
> > Sent: Wednesday, December 05, 2007 10:07 AM
> > To: Tfug
> > Subject: [Tfug] Diverted stdin problem
> >
> >
> > Hello -





More information about the tfug mailing list