send email from command line
Smoot Carl-Mitchell
smoot at tic.com
Wed Sep 24 04:57:18 UTC 2008
On Tue, 2008-09-23 at 22:22 -0300, Derek Broughton wrote:
> Karl Larsen wrote:
>
> > Now there must be a way to set up mail so if you use a good email
> > address like
> >
> > mail k5di at zianet.com
> >
> > it should send that, but I think it is trying to get sendmail to send it
> > and mine is not set up. There should be a way to set the SMTP to be the
> > one we pay for.
>
> No, there shouldn't. Mail was written by people who believe that mail
> clients _shouldn't_ speak SMTP, and it _must_ have a sendmail-compatible
> program to actually deliver the mail.
The above is one model, but there are mail user agents (MUAs) which can
speak SMTP. (e.g. Evolution and Thunderbird among others). There is
nothing in the standards (RFC2821) which prevent an MUA from speaking
SMTP with a Mail Transport Agent (MTA). The usual practice on
Unix/Linux systems is to pass the mail message to a local "sendmail" MTA
process for further processing. Typically, this is handled by passing
the message to the local MTA via a Unix pipe with arguments supplied to
the MTA which give the recipient addresses. The sender address is
typically derived from the uid of the MUA process. This initial message
passing can also be handled via SMTP, if desired.
One of the reasons the email system on Unix/Linux systems has this
architecture is to relieve the MUA from the task of handling transient
errors (network down, DNS failure, remote SMTP server unavailable, etc)
and allow messages to be queued for later delivery. The "sendmail"
process can handle this as a background daemon which makes the delivery
system more robust. In most cases the local MTA which receives the
message is configured to speak SMTP with a more capable SMTP server
which understands how to forward mail to the final email destination.
Typically, this more capable SMTP server is managed by your Internet
provider. In some cases authentication is required to connect to this
server to prevent unauthorized email forwarding.
To reiterate this model was an architectural choice and is not mandated
by the underlying protocol specifications.
--
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005
More information about the ubuntu-users
mailing list