How do you send mail in Solaris?

Posted on 2009-07-09
Last Modified: 2013-12-27
I am having problems sending mail in Solaris 10.  I am using the mailx command to send the mail.  I have designated a smtp relay agent in the file.  The verified the smtp relay agent (windows server) works cause our AIX boxes use the same relay agent.  I do not get any errors and the message does not show in the mailq, so I am assuming Solaris sent the message to the relay agent.  I check the relay agent and I see no errors in the event viewer.  I am sending it to my yahoo account so if anything I should see it in my spam folder if it is marked as spam.  Any guidance is mucho appreciated!! thanks
Question by:cburn32
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
LVL 40

Expert Comment

ID: 24815341
how do you know if windows server sent it successfully?
LVL 13

Expert Comment

ID: 24815574
look in the messages file (unless you're logging elsewhere) to check whether your mail was "sent ok". If so, then its over to the windows admins, otherwise...well...what was the error message?

Author Comment

ID: 24817195
Here is the error message in /var/adm/messages:

Jul  9 13:40:58 DHRSun01 sendmail[13058]: [ID 702911 mail.crit] My unqualified h
ost name (DHRSun01) unknown; sleeping for retry
Jul  9 13:41:58 DHRSun01 sendmail[13058]: [ID 702911 mail.alert] unable to quali
fy my own domain name (DHRSun01) -- using short name
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

LVL 40

Expert Comment

ID: 24817236
try to add a reverse lookup entry to dns (PTR record)

Author Comment

ID: 24817348
what file would that be in solaris...sorry I am a solaris newbie...
LVL 40

Accepted Solution

omarfarid earned 250 total points
ID: 24817388
are you running a dns server? can you check the file /etc/resolv.conf? if you are running a dns server then you add it to the dns server zone file.

If not running or using dns then add your ip address(es) to /etc/hosts file
LVL 13

Assisted Solution

Rowley earned 250 total points
ID: 24820944
In your hosts file, where your hostname is, add a space, then either the fully qualified domain name of your host, ie or add another entry next to your hostname, using this as an example:   myhost .

This will stop sendmail complaining. You then need to check you can perform lookups to the domains/servers you are delivering mail to. Here's a decent article on using dig, should get you up and running:

If you can't, then its onto looking at your name resolution set up as Omar suggested.

Author Comment

ID: 24823873
I can do nslookups now since I edited the resolv.conf.  I can also do reverse lookups.  I do not see any errors in the messages file stating unqualified hosts names.  When I send mail now I can see the message in mailq waiting to be sent.  Here is what I see in mailq

root@DHRSun01 # mailq
                /var/spool/mqueue (44 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
n6ADFncI013709      246 Fri Jul 10 09:15 <root@DHRSun01>
                 (host map: lookup (DHRSun01): deferred)

Any other suggestions?

Author Comment

ID: 24823926
Thanks for everyones help.  It is working now.  I had to restart sendmail I can see mail in my yahoo spam folder from the Solaris box.

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question