I am trying to send emails using the following bash script:
/bin/mail -s "#subject" "$emailto" < "$message"
It works fine on my local machine but does not work on my VM.
I looked it up and read that the issue might be related to the
/etc/hosts file, so here is the contents of that file:
127.0.0.1 localhost loghost 192.168.1.200 root loghost
I am root user on this solaris VM. What do I need to do change get this working?
I am getting this msg in log file
From MAILER-DAEMON Thu Feb 14 20:20:06 2013 Return-Path: <> Received: from unknown (localhost [127.0.0.1]) by unknown (8.14.4+Sun/8.14.4) with ESMTP id r1F1K57F002411 for <root@unknown>; Thu, 14 Feb 2013 20:20:06 -0500 (EST) Received: from localhost (localhost) by unknown (8.14.4+Sun/8.14.4/Submit) id r1F1K51c002398; Thu, 14 Feb 2013 20:20:06 -0500 (EST) Date: Thu, 14 Feb 2013 20:20:06 -0500 (EST) From: Mail Delivery Subsystem <MAILER-DAEMON@unknown> Message-Id: <201302150120.r1F1K51c002398@unknown> To: root@unknown MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="r1F1K51c002398.1360891206/unknown" Subject: Returned mail: see transcript for details Auto-Submitted: auto-generated (failure) Content-Length: 1287 This is a MIME-encapsulated message --r1F1K51c002398.1360891206/unknown