[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cmdline mail client that talks to remote SMTP server?



On Tue, 2006-03-28 at 22:01 -0600, Matt England wrote:
> I would like to send email from a CentOS/RHEL/Debian/Fedora command
> line client.  However, I want to be able to send the mail via a remote
> SMTP server, and thus said email cmdline app must also be a SMTP
> client.
> 
> Does any such thing exist?
> 
> I man mail(1)/mailx(1) on a Debian3.1-testing system and I found no
> SMTP reference in the man page.
> 
> Do I effectively need to write some PHP, Python, or Perl app to do
> this...something that uses an SMTP module from one of the
> aforementioned language libraries?

Do you have exim4 or postfix installed?  Probably so.

Configure them to be a relay host.  That way, email to any non-local
address will be relayed to the remote smtp server.

$ echo "testing testing" | mail -v -s "this is a relayhost test" \
      ron.l.johnson@cox.net 

Note, though, that spam filters might catch it if your machine 
has a fake FQDN.

-- 
-----------------------------------------------------------------
Ron Johnson, Jr.
Jefferson, LA USA

"I have steadily endeavored to keep my mind free, so as to give
up any hypothesis, however much beloved -- and I cannot resist
forming one on every subject -- as soon as facts are shown to be
opposed to it."
Charles Darwin (1809-1882)



Reply to: