Operating System - Linux
1832961 Members
3569 Online
110048 Solutions
New Discussion

Sendmail configuration problem?

 
Raynald Boucher
Super Advisor

Sendmail configuration problem?

Good day all!

I'm trying to use sendmail on a Mandrake installation.

The "sendmail" command itself takes a long time but provides no response.
"mailq -v" returns "no requests".

/var/log/mail errors contains:
Feb 11 11:43:45 newdell sendmail[9971]: My unqualified host name (newdell) unknown; sleeping for retry
Feb 11 11:44:45 newdell sendmail[9971]: unable to qualify my own domain name (newdell) -- using short name
/var/log/syslog reveals the same

This hints at a configuration problem.
Which file must be setup / altered?
(Or am I on a wrong track altogether?)

Thanks
9 REPLIES 9
Stuart Browne
Honored Contributor

Re: Sendmail configuration problem?

Does 'hostname' return just a single word (newdell), or a FQDN (newdell.somedomain.com) ?

If it is just 'newdell', then this is what sendmail is complaining about.

I'm unsure where Mandrake stores the host name, but on older systems it was stored in /etc/HOSTNAME.

Newer systems put it in different places, for example a modern RedHat system stores it in /etc/sysconfig/network under the line 'HOSTNAME='.

Executing the command 'hostname newdell.somedomain.com' will temporariliy set it for you, but if you want to make it permenant you'll have to find out where Mandrake stores these details.

If you look at the "System Init" script, you'll get a good idea of where. (See the 'si' line in /etc/inittab, and walk through the script).
One long-haired git at your service...
benoit Bruckert
Honored Contributor

Re: Sendmail configuration problem?

Hi,
You can also configure Dj in sendmail.cf
stop/start sendmail, and check if you have steal this error...
hth
Benoit
_____________
"Les femmes, comme l'a dit un fran??ais plein d'esprit, nous inspirent le d??sir de r??aliser des chefs-d'oeuvre et nous emp??chent toujours de les mener a bout."
Oscar Wilde
Une application mal pansée aboutit à une usine à gaze (GHG)
Kasper Haitsma
Trusted Contributor

Re: Sendmail configuration problem?

don't forget class w, check sendmail.cf for a line like:

Fw/etc/mail/local-hostnames
or
Fw/etc/mail/sendmail.cw
or the like. It should contain lines like:

localhost
localhost.domain
newdel
newdel.

HTH
Kasper
It depends
Kodjo Agbenu
Honored Contributor

Re: Sendmail configuration problem?

Hi,

In my opinion, you have name resolving problem.

You may try different things. Let's put them in 2 categories :

=> first, you can try to setup the name resolver properly.

=> second, you can by-pass this and forward your e-mails directly to a specific mail server.


The first method is the best one, but it only applies if your server is on a network with a DNS server properly configured (with MX records).
If this is the case, you just need to edit /etc/resolv.conf and add :

search your.domain.com
nameserver you_dns_srv_ip

Another point : make sure that your /etc/hosts file contains :

your_srv_ip your_srv_name.your.domain.com

Last point : it may be necessary to edit /etc/sendmail.cf and replace :

Dj$w.

by

Dj$w.your.domain.com.

(don't forget the dot "." at the end of domain name).

Restart sendmail to apply this change.


The second method (the simplest one) consist in using a relay server.
Just edit /etc/sendmail.cf and change :

DSyour_mailsrv.your.domain.com.

(don't put space between DS and the server name. Another point, don't forget the dot "." at the end of domain name).

Restart sendmail to apply changes.


Good luck.

Kodjo
Learn and explain...
Kodjo Agbenu
Honored Contributor

Re: Sendmail configuration problem?

Sorry for this redundant answer, but it took me more than 1 hour to reply because I was on the phone.

Kodjo
Learn and explain...
Raynald Boucher
Super Advisor

Re: Sendmail configuration problem?

Thanks... but no juice.
I checked all these config files and still cannot send a message.

Currently using a redhat linux implementation on an old server. We used Mandrake on the new implementation in order to improve / modernize it.
Mail works from the old implementation but not from he new one. All config files are identical.

The old implementation does not use a .com domain name but rather local with RELAY.

Thanks again.
Stuart Browne
Honored Contributor

Re: Sendmail configuration problem?

Umm, what does 'hostname' return?
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Sendmail configuration problem?

host resolution is broken.

look at /etc/resolv.conf

and makes changes until the following command works....

dig yahoo.com

Don't change any mail configuration until DNS resolution works.

Alternatively you can add a DS directive to sendmail.cf


DS
[IP address of relay server]


save sendmail.cf

service sendmail stop
service sendmail start

You'd better be sure that the relay server can resolve dns.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Balaji N
Honored Contributor

Re: Sendmail configuration problem?

the easiest way to fix this is to add an alias called "newdell." (note the dot in the end) to ur host file and then restart.

is this machine going to be on the internet and send mails? if so, then u need to configure your dns. else, just add the smart host entry (DS) and restart sendmail.

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.