Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mailx fails to deliver

Status
Not open for further replies.

ponetguy2

MIS
Aug 28, 2002
442
US
Hello Everyone,

We disabled sendmail on our server. We are trying to use mailx to send an email internally to our mail server, but it fails.
we are getting this error message:

Nov 15 16:15:52 hostname sendmail[829]: [ID 801593 mail.info] jAFMFq3L000829: from=root, size=66, class=0, nrcpts=1, msgid=<200511152215.jAFMFq3L000829@hostname.domainname.com>, relay=root@localhost

Nov 15 16:15:52 hostname sendmail[829]: [ID 801593 mail.info] jAFMFq3L000829: to=me@domainame.com, delay=00:00:00, mailer=esmtp, pri=30066, dsn=4.4.3, stat=queued

I think it's safe to assume that mailx is completely independent from sendmail.

I am able to ping our DNS server and mail server. I was also able to resolve my hostname through DNS by doins
and nslookup.

Any type of advice will truly be appreciated.
 
If you are using Solaris 8 and above you do not need to have Sendmail up and running to send email out. If you have 7 and below I believe you will have to have an entry in crontab to run every 10 - 15 minutes to clean the queue out.

Code:
Add yourmachine.domain.name to /etc/hosts
Add xxx.xxx.xxx.xxx mailhost mailhost.domain.name to /etc/hosts (If you have access to DNS records I would add a mailhost alias if there is not one already)

Try this to watch it connect to the SMTP server

mailx -v -s "Test Message" someuser@someplace
Test Message
. <enter>

It should then show you connecting up to the mail relay.

You also might be able to copy the /etc/default/mail/subsidary (something like this) to /etc/default/mail/sendmail.cf.  That file is setup to use relays I believe, the only other thing I would suggest trying is to make sure your MX records are correct.  You can do that by

nslookup
set type=mx
domainname.com

Should spit out your mail servers



 
ponetguy2 said:
I think it's safe to assume that mailx is completely independent from sendmail.

No, that is not a safe assumption. As far as I know you need to run sendmail to process the email queue. As coffeysm said you may not need it on Solaris 8 (I wasn't aware of this), but if the message gets queued for any reason it will stay in the queue forever.

Rather than disabling it I chose to prevent access from remote hosts for security reasons by creating this file:

[tt]$ cat /etc/default/sendmail
# Only listen for SMTP connections on localhost.
OPTIONS="-O DaemonPortOptions=Addr=localhost"
$[/tt]


Annihilannic.
 
You need to have Sendmail installed on the system but you do not need to have it running as a daemon for Solaris 8 and above. I have Sendmail disabled on all our machines and am able to send e-mail without any problems, providing I have a mailhost alias defined. But mailx does rely on the actual Sendmail program, maybe I should have worded it a little differently in my first response.
 
Yep, but as I guessed and a quick test has just confirmed, if your mailhost becomes available for whatever reason, or messages get queued due to a high load average on your system, or any other reason, they will just sit in the mail queue forever.

Annihilannic.
 
Yes, you are right that is why I mentioned that crontab entry. Again I worded something wrong lol, thanks for pointing that out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top