Problem sending mail after IP/hostname change

Hello,
I had to replace my Solaris 10 workstation with the other one because of hardware issues. I need to configure the new WS with the same configuration. It looked like it was using DHCP before and I was able to send mail with mailx command. Since old HW used static IP I have disabled DHCP and modified
/etc/inet/hosts
/etc/inet/ipnodes
/etc/nsswitch.conf
/etc/resolv.conf
/etc/defaultrouter
/etc/nodename
/etc/hostname.eri0

to handle the new configuration of a static IP and now I'm getting mail delivery subsystem warnings: Deferred: Connection timed out with foo.com

Could anybody give me a hint how to troubleshoot this? Obviously It was working before and problem is not in foo.com :frowning: when I do nslookup foo.com (foo is not my real domain) it comes back with IP address. Any ideas?

Thanks,
PN

Check the connectivity from the workstation to your mailserver.

ping mailserver.foo.com
telnet mailserver.foo.com 25

"when I do nslookup foo.com (foo is not my real domain) it comes back with IP address"
Does the reverse work? whats the output of sendmail -q -v

Thanks, you have a good point. I did check ping foo.com and telnet foo.com 25 timed out BUT if I do telnet mail.foo.com 25 I get response! Is there any configuration file where mail server prefix is configured?

Thanks,
PN

Hmm.. Sorry, I'm not sure that I understood you correctly. What does reverse mean in this case?

That probably times out. The only output I got was:

WARNING: local host name (wayossws55) is not qualified; see cf/README: WHO AM I?

What should I bee looking for?

Thank You,
Pavel.

The quick (wrong) way:
Edit /etc/mail/sendmail.cf and replace the line that starts with "DS" with "DSmail.foo.com". Then restart sendmail.

The good way:
You'll have to edit the .mc file and rebuild the .cf file.
Configure sendmail as a smart host

Alternatively, I think you could just set the MX record of your domain to the correct mailserver. (But this would only allow you to send to @foo.com addresses).

Thank you! I tried the good way and the generated sendmail.cf file was much smaller then the original Solaris one so I went for a "wrong" one. The good news is - it seems to improve the situation, I'm not getting any more timeouts. The bad news is I'm getting the following report:

... while talking to mail.foo.com.:
>>> HELO wayossws55.
<<< 501 5.5.4 Invalid Address
554 5.0.0 Service unavailable

It looks like mailserver does not like my WS name. Is there any way to trace a good scenario? I have another WS that seems to be sending the e-mails ok.

Regards,
PN

Can you compare /etc/hosts on both WS?
Also, compare the sendmail configs...

Thank you for your help! It is now working! The problem was located in the /etc/hosts. While trying to eliminate "unable to qualify my own domain name" error messages I have changed record in /etc/hosts for my WS IP. For whatever reason this change cause problems just now while it was actually done some time ago.
Thanks again!
PN.