Operating System - Linux
1832856 Members
3130 Online
110047 Solutions
New Discussion

Re: Very strange problem on RH 8.0 server

 
Jeroen A.Geurtsen
Occasional Contributor

Very strange problem on RH 8.0 server

Hi all,
I'm a newby on this forum so please excuse me if I'm using it not correct.

I have the strangest problem on my Linux server with RH 8.0 (2.4.20-24.8).
problem is that after the latest reboot my sendmail won't work anymore. After two days of forum browsing, I'm complete lost right now.
So I hope someone here can help.

Here are some details about the problem.
I installed the lastest sendmail version by the book. Sendmail starts normally but it can't connect to localhost.

A telnet gives the following result
[root@server mail]# telnet localhost 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

A netstat also shows no port 25 at all.
[root@server mail]# netstat -an | grep LISTEN
tcp 0 0 0.0.0.0:199 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN

I included the sendmail.cf file, which is completely standard ,since it is a fresh install.
I already changed the Daemon Options in the sendmail.cf file, but with no results.

Hope someone can help.
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Very strange problem on RH 8.0 server

You have probably configured sendmail into this state.

To start, check the /etc/mail/access file and make sure localhost is allowed to relay mail.

Then rebuild the sendmail.cf file from macros. This is laid out on the http://www.sendmail.org site and many of my prior posts.

For diagnostics:

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

.


The diagnostics will be helpful.

The service sendmail is not running, but you still should be able to send mail.

Just in case you disabled the daemon

chkconfig --level 12345 sendmail on
service sendmail start

See if it remains running.

SEP
Jerusalem
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
Jeroen A.Geurtsen
Occasional Contributor

Re: Very strange problem on RH 8.0 server

Thanks, I tried it, and it came back with this :

[root@server mail]# sendmail -v -d8 -d38 test@test.nl
blabla
.
test@test.nl... Connecting to [127.0.0.1] via relay...
test@test.nl... Deferred: Connection refused by [127.0.0.1]

I also looked in my access file which looks like this :
# by default we allow relaying from localhost...
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY

Problem is that the sendmail service starts up nicely and runs right now. It only complains in the maillog about a refused connection.
Jul 2 11:18:14 server sm-msp-queue[9786]: i619Dk6g020390: to=s,test@hebbizz.nl, ctladdr=root (0/0), delay=1+00:04:28, xdelay=00:00:00, mailer=relay, pri=9060044, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Muthukumar_5
Honored Contributor

Re: Very strange problem on RH 8.0 server

Hai,

Did you check your sendmail service working. check with chkconfig.

netstat is showing that your sendmail is not working. It is not showing the LISTEN state on *:25 port.

Did you try to your hostname with 25. Is your sendmail working for other hostname's.

It may be the service startup problem. see the syslog and mail.log file to analyse the problem.

Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
Alexander Chuzhoy
Honored Contributor

Re: Very strange problem on RH 8.0 server

When you first install and start sendmail service -it suppose to listen on 127.0.0.1 port 25 by default.
Check if you have some definition that blockes connection there.
Could be iptables,hosts.deny/hosts.allow.
Jeroen A.Geurtsen
Occasional Contributor

Re: Very strange problem on RH 8.0 server

Muthukumar , you just pointed me in the right direction I think. When I startup sendmail, I get this message in the maillog

Jul 2 13:11:46 server sendmail[17307]: alias database /etc/mail/aliases rebuilt by root
Jul 2 13:11:46 server sendmail[17307]: /etc/mail/aliases: 53 aliases, longest 100 bytes, 1139 bytes total
Jul 2 13:11:46 server sm-msp-queue[17314]: starting daemon (8.13.0): queueing@00:30:00
Jul 2 13:11:46 server sm-msp-queue[17322]: starting daemon (8.13.0): queueing@00:30:00

When running, I do a ps -ef | grep sendmail and get this :
smmsp 17314 1 0 13:11 ? 00:00:00 sendmail: Queue runner@00:30:00
root 17322 1 0 13:11 ? 00:00:00 sendmail: Queue runner@00:30:00
root 17968 471 0 13:23 pts/2 00:00:00 grep sendmail

On my other machine there are more sendmail processes , like this.
root 30537 1 0 13:10 ? 00:00:00 sendmail: accepting connections
smmsp 30546 1 0 13:10 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 30608 30451 0 13:23 pts/0 00:00:00 grep sendmail

So I suppose the sendmail daemon is not running at all, explaining the connect failures. Well this raises the following question. Why won't sendmail startup ?

Meanwhile I also installed a version of Postfix on the system, leaving me with the same problem. very weird.
Muthukumar_5
Honored Contributor

Re: Very strange problem on RH 8.0 server

Hai,

The log file and ps command is telling that,sendmail process ID 17307 is not running.
sendmail process id is stored in /etc/mail/sendmail.pid.

I think the problem may be because of sendmail.sf file. Stop the sendmail service and analyse the sendmail.cf file.

I am not much experienced in setting sendmail.cf file. But the problem may be because of the config file.

Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
Naveej.K.A
Honored Contributor

Re: Very strange problem on RH 8.0 server

hi,

have gone through your sendmail.cf..

Why don't you think of defining your hostname (FQDN) in your sendmail.cf just after the Dj$w.

with best wishes
Naveej
practice makes a man perfect!!!
Jeroen A.Geurtsen
Occasional Contributor

Re: Very strange problem on RH 8.0 server

No, that didn't help. I didn't use that option in the previous version.

Part of the problem is that this sendmail configuration did work. I rebooted the machine last day and now it's not working anymore. This is what me frustrates so much.
Naveej.K.A
Honored Contributor

Re: Very strange problem on RH 8.0 server

hi,

why don't u edit the sendmail.mc and think of recreating the sendmail.cf from the scratch. or if you have a backup of sendmail.cf, that could also help

with best wishes
Naveej
practice makes a man perfect!!!