Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail question

mornet
Occasional Advisor

sendmail question

Hello everybody.
i'm running on 3 HP 9000 server with HPUX 11.00 and the sendmail version is 8.7.1 (i think). the servers don't use NIS and DNS. These servers are on a DMZ. i want that these servers can send mail to a machine not on the same network and which uses DNS. i configure the sendmail.cf on the HP:
Dj$w.cars.com (the domain)
DSmail-relay..fr
DLcars.com

the relay is in the /etc/hosts of the servers, sendmail stop and restart...

i can send mail betwen my 3 servers but when i try to send a mail from one of the servers to the output (by the relay), it's not working. the mails stay in the queue and i can see the ligne:
MDefferred: Connection refused by mail-relay..fr

an when i try a telnet 25, the response is "unable to connect , connexion timed out

i don' t understand the probleme.
If i want to use DNS to resolve MXrecord, what the procedure? files /etc/resolv.conf ? it's doesn't existe!
please help me.

Thanks for all.
Thomas Mornet
8 REPLIES
Shannon Petry
Honored Contributor

Re: sendmail question

If you can not telnet to the machine at port 25 then there are a couple of possibilities.
1. Can you ping the machine at all? If not it could be a route/router issue.
2. You say these are in a DMZ, but is there a firewall blocking port 25?
3. Does the host your connecting to does not have smtp running on port 25?

Really this is all your initial problems. If you can not get to port 25 on the relay host, there is no way to test your configuraion.

Regards,
Shannon
Microsoft. When do you want a virus today?
David Navarro
Respected Contributor

Re: sendmail question

If you need to resolv domains, you need to configure DNS. Try to do a ping to remote machine using full name.
In resolv.conf you can especify where DNS server is. You need to configure this file if DNS is in local server or in remote server. If you don't do it, Local server uses /etc/host for resolve names. I don't know exactly procedure to configure DNS, but you can do it with SAM
Joseph C. Denman
Honored Contributor

Re: sendmail question

mornet,

1. Create the resolv.conf file with the following entries:
domain www.mydomain.com
nameserver xxx.xxx.xxx.xxx (primary dns)
nameserver xxx.xxx.xxx.xxx (secondary dns)

2. permission on resolv.conf should be root:sys 644

3. modify hosts entry in the /etc/nsswitch.conf file. Should look as follows:

hosts: files [NOTFOUND=continue] dns

That should do it. Now test it.

nslookup www.whatever.com

Hope this helps

...jcd...
If I had only read the instructions first??
someone_4
Honored Contributor

Re: sendmail question

Hello your resolv.conf file should look like this. You can vi resolv.conf and add your information.

domain yourdomain.net
nameserver ip.of.nameserver # external ns primary
nameserver ip.of.backup # external ns backup

You might also check your etc/hosts and make sure that both boxes have an entry for each other. And you can test by
#echo test | sendmail -v user@relaybox
If it fails post up what you get from that command.

Richard

Chris Stamps_1
Occasional Visitor

Re: sendmail question

The thing that worries me isthe connection refused when telneting to that port. There should have been a response from the smtp daemon binding to that port. That is your biggest problem. I would check to see if there are any firewall issues blocking your access to port 25. If not, see if daemon is running on relay.
Live it like it's your only one
Frank Li
Trusted Contributor

Re: sendmail question

-- when i try a telnet 25, the response is "unable to connect , connexion timed out ------------

From here, maybe you router/firewall blocked the port 25 or the machines is not listening on port 25 or the machine is down.


If you want the host to relay your mail , the host must accept the relay configuration ( that's allow relay mail from your site , this need some configuration ) . If the telnet problem is okay,then check this question.

you can check it on one of your server by issue:
$sendmail -v username@
and watch the output.
Hi Friend

Re: sendmail question

first of all,be sure that you do not have a router or firewall rule blocking port 25...
if not,then check these:
/etc/nsswitch.conf:(which source the gethostbyname() function may use to make the name_to_ip_look_up operation);/etc/hosts?,DNS?,NIS?
the entry should be something like this:
hosts: files [notfound=continue] dns
**************************************
(that is,if not in hosts file,try dns...)

/etc/resolv.conf:(resolver information_with permission 644):
domain xxx.yyy.com
search xxx.yyy.com aaa.bbb.com ccc.ddd.com #if u have multiple domains
nameserver aa.bb.cc.dd #dnseserver ip adres
nameserver x.y.z.a #possible domain nameservers
nameserver a.b.c.d
nameserver f.g.h.j
*****************************************
also include the nameserver address in /etc/hosts file as:
x.y.z.c dnsserver
******************************************
your sendmail configuration seems ok...

check now with ESMTP:
$ /usr/sbin/sendmail -v xx@yy.com < message
*******************************************
by the way;does .forward files work?u can check also this to understand the problem...
create .forward file under / and edit inside
a mail address outside your machines...then mail something to root and look if it is being forwarded...
********************************************
regards...


it's all a game
mornet
Occasional Advisor

Re: sendmail question

first, thanks for all answers and excuses me for the language.

the mail-relay is on the DMZ (like my servers), and it's works correctly: anothers machines on the DMZ can send mail to the relay. There is a rule on the firewall which stop the smtp (and ping and telnet) connection from my server to the rest of the network. i'm going to change this rule...
Thanks again.
Thomas.