Ken Lussier asks for command line tool that allows sending mail using
files to get list of recipients, body, etc.  (Sounds like he's going
to become a spammer.)

        You can do this with any of sh, bash, csh, ksh, perl, python,
maybe even awk or a shell alias.  Sendmail accepts the headers and
body, separated by the first blank line, as an ASCII stream, from
standard in, so you can just cat them to it.  You must also provide
the "to" list as command line arguments to sendmail.  There are flags
for attempting to set the from or sender, however sendmail will add an
"authentication warning" unless the invoking user trying to set sender
is on the list of trusted users in /etc/sendmail.cf (root always is).

        Beware that your ISP may "correct" the sender.

        Another way to deal with a stable list of recipients is with
sendmails alias feature, provided you have sysadmin priveleges.

        Using sendmail like this doesn't require that you are using it
for incomming mail as a daemon.  If you're using some sendmail
replacement it is probably be invoked as sendmail for sending mail
anyway, so that the linkages with sending MUAs and things like
fetchmail don't need to be jiggered, so if you write a script to drive
sendmail, it should work for the others.

                                                        Bill

**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to