Sending Emails from Solaris to External Email Addresses

There are many cronjobs running on the servers I maintained.  Each cronjob creates output which needs to be sent to the external email addresses.  However, none of the cronjob mails were received by the external email accounts.  I guess the servers were not setup correctly.  I run the mail program from the terminal and got a bounced email with the following content:

The original message was received at Fri, 20 May 2016 12:02:03 +0800 (MYT)
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<user@company.com>

   ----- Transcript of session follows -----
550 5.1.2 <user@compay.com>... Host unknown (Name server: mailhost.xxx.com: host not found)

The configured STMP server is mailhost.xxx.com but this host name is not valid.  I’m not sure how to modify the SMTP server configured, but I do know the IP address of the SMTP server.  So, I add the following line to the /etc/hosts file:

xxx.xxx.xxx.xxx    mailhost.xxx.com

Then, all emails can now be sent to external email accounts successfully.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: