Solved

Mailx is not working

Posted on 2004-03-25
27
624 Views
Last Modified: 2013-12-27
I have mailx on several Unix servers, another one has been set this server uses DNS, I have added the Mail server address to the local host file as I have done on all other machines, but when i send a mail nothing is sent

What is going wrong the only diffrence to all other unix servers is that this one is using DNS do i need to add the entry to other files?

Cheers in advance
0
Comment
Question by:craigdba
  • 10
  • 10
  • 2
  • +2
27 Comments
 
LVL 1

Expert Comment

by:mdhmi
Comment Utility

Huhh?  Your going to need to provide a little more information than that !.  What version of the OS are you running, what version of sendmail are you running?  What happens when you try to send a message?  What is logged in /var/adm/messages and /var/log/syslog?  Are you trying to send mail to clients on a local subnet only or is this internet traffic?  We are definitely going to need more information if you expect any type of solution.

Cheers,

Mark
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
could you please post result of:
  mailx -V
from both, working and not working server
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
Also a log of
mailx -v -v <valid email address>
on both machines
0
 

Author Comment

by:craigdba
Comment Utility
mailx version 5.0 on both machines
0
 

Author Comment

by:craigdba
Comment Utility
WARNING: local host name (tt-nms) is not qualified; fix $j in config file
crichards@tullib.com... Deferred: Name server: mailhost: host name lookup failure

This is what i get on the machine that is not working, on the working one is just says found server contacted sending message all ok
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
aha, you need to fix your sendmail.cf, search for the line starting with
Dj
(it's probably commented out), you need to add a FQDN, like
Djhostname.domain.tld

then stop and start sendmail again
0
 

Author Comment

by:craigdba
Comment Utility
How do I restart Sendmail?
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
/etc/rc2.d/S88sendmail stop
/etc/rc2.d/S88sendmail start
0
 

Author Comment

by:craigdba
Comment Utility
So should the line look like Dj$mailhost.name.com?
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
no, more like:
Djmailhost.name.com
0
 

Author Comment

by:craigdba
Comment Utility
In my file it is Djmailhost.name.com still get the same error   Deferred: Name server: mailhost: host name lookup failure
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
have you defined mailhost.name.com in your DNS or /etc/hosts?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:craigdba
Comment Utility
Yes I have it in /etc/hosts 111.111.111.111 mailhost.name.com mailhost
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
AFAIK sendmail relies on DNS only (except if it could be configured to use /etc/hosts)
my sugestion was "DNS or /etc/hosts" but DNS seems not been tested, not my fault ...
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
Netminder, I'd leave it open if craigdba  returns ...
0
 

Author Comment

by:craigdba
Comment Utility
I tried but still nothing

0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
ok, starting at the beginning ..
please check what you get for:
    dig mx your-destination-domain
0
 

Author Comment

by:craigdba
Comment Utility
The command dig does not seem to exist

Cheers
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
start nslookup and give following command:
  ls -t mx <yourdomain.tld>
0
 

Author Comment

by:craigdba
Comment Utility
Can't list domain domainname: Unspecified error
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
please post /etc/resolv.conf
0
 

Author Comment

by:craigdba
Comment Utility
what needs to be in here, can you give an example please

Currenlty i have

domain domainname (not fqdn)
nameserver IPADDRESS of domain server
mailhost IPADDRESS of mail server
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
domain your.domain
nameserver IP
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
PAQed - no points refunded (of 125)

modulo
Community Support Moderator
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now