cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail issue

 
SOLVED
Go to solution
Highlighted
Super Advisor

sendmail issue

I have a new Red Hat Version 5 server that I have configured sendmail on to be able to send mail only... Issue is it isn't working, as I receive message: Connection refused by [127.0.0.1]

I have it working on several other servers but this one is a mistery so far...

What I see with sendmail that is running is:
[root ~]# ps -ef |grep sendm
root 4258 1 0 11:01 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/mqueue
smmsp 4268 1 0 11:01 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 5721 4557 0 13:10 pts/1 00:00:00 grep sendm
[root ~]# telnet localhost 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root ~]#

And on my other working servers I see:
[root@ ~]# service sendmail status
sendmail (pid 6486 6476) is running...
[root ~]# ps -ef |grep sendm
root 6476 1 0 Jan08 ? 00:00:00 sendmail: accepting connections
smmsp 6486 1 0 Jan08 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 28143 27764 0 12:54 pts/1 00:00:00 grep sendm
[root ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mfl-rhel5 ESMTP Sendmail 8.13.8/8.13.8; Tue, 13 Jan 2009 12:55:03 -0500
^]
telnet> quit
Connection closed.
[root ~]#

I don't understand what isn't starting correctly that I don't see: sendmail: accepting connections running....
7 REPLIES 7
Highlighted
Honored Contributor

Re: sendmail issue

I want to see the output of the following commands:

netstat -an | grep ":25"
service iptables status
getenforce
service sendmail restart && tail /var/log/maillog
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Super Advisor

Re: sendmail issue

[root ~]# netstat -an | grep ":25"
[root ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination

Chain FORWARD (policy ACCEPT)
num target prot opt source destination

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination

[root ~]# getenforce
Disabled
[root ~]# service sendmail restart && tail /var/log/maillog
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DFROkV003836: n0DK1auS006848: sender notify: Warning: could not send message for past 4 hours
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DK1auS006848: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31440, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DEQtD2003098: to=michael.lense@convergys.com, ctladdr=root (0/0), delay=05:34:41, xdelay=00:00:00, mailer=relay, pri=570087, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DEWfhS003200: to=CVGcpu@perf.dcd.convergys.com, ctladdr=root (0/0), delay=05:28:55, xdelay=00:00:00, mailer=relay, pri=572357, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DEneJl003430: to=CVGcpu@perf.dcd.convergys.com, ctladdr=root (0/0), delay=05:11:56, xdelay=00:00:00, mailer=relay, pri=586333, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jan 13 15:01:36 spjapws01 sm-msp-queue[6848]: n0DEDxNl002894: to=michael.lense@convergys.com, ctladdr=root (0/0), delay=05:47:37, xdelay=00:00:00, mailer=relay, pri=660087, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Jan 13 15:03:01 spjapws01 sendmail[6906]: alias database /etc/aliases rebuilt by mlense
Jan 13 15:03:01 spjapws01 sendmail[6906]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Jan 13 15:03:01 spjapws01 sendmail[6915]: starting daemon (8.13.8): queueing@01:00:00
Jan 13 15:03:01 spjapws01 sm-msp-queue[6925]: starting daemon (8.13.8): queueing@01:00:00
[root ~]#
Highlighted
Honored Contributor

Re: sendmail issue

Can you describe what is the configuration you did to "send mail only", as you can see, the sendmail daemon is up but is not running on any interfaces, as displayed by the "netstat -an" command.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Super Advisor

Re: sendmail issue

In file /etc/mail/sendmail.cf added:

DSsmtp:mailhost.convergys.com
and
DHmailhost.convergys.com

In /etc/mail/sendmail.mc added:

define(`MAIL_HUB', mailhost.convergys.com)dnl
define(`SMART_HOST', smtp:mailhost.convergys.com)dnl

In /etc/mail/submit.mc added:

FEATURE(`msp', `[mailhost.convergys.com]')dnl
Highlighted
Honored Contributor
Solution

Re: sendmail issue

If you modify the sendmail.cf file, there is no need to modify the mc file. If you work with mc files, you must re-generate your .cf files based on the mc files using the m4 compiler.

Please see this thread, it may help you:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=981253
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Highlighted
Super Advisor

Re: sendmail issue

Thanks for all of your help....

I missed a line we had in the submit.cf file:

D{MTAHost}[mailhost.convergys.com]

added this, and restarted sendmail and mail is now being sent from server..
Highlighted
Super Advisor

Re: sendmail issue

Thanks