Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Mails sent to local mail addresses doesn't work

SOLVED
Go to solution
Carles Viaplana
Valued Contributor

Mails sent to local mail addresses doesn't work

Hello,

I can't send mails to local addresses using an simple script.

- OS: HP-UX 11.11
- Server name: neftis.santpau.es
- Mail addresses: operacio@santpau.es or operacio@hsp.santpau.es

- Command to send mail from my script:

mailx -s DIARI_NEFTIS operacio@hsp.santpau.es < $FITXER_DADES

- Error message we got after every try:

[Attach #1: ""]
[Type: text/plain, Encoding: 7bit, Size: 310]

from root@localhost

from root@localhost

from root@localhost

from root@localhost

----- The following addresses had permanent fatal errors -----
operacio@hsp.santpau.es

----- Transcript of session follows -----
550 operacio@hsp.santpau.es... Host unknown (Name server: hsp.santpau.es: host not found)

[Attach #2: ""]
[Type: message/delivery-status, Encoding: 7bit, Size: 262]

Reporting-MTA: dns; neftis.santpau.es
Arrival-Date: Wed, 5 Oct 2005 12:17:21 +0200 (METDST)

Final-Recipient: RFC822; operacio@hsp.santpau.es
Action: failed
Status: 5.1.2
Remote-MTA: DNS; hsp.santpau.es
Last-Attempt-Date: Wed, 5 Oct 2005 12:17:21 +0200 (METDST)

[Attach #3: ""]
[Type: message/rfc822, Encoding: 7bit, Size: 6063]

16 REPLIES
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

nslookup hsp.santpau.es

Is it resolving?

Else put related entries in /etc/hosts file and try now.

hth.
Easy to suggest when don't know about the problem!
Pete Randall
Outstanding Contributor

Re: Mails sent to local mail addresses doesn't work

It seems it can't find hsp.santpau.es. What does nslookup return?


Pete

Pete
Arunvijai_4
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

Can you able to ping hsp.santpau.es ? It seems to be host name resolution problem.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

Thanks for your fast reply.

Here you're ping and nslookup results:

# ping hps.santpau.es
ping: unknown host hps.santpau.es
# nslookup hsp.santpau.es
Name Server: heidi.santpau.es
Address: 193.146.12.2

Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "hsp.santpau.es"
#

Regards,

Carles
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

Ok.

Go to your machine and edit /etc/hosts file as,

vi /etc/hosts

and add,

hsp.santpau.es

save it.

Do as,

# ping hsp.santpau.es
# nslookup hsp.santpau.es

Is it resolving now.

If it is success then you can able to send mail.

hth.
Easy to suggest when don't know about the problem!
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

Hello again,

Note that hsp.santpau.es and santpau.es are domains instead systems.

Mail server name is zurich and I can ping it from neftis:

# nslookup zurich
Name Server: heidi.santpau.es
Address: 193.146.12.2

Trying DNS
Name: zurich.santpau.es
Addresses: 172.17.0.5, 172.17.0.61

# ping zurich.santpau.es
PING zurich.santpau.es: 64 byte packets
64 bytes from 172.17.0.61: icmp_seq=0. time=0. ms
64 bytes from 172.17.0.61: icmp_seq=1. time=0. ms
64 bytes from 172.17.0.61: icmp_seq=2. time=0. ms

----zurich.santpau.es PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
#

Regards,

Carles
Arunvijai_4
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

It couldn't find hsp.santpau.es in DNS, NIS and /etc/hosts. If you know the IP of hsp.santpau.es, try adding it to /etc/hosts

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

what is there in /etc/resolv.conf. Do you have domain name with that hsp.santpau.es?

hth.
Easy to suggest when don't know about the problem!
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

Hello,

Here you're resolv.conf file:

# more /etc/resolv.conf
domain santpau.es
nameserver 193.146.12.2
nameserver 193.146.12.3
nameserver 193.146.12.4
#

Just 2 comments:

1. Can I add a 2nd domain on resolv.conf?
2. I checked configuration on other system from same domain and resolv.conf file is exactly the same, so I don't believe this is the cause.

Regards,

Carles
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

Use search for searching domain names as,

search hsp.santpau.es

hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

Put that in /etc/resolv.conf as,

search santpau.es hsp.santpau.es

remove domain line.

hth.
Easy to suggest when don't know about the problem!
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

Hello Muthukumar,

I changed /etc/resolv.conf as you told but it still fails.

Any idea?
Regards,

Carles
Christopher Caldwell
Honored Contributor
Solution

Re: Mails sent to local mail addresses doesn't work

The right hand side of the address
e.g. hsp.santpau.es
either has to look up in DNS as an A record or an MX record.

So one of the two of these needs to return a numerical address:
$nslookup hsp.santpau.es
or
$nslookup
set type=mx
hsp.santpau.es

=========================================

$ nslookup hsp.santpau.es
Name Server: A.B.C.D
Address: 1.2.3.4

Trying DNS
Non-authoritative answer:
Name: hsp.santpau.es
Address: 193.146.15.209

$ nslookup
Default Name Server: A.B.C.D
Address: 1.2.3.4

> set type=mx
> hsp.santpau.es
Name Server: A.B.C.D
Address: 1.2.3.4


Trying DNS
Non-authoritative answer:
hsp.santpau.es preference = 10, mail exchanger = teseo.santpau.es

Authoritative answers can be found from:
santpau.es nameserver = chico.rediris.es
santpau.es nameserver = teseo.santpau.es
santpau.es nameserver = teseo2.santpau.es
santpau.es nameserver = sun.rediris.es
teseo2.santpau.es internet address = 193.146.15.221

==========================================

Since both tests return a numerical address, sendmail will default to the MX. Thus mail destined for hsp.santpau.es should get delivered to teseo.santpau.es.

Sounds like you've either got a lookup problem (run the test I gave you), or someone has modified sendmail.cf to affect the local delivery of mail, and the configuration is incomplete.
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

Hello all,

Here you're nslookup results:

# nslookup
Default Name Server: heidi.santpau.es
Address: 193.146.12.2

> set type=mx
> hsp.santpau.es
Name Server: heidi.santpau.es
Address: 193.146.12.2

Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "hsp.santpau.es"
> exit
# nslookup hsp.santpau.es
Name Server: heidi.santpau.es
Address: 193.146.12.2

Trying DNS
Trying NIS
looking up FILES
*** No address information is available for "hsp.santpau.es"
#

Note that, as I already said before, I want to send mail from system to operacio@santpau.es but system can't.

Thanks in advance for your help!

Carles
Muthukumar_5
Honored Contributor

Re: Mails sent to local mail addresses doesn't work

what you are getting for,

# nslookup santpau.es

I hope you are using setup only as,

# more /etc/resolv.conf
domain santpau.es
nameserver 193.146.12.2
nameserver 193.146.12.3
nameserver 193.146.12.4
#

Try as,

# /etc/resolv.conf
domain santpau.es
search hsp.santpau.es
nameserver 193.146.12.2
nameserver 193.146.12.3
nameserver 193.146.12.4
#

You have to configure hsp.santpau.es ip-address as santpau.es in /etc/hosts or register with dns.

hsp.santpau.es has to be resolved with ping / nslookup so that you can able to sendmail (s).

hth.


Easy to suggest when don't know about the problem!
Carles Viaplana
Valued Contributor

Re: Mails sent to local mail addresses doesn't work

It seems a network issue and network team is working on.

Thanks to all for your messages.