send email from command line
Karl Larsen
k5di at zianet.com
Wed Sep 24 21:45:06 UTC 2008
Smoot Carl-Mitchell wrote:
> On Wed, 2008-09-24 at 17:03 -0300, Derek Broughton wrote:
>
>> Smoot Carl-Mitchell wrote:
>>
>
>
>>> There is a distinct difference between SMTP and writing a mail message
>>> to a file. SMTP is a transport protocol which defines the interaction
>>> between a client (sender) and a server (receiver) to move a mail message
>>> from one to the other. You may be confusing the difference between the
>>>
>> Don't be insulting. Of course I'm not confusing anything. There _isn't_ a
>> distinct difference. There's nothing essentially different between the
>> following conversation (system responses trimmed for clarity):
>>
>
> Whatever. Read the protocol specs. You are comparing apples to
> oranges.
>
>
>> and:
>> derek at bella:~$ mailx -s "test mailx" derek
>> this is the message
>> .
>>
>> (and mailx's actual dialog with sendmail is more complicated than that...)
>>
>
> There is no dialogue in mailx's interaction with the sendmail process.
> It is simply a unidirectional pipe from mailx to sendmail down which the
> message is passed. mailx checks the exit code of the sendmail process
> to see if the operation was successful. It is a trivial operation
> compared to handling a bidirectional SMTP dialogue.
>
>
>>> Why go through all the muck of setting up a
>>> network connection
>>>
>> In Unix, "all the muck" of setting up a network connection has never been
>> harder than opening a file (well, maybe once - before my time - but a
>> network connection and a file are both just sockets).
>>
>
> It is a tad harder and handling the dialog is definitely harder than
> managing a unidirectional pipe to a forked process. Take a look at the
> client smtp code in sendmail and compare it with the pipe/fork handling
> of sending a mail messages in mailx sometime.
>
Well reading man exim and common sense tells me if sendmail or exim
are going to send your mailx message out to the world it must have at
the very least a source for DNS service and a registered IP number. How
these are sent to the software is very obscure.
If all you want is to use mailx between users on your computer mailx
has that capability built in and you don't need sendmail. If you want to
reach out to the Internet from mailx you need sendmail properly set up
to do this, and I for one are not smart enough to do this.
Karl
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7
More information about the ubuntu-users
mailing list