send mail from shell on 8.04 server (how to?)

James Michael Fultz croooow at gmail.com
Mon Oct 12 19:05:11 UTC 2009


* Nik N <niknot at gmail.com> [2009-10-12 16:41 +0000]:
> Rashkae <ubuntu at tigershaunt.com> wrote:
> 
> > You'll need to install a 'sendmail' binary.  Whether that is sendmail
> > itself, or Postfix, or one of the other lightweight alternatives.  It
> > need not run as a service, since most native unix mail applications will
> > will pipe the e-mail to the binary, rather than use smtp.
> 
> thanks, but that is actually what I'm trying to avoid. I am extremely
> careful about what I  install on the server - and that includes mail
> clients like mutt. I was hoping there would be a small, simple binary
> that would communicate directly with my isp's smtp server when invoked
> in a shell script, then terminate never to be seen or heard until
> explicitly invoked by the shell again.

Traditionally, mail user agents (MUAs) relied on mail transfer agents
(MTAs) for sending mail.  Then some mail clients such as Pine started
integrating that functionality.  With the exception of mail clients that
have built-in SMTP, it's really the MTA that comes before the MUA in
facilitating sending mail.  You could send mail with only an MTA
composing the headers yourself and feeding the message to an MTA.

You're going to need an MTA, unless you use another MUA that has builtin
SMTP such as Mutt.  An MTA does not need to be daemonized.  You can have
an MTA that is run on-demand, as Rashkae has pointed out.  Something
like mstmp or ssmtp would probably serve your purposes.




More information about the ubuntu-users mailing list