1830226 Members
1713 Online
109999 Solutions
New Discussion

Re: sendmail problem

 
hanyyu1
Advisor

sendmail problem

This is the problem of sendmail , the below are my situation ,

1. I tried to use sendmail daemon ( eg. $sendmail mymail_address ) to send mail to my internal mail box , it is very slow ,
2. it is very slow to startup the sendmail daemon ,
3. my /etc/resolv.conf setting is "nameserver 127.0.0.1"
4. the first line of /etc/hosts is "127.0.0.1 localhost.localdomain localhost"


I have tried to config the /etc/nsswitch.conf , /etc/resolv.conf , but it seems not work , is it the problem of sendmail setting ? instead of change the DNS , can I fix the problem by config the sendmail eg. sendmail.cf , sendmail.mc ? thx
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: sendmail problem

Shalom hanyyu1,

You need to set the /etc/resolv.conf to an external ip address. 127.0.0.1 is your loopback and you can't get the information you need from that.

Find out from your networking department or ISP what the IP addresses of your DNS name servers are and replace the /etc/resolv.conf setting.

Then the mail will flow, assuming port 25 isn't blocked.

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
Stuart Browne
Honored Contributor

Re: sendmail problem

Yes, you can tell sendmail not to look names up via DNS.

See:

define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch')dnl

Place this in '/etc/mail/sendmail.mc', and re-make the config (if it's a modern RH box, use 'make').

Create that file with contents similar to:

hosts files

And it should be a bit quicker..
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: sendmail problem

Is your server a DNS server?, sendmail is trying to find the hostname for your eth interfaces, not for the loopback only. Ensure that you have a consistent resolution for you ethX interfaces.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: sendmail problem

Diagnostic:

sendmail -v -d8 -d38 someone@some.net

Type some text

.


mailq

mailq -Ac

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
Indrajit_1
Valued Contributor

Re: sendmail problem

Hi;

u should have proper entry in /etc/resolv.conf , /etc/nsswitch.conf and /etc/hosts file..

vi /etc/resolv.conf
search abc.mydomain.com
domain abc.mydomain.com
nameserver

save and come out

vi /etc/nsswitch.conf

host file dns

save and come out..

vi /etc/hosts
hostname ipaddress

save and come out
u should properly configured ur /etc/mail/semdmail.mc (m4 /etc/mail/sendmail.cf > /etc/mail/sendmail.mc)
#telnet hostname_mailserver 25
it should work fine
#cat /etc/mail/sendmail.mc -s "Hi"

Hope it will help u to resolve ur issue..


cheers
indrajit

Never Ever Give Up