# mail problems - how to send mail on solaris

**URL:** <https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225>\
**Category:** Solaris\
**Created:** [March 14, 2006, 6:27am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225 "2006-03-14T06:27:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [March 14, 2006, 6:27am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/1 "2006-03-14T06:27:53Z")

</div>

Hello I am new user on solaris...

I need to configure my solaris to be able to send mails...

I know mailx command

mailx -s hello [address@address.com](mailto:address@address.com)

but I get an error...

you have mail in /var/mail/root  
# hello... User unknown  
/dead.letter... Saved message in /dead.letter

what should I do next...

Please help...  
Thanks in advance..

---

<div class="post-metadata">

**Author:** ![RTM](https://community.unix.com/user_avatar/community.unix.com/rtm/32/58_2.png) [@RTM](https://community.unix.com/u/RTM)\
**Post date:** [March 15, 2006, 11:18am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/2 "2006-03-15T11:18:35Z")

</div>

> [@](#):
>
> mailx -s hello [address@address.com](mailto:address@address.com)

Are you sending to a username? This makes it look like you aren't.  
Try [some-user@address.com](mailto:some-user@address.com) versus [address@address.com](mailto:address@address.com) (you have to use a valid user name on that server (address.com))

---

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [March 16, 2006, 1:58am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/3 "2006-03-16T01:58:27Z")

</div>

of course [bigboy@hotmail.com](mailto:bigboy@hotmail.com) how to be able to send e mail there what do I need to configure mailbox or what??

thaks for answers...

---

<div class="post-metadata">

**Author:** ![RTM](https://community.unix.com/user_avatar/community.unix.com/rtm/32/58_2.png) [@RTM](https://community.unix.com/u/RTM)\
**Post date:** [March 16, 2006, 11:36am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/4 "2006-03-16T11:36:37Z")

</div>

Try this test - see if the email goes through with this - type on the command line what's in bold - I'm using the email address you posted - change as needed.

mailx -s "test from `hostname`" [bigboy@hotmail.com](mailto:bigboy@hotmail.com) \< /dev/null

Post the output if any or confirm if the email did get received or not.

---

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [March 17, 2006, 2:11am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/5 "2006-03-17T02:11:10Z")

</div>

I tried that trick send from file...that is emptyy...still something is wrong with conf.

---

<div class="post-metadata">

**Author:** ![RTM](https://community.unix.com/user_avatar/community.unix.com/rtm/32/58_2.png) [@RTM](https://community.unix.com/u/RTM)\
**Post date:** [March 17, 2006, 7:46am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/6 "2006-03-17T07:46:05Z")

</div>

Please answer this question: Was the email delivered to [bigboy@hotmail.com](mailto:bigboy@hotmail.com)?

Yes, it would be empty - but it was only to test if the email was sent and received, not a test to check content.

If it was received, you can do the following to see a non-blank email:

echo "quick message" \> /tmp/bigboy-junk-from-amon  
mailx -s"test from amon" [bigboy@hotmail.com](mailto:bigboy@hotmail.com) \< /tmp/bigboy-junk-from-amon

Please report if bigboy gets this message or not.

---

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [March 21, 2006, 2:27am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/7 "2006-03-21T02:27:17Z")

</div>

no mail has not been delivered  
I was wondering do I need to configure MTA or something with DNS...

OK I get this error when I check in mail..

----- The following addresses had permanent fatal errors -----  
[myaddress@domain.com](mailto:myaddress@domain.com)

----- Transcript of session follows -----  
550 5.1.2 [myaddress@domain.com](mailto:myaddress@domain.com)... Host unknown (Name server: mailhost: host not found)

--k2L7IoI22312.1142925530/x3commbrsrv.  
Content-Type: message/delivery-status

Reporting-MTA: dns; x3commbrsrv.  
Arrival-Date: Tue, 21 Mar 2006 08:18:50 +0100 (MET)

Final-Recipient: RFC822; [myaddress@domain.com](mailto:myaddress@domain.com)  
Action: failed  
Status: 5.1.2  
Remote-MTA: DNS; mailhost  
Last-Attempt-Date: Tue, 21 Mar 2006 08:18:50 +0100 (MET)

--k2L7IoI22312.1142925530/x3commbrsrv.  
Content-Type: message/rfc822

Return-Path: \<MAILER-DAEMON\>  
Received: from localhost (localhost)  
by x3commbrsrv. (8.11.6+Sun/8.11.6) id k2L7IoH22312;  
Tue, 21 Mar 2006 08:18:50 +0100 (MET)  
Date: Tue, 21 Mar 2006 08:18:50 +0100 (MET)  
From: Mail Delivery Subsystem \<MAILER-DAEMON\>  
Message-Id: \<200603210718.k2L7IoH22312@x3commbrsrv.\>  
To: [myaddress@domain.com](mailto:myaddress@domain.com)  
MIME-Version: 1.0  
Content-Type: multipart/report; report-type=delivery-status;  
boundary="k2L7IoH22312.1142925530/x3commbrsrv."  
Subject: Returned mail: see transcript for details  
Auto-Submitted: auto-generated (failure)

This is a MIME-encapsulated message

--k2L7IoH22312.1142925530/x3commbrsrv.

The original message was received at Tue, 21 Mar 2006 08:18:49 +0100 (MET)  
from root@localhost

----- The following addresses had permanent fatal errors -----  
[myaddress@domain.com](mailto:myaddress@domain.com)

----- Transcript of session follows -----  
550 5.1.2 [myaddress@domain.com](mailto:myaddress@domain.com)... Host unknown (Name server: mailhost: host not found)

--k2L7IoH22312.1142925530/x3commbrsrv.  
Content-Type: message/delivery-status

Reporting-MTA: dns; x3commbrsrv.  
Arrival-Date: Tue, 21 Mar 2006 08:18:49 +0100 (MET)

Final-Recipient: RFC822; [myaddress@domain.com](mailto:myaddress@domain.com)  
Action: failed  
Status: 5.1.2  
Remote-MTA: DNS; mailhost  
Last-Attempt-Date: Tue, 21 Mar 2006 08:18:50 +0100 (MET)

--k2L7IoH22312.1142925530/x3commbrsrv.  
Content-Type: message/rfc822

Return-Path: \<myaddress@domain.com\>  
Received: (from root@localhost)  
by x3commbrsrv. (8.11.6+Sun/8.11.6) id k2L7InI22310  
for [myaddress@domain.com](mailto:myaddress@domain.com); Tue, 21 Mar 2006 08:18:49 +0100 (MET)  
Date: Tue, 21 Mar 2006 08:18:49 +0100 (MET)  
From: [myaddress@domain.com](mailto:myaddress@domain.com)  
Message-Id: \<200603210718.k2L7InI22310@x3commbrsrv.\>  
To: [myaddress@domain.com](mailto:myaddress@domain.com)  
Subject: hi

--k2L7IoH22312.1142925530/x3commbrsrv.--

--k2L7IoI22312.1142925530/x3commbrsrv.--

so I have to say that I send mail with this command:

/bin/mailx -s "hi" -r [myaddress@domain.com](mailto:myaddress@domain.com) [myaddress@domain.com](mailto:myaddress@domain.com) \< t ,

where [myaddress@domain.com](mailto:myaddress@domain.com) is my address and I did not put my real address here..  
I also set IP of mail server in etc/hosts:

123.123.123.123 [domain.com](http://domain.com)

so what could be a problem??

thanks friends...

---

<div class="post-metadata">

**Author:** ![RTM](https://community.unix.com/user_avatar/community.unix.com/rtm/32/58_2.png) [@RTM](https://community.unix.com/u/RTM)\
**Post date:** [March 21, 2006, 8:39am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/8 "2006-03-21T08:39:04Z")

</div>

Yes, you do need to configure DNS - sendmail works best if you have it configured (but you could get it to work [without DNS](http://www.sendmail.org/faq/section3.html#3.22) )

---

<div class="post-metadata">

**Author:** ![dsbeerf](https://community.unix.com/user_avatar/community.unix.com/dsbeerf/32/307_2.png) [@dsbeerf](https://community.unix.com/u/dsbeerf)\
**Post date:** [March 30, 2006, 5:01am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/9 "2006-03-30T05:01:10Z")

</div>

Oh, Boy. I am guessing you're running an old Solaris. Your sendmail is old. Nevertheless, I think you need to:

```
1\) establish the machine that you are/will be using as your email 'gateway'. Is it a machine under your control, or is it at your ISP ?
2\) 'equate' that machine's IP address \(in your DNS or /etc/hosts\) with the machine name 'mailhost' \(and/or 'mailhost.domain.com'\). If you are using /etc/hosts, then the line should look like this:"10.4.5.6 mailhost.domain.com mailhost"

```

3) You could also 'grep' for the word 'mailhost' in your sendmail.cf file and replace the line that looks like  
"DSmailhost.$w" with "[DSISP-mailhost.ISP.com](http://DSISP-mailhost.ISP.com)"

The first problem you are having is that while sending this email, your local sendmail is looking to connect to port 25 on the host 'mailhost' (this is a 'Sun-ism').  
Since you have no host defined as 'mailhost' you cannot connect, and the mail fails.

So you either have to change the name of the host that sendmail is looking for (in the sendmail.cf file), or DEFINE a host named 'mailhost' for the local sendmail to  
connect to (in DNS, or the /etc/hosts file).

The PROPER way to do this is to have an MX record in DNS that points to the "mail exchanger' that your domain is supposed to be using.  
This will either be a 'Mail hub' that you maintain, or the 'Mail hub' that your ISP told you to use to send mail.

There may yet be other problems, but you cannot discover them until you correct this one.

---

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [April 6, 2006, 2:25am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/10 "2006-04-06T02:25:33Z")

</div>

first of all let me thank dsbeerf I solve a problem...

simply I could fing mail server so in etc/hosts I put:

IP [mail.domain.com](http://mail.domain.com) mailhost

but I use exactly word mailhost. And it works...perfect...but when I tried to to that on the other solaris machine (same one, that same one machine also can ping mail server) I get other message:

Apr 5 11:54:05 a1mmdpp sendmail[877]: [ID 702911 mail.alert] unable to qualify my own domain name (a1mmdpp-mdppcore) --  
using short name

so I was wondering considering that it is same machine and in etc/hosts I put same stuff..what might be...

Thanks to everyone..

---

<div class="post-metadata">

**Author:** ![amon](https://community.unix.com/letter_avatar/amon/32/5_5575768a8748004e209b776fc1b2916d.png) [@amon](https://community.unix.com/u/amon)\
**Post date:** [April 6, 2006, 9:31am UTC](https://community.unix.com/t/mail-problems-how-to-send-mail-on-solaris/160225/11 "2006-04-06T09:31:30Z")

</div>

for some reason it sends mail and pop up that message that I show U

Apr 6 11:54:05 a1mmdpp sendmail[877]: [ID 702911 mail.alert] unable to qualify my own domain name (a1mmdpp-mdppcore) --  
using short name

it works but with this stupid message...

any clues??
