best/easiest commandline email program for mass-email

Hal Burgiss hal at
Fri Jan 29 11:33:58 UTC 2010

On Thu, Jan 28, 2010 at 5:23 PM, Alex Janssen <alex at> wrote:
> Hal Burgiss wrote:
>> As mentioned, the mailx packaged (I think) contains the 'mail' command:
> Well, that's real good idea.  Sort of what I was thinking of doing.
> I've written plenty scripts, so no problem there.  Which is
> better/easier, sendmail, mailx or mailutils?

Well,  the mail command does it as a one liner, but the custom
sendmail script gives more flexibility, especially with things like

> I can't figure out how to get mailutils mail to use my ISP's smtp mail
> server, yet.
> I type "mail me at", enter the subject and message body
> followed by "." on a blank line.  The message goes somewhere, but where
> I don't know.

It will use the underlying mail system, whatever that is. I prefer
installing postfix myself. Then configure postfix (or sendmail, etc)
to use your isp's system. In postfix, that is called a 'relayhost'. I
use my isp's smtp server for relaying, and all mail sent from my local
system automatically goes through that. No matter what script or
command line tool you use, you most likely will have to configure the
local mail system to control such things. Once that's installed, you
can easily check the server's logs to see if the mail is going out,
where its going, if its accepted, etc.

I would suggest for bulk mail to set the appropriate headers, and send
them in limited batches so it doesn't raise a red flag. Like maybe 20
at a time.


More information about the ubuntu-users mailing list