[X-Unix] Simple commandline mail client

James Bucanek subscriber at gloaming.com
Tue Feb 3 07:28:52 PST 2004


Peter Marreck wrote on Tuesday, February 3, 2004:

>Here's my situation- I merely want to be able to enter some SMTP 
>settings (server, login, etc.) in a config file (or as additional 
>parameters on a commandline) so I can do something like "mail me at me.com 
>'this is the subject' 'this is the body'" so I can include it in a 
>script. I don't want to have to mess with installing or configuring 
>mail SERVERS such as Postfix etc., and I don't want something that will 
>automatically break with the next OS upgrade. I also don't necessarily 
>want to applescript mail.app. Does anyone know of such a CL app?

The tool is called 'sendmail', it's built in, and will do everything you need.  If you are using OS X 10.3, Postfix is already installed and configured for use as a simply mail delivery agent.  All you have to do is turn is on by editing your /etc/hostconfig file to say

    MAILSERVER=-AUTOMATIC-

This does not turn your system into a mail server, but will fire up just enough of Postfix engine to send mail.

Caveat: If you are behind a firewall that prohibits or restricts outgoing SMTP connections, then you might, indeed, have some additional configuration work to do before sendmail will deliver for you.  But it's not difficult.

______________________________________________________
James Bucanek       <mailto:privatereply at gloaming.com>



More information about the X-Unix mailing list