Operating System - HP-UX
1834146 Members
2265 Online
110064 Solutions
New Discussion

Sendmail Refusing connections?!

 
SOLVED
Go to solution
Charles Harris
Super Advisor

Sendmail Refusing connections?!

Dear all,

I'v got a bit of an issue with sendmail on one of our servers, and was wondering if anyone could give me some pointers or an explanation for the following:-

Host A sends an email to an alias (other mail server) which forwards the message as a specific user on host B, and everything is fine.

Host C also sends an email in the exactly the same way as host A (format, user etc) but gets a reply saying that the connection was refused.

Host C's email also causes an error in the root mail log stating:-
----- Transcript of session follows -----
550 xxxxxxxxxxx.com... User unknown
554 /root/dead.letter... cannot open: Permission denied
Status: 5.5.0

I thought the dead.letter (missing) might be having an effect, recreated it ( probably need to stop and start sendmail ).

Any ideas? the status line looks interesting although I can find no reference to the error in any of the man pages.

As ever, any help tips ideas pointers warmly received!

ps. The names of the hosts have been changed to protect the innocent! - this is NOT an exam question!!!

Cheers,


-ChaZ-
13 REPLIES 13
Robin Wakefield
Honored Contributor

Re: Sendmail Refusing connections?!

Charles,

A few things to check to begin with:

Can you telnet from c to b on port 25 or does it refuse connections?

What message to you get on a & c when you run:

/usr/lib/sendmail -bv {username}@b

Check the sendmail.cw on each host to make all the alternative names are correct (or Cw line in sendmail.cf).

Rgds, Robin
linuxfan
Honored Contributor

Re: Sendmail Refusing connections?!

Hi Charles,

1. which version(s) of sendmail are you using?
2. Are you using DNS? NIS? local hosts files?
3. How is your /etc/nsswitch.conf setup?
4. Did you modify sendmail configurations on C?

-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

Thanks for the tips Robin,

I checked the sendmail and wondered if the addresses were case sensitive or not, currently the entrys are all upper case? - Not sure if this will have an effect!

The telnet to the port is okay, I've already tried locally but I'm unfortunately unable to test from the remote end as it's not a server we have access to, although it is on the same company network.

Cheers,

-ChaZ-
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

Hi Ramesh,

All of our servers are of a relatively 'standard' build, so I'm fairly sure the sendmail versions are the same, we also use DNS servers on the resoloution front. The point you mention about host C's configuration may well be an issue, although I can't check it!

The most annoying thing is that all other senders to the same address are being received without any problem!?

Cheers,


-ChaZ-

linuxfan
Honored Contributor

Re: Sendmail Refusing connections?!

Hi Charles,

You mentioned both A & C are sending mail to an alias? Are you talking about host alias or user alias? Are A and C in the same NIS domain?
In either case are they both pointing to the same alias? Again i would say definitely check the /etc/nsswitch.conf on A and C.

what machine do you have access to B or C?

-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
Robin Wakefield
Honored Contributor

Re: Sendmail Refusing connections?!

Case shouldn't be contributing to this problem.
Are you saying you have access to A and C, but not B? If so, you should be able to do a lot of testing by telneting and simulating message flow, or running the sendmail -bv commands, e.g. (what you type is preceded by + below):

+telnet b 25
Trying...
Connected to b ....
.....Sendmail greeting...
+mail from:
250 ... Sender ok
+rcpt to:
550 ... User unknown
+

that sort of thing...

Rgds, Robin.
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

RU,

I only have access to server B, which is local and the destined recipent of the mail messages. It turns out that it is a host alias rather than a user alias, but I'm still unsure of the difference between the sucessful messages and the failed messages, other than the originating address. I've checked nsswitch.conf, it all seems okay! It reads as follows:-

hosts: files [NOTFOUND=continue UNAVAIL=continue TRYAGAIN=continue] dns [NOTFOUN
D=continue UNAVAIL=continue TRYAGAIN=continue]
protocols: files
services: files
networks: files
netgroup: files
rpc: files

Again, thanks for the tips so far!!

-ChaZ-
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

Robin,

Thanks, to reiterate:

I have access to Host A, ie another machine on the same network that I can send test mails from without problems and Host B which is where all of the mails are supposed to turn up.

Unfortunately I have no access to Host C so I can't check whats going on ! .arrg!
Cheers,


-ChaZ-
someone_4
Honored Contributor
Solution

Re: Sendmail Refusing connections?!

Can you check that host b has host c in /etc/hosts with the domain that comes up when you get the error.
550 xxxxxxxxxxx.com... User unknown

Richard
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

Okay, I've re-examined the log files in /var/mail/root (which is where the errors are being displayed)
The is another line with states that the originator address (of server C) might be false. Could this be why sendmail is not accepting the mails?!

The only reason I can think of for this would be if they are using a network translating address router ( not a legit. tech term ). Is there anyway of telling sendmail to not try and autheticate mails from this address ?

Cheers!

-ChaZ-
linuxfan
Honored Contributor

Re: Sendmail Refusing connections?!

Hi Charles,

Its a host alias, then i guess the machines are looking at DNS. I would say if possible compare the /etc/resolv.conf and /etc/nsswitch.conf on A and C. I know you said you don't have access to C but i guess you will have to involve the admin for C.

Also on B did you look at /var/adm/syslog/mail.log for any connection attempts from C?


-Regards
I am RU
They think they know but don't. At least I know I don't know - Socrates
Charles Harris
Super Advisor

Re: Sendmail Refusing connections?!

Dear all,

Thanks for your time and effort!!! - I've resolved the problem finally, with plenty of inspiration from everyone's help!

I got access to HOST C:-

HOST C ( trying not to loose my temper ;-) had, in there infinate wisdom, hardcoded the wrong ip address for our Host B in /etc/hosts!!!!!! a simple change, a restart of sendmail and everything was fine!! .....arrrrrrrrrrrrrrrrrrrrrrg!

Thanks again,


-ChaZ-
Dan Am
Frequent Advisor

Re: Sendmail Refusing connections?!

..it's a classic
do what you can. don't if you can't.