So I'm using various resources (the web, these forums, man pages, and the sendmail website) to construct a sendmail command line.
A sample email has been created for testing purposes. it consists of:
Code:
Date: Sat, 6 Dec 2008 14:58:15 -0500
From: ***********
To: test@testmail.info
Subject: komisoar
Message-ID: <20081206195815.GA3515@darkstar>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.3i
Sample text in body of the email, hey
In the above, I've replaced my correct actual email address with the *'s, obviously.
The sendmail command that I have crafted (so far) is:
Code:
cat test.txt | /usr/sbin/sendmail -t
The above command has actually been tried. It runs without error messages and returns to the prompt.
Waiting, checking mail and poking around the hard drive eventually revealed that the email was not sent to my ISP. It was instead interred in a place on my hard drive, in var/spool/mqueue. There were two text files with garbly names. One contained the message body. The other contained headers, including extra ones added by sendmail. Inspection of the headers revealed that sendmail had no knowledge of my isp's email server name. This, in retrospect, is reasonable. After all, I had not told sendmail this information.
So, there is only one bit of data needed to get my mail-sending working: there is a place, in the place is a file. In this file needs to be added a string. This string is the name of my ISP's smtp server. I know the name of my ISP's smtp server but I can't figure out how to let sendmail in on it.
I found the location of the configuration file for sendmail. It's contents were ... obtuse.
The man page makes no mention of specifying the smtp server. Google searching has many results, none which were helpful. In a similar fashion and with similar result, these forums were searched. The sendmail web site was ... beyond me.
This indicates on of two things.
One, sendmail doesn't actually do what I think it does and I'm barking up the wrong tree. I'm using a tool created for one purpose for a completely different purpose.
Two, sendmail has an easy and obvious way of specifying the smtp server, but I've overlooked it: read it right on the man page but, because of the particular phrasing, did not recognize it for what it was.
In the case of option two, how can I achieve the desired result, that is, to send mail from a command line?
Thank you in advance.