In article <01vku3-(E-Mail Removed)>, Chris Davies <chris-(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
> > I love mulinux's minimalist scripts, and have been able to
> > figure out from them that:
> > cat <pre-prepared email file> | sendmail -t
> > will send an email.
>
> If you're into minimalism, just do "sendmail -t < preprepared_file". You
> almost never need "cat" if you're referencing a single file.
>
>
OK, I propably just extracted the 'send' cmnd from his loop.
BTW what means:
cat <fileName> << EOF
and
cat << EOF
?
He writes ash for small size, but I'm guessing it's valid/similar for bash ?
> > nc -v -w 60 -e $SMTP_PRO $host $SMTP_PORT
>
> > Where "$SMTP_PRO" is the [inner] script which supplies the data
> > for nc.
>
> > Since I haven't got proper nc with its man, I can't see how this works.
> > Is "-e $SMTP_PRO" effectively considered as a 'list' of files supplied
> > by the $SMTP_PRO script ?
>
> The "-e" option to nc specifies a filename to exec after the connect
> has occurred, which in your example's case is a connection to "$host"
> on port $SMTP_PORT (probably 25).
>
>
> > So if I replaced it with <Email File>, would I be able to post
> > one Email?
>
> Of course not; $SMTP_PRO is a script that's executed, not a data file.
> You need to look at the contents of SMTP_PRO to determine whether it can
> easily be tweaked to send a single email.
>
>
So can you proposes a one/two line script, to send one email-file ?
So far:
sendmail -t < preparedEmail_file -fname2tst
mails to my other URL, but gives a false
Return-Path: <(E-Mail Removed)>
I have to run as root, to hack this stuff, and I can't see how/where
to set the domain. I tried to set & export 'HOSTNAME' from inside
the script which calls sendmail, but failed.
> > My ISP is down for testing if mails are received !
>
> I have no idea what you mean by that statement.
>
>
My ISP is presently non-functional, for the purpose of me testing if
any mails which I transmit are received by another URL [than the
Txing URL].
> > How would I post one News Article using 'nc', where I want
> > to simplify his:
> > nc -v -w 60 -e $NNTP_PRO $NTPSERVER nntp
> > by supplying just one NewsArticle-file instead of his "$NNTP_PRO" ?
> > I can see what $NTPSERVER and nntp resolve to.
>
> You would need a script referenced by $NNTP_PRO that spoke the NNTP
> protocol for you. I suspect in your case this would include parsing
> the newsgroup names from one or more articles, and generating local
> message-ids.
>
Yes, it looks as if that's what his ash-script does.
I'd like to 'stub it out'.
Ie. use succcessive refinement.
Ie. first just pass one news article and the $NTPSERVER and the protocol
[nntp], instead of a routine to do all this.
There must be basic templates for nc to do:
* send one email,
* send one NewsArticle,
* ...etc.
> Chris
>
Thanks,
== Chris Glur.